[Bf-blender-cvs] [37e7b32] wiggly-widgets: Make branch work with changes from temp_manipulators_core
Julian Eisel
noreply at git.blender.org
Sun Sep 11 15:52:19 CEST 2016
Commit: 37e7b328ec0b81fa8f9a34cb8522b3179a8f7697
Author: Julian Eisel
Date: Sun Sep 11 15:50:31 2016 +0200
Branches: wiggly-widgets
https://developer.blender.org/rB37e7b328ec0b81fa8f9a34cb8522b3179a8f7697
Make branch work with changes from temp_manipulators_core
There's actually more renaming to be done here, but will do that later. Focusing on actual manipulator core for now.
===================================================================
M source/blender/blenkernel/intern/screen.c
M source/blender/editors/armature/pose_select.c
M source/blender/editors/include/ED_transform.h
M source/blender/editors/include/ED_view3d.h
M source/blender/editors/include/UI_interface.h
M source/blender/editors/object/object_edit.c
M source/blender/editors/screen/screen_edit.c
M source/blender/editors/space_graph/graph_edit.c
M source/blender/editors/space_graph/space_graph.c
M source/blender/editors/space_image/space_image.c
M source/blender/editors/space_node/node_draw.c
M source/blender/editors/space_node/node_intern.h
M source/blender/editors/space_node/node_widgets.c
M source/blender/editors/space_node/space_node.c
M source/blender/editors/space_sequencer/sequencer_draw.c
M source/blender/editors/space_sequencer/sequencer_view.c
M source/blender/editors/space_sequencer/space_sequencer.c
M source/blender/editors/space_view3d/space_view3d.c
M source/blender/editors/space_view3d/view3d_draw.c
M source/blender/editors/space_view3d/view3d_intern.h
M source/blender/editors/space_view3d/view3d_widgets.c
M source/blender/editors/transform/transform_manipulator.c
M source/blender/editors/transform/transform_manipulator2d.c
M source/blender/makesdna/DNA_object_types.h
M source/blender/makesdna/DNA_screen_types.h
M source/blender/makesrna/intern/rna_wm.c
M source/blender/windowmanager/CMakeLists.txt
M source/blender/windowmanager/intern/wm_event_system.c
M source/blender/windowmanager/intern/wm_init_exit.c
M source/blender/windowmanager/intern/wm_operators.c
R070 source/blender/windowmanager/widgets/intern/widget_library/facemap_widget.c source/blender/windowmanager/manipulators/intern/manipulator_library/facemap_manipulator.c
M source/blender/windowmanager/wm.h
M source/blenderplayer/bad_level_call_stubs/stubs.c
===================================================================
diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c
index 2f57bf4..afbc226 100644
--- a/source/blender/blenkernel/intern/screen.c
+++ b/source/blender/blenkernel/intern/screen.c
@@ -296,7 +296,7 @@ void BKE_spacedata_id_unref(struct ScrArea *sa, struct SpaceLink *sl, struct ID
void BKE_area_region_free(SpaceType *st, ARegion *ar)
{
uiList *uilst;
- struct wmWidgetMap *wmap, *wmap_tmp;
+ struct wmManipulatorMap *wmap, *wmap_tmp;
if (st) {
ARegionType *art = BKE_regiontype_from_id(st, ar->regiontype);
@@ -345,7 +345,7 @@ void BKE_area_region_free(SpaceType *st, ARegion *ar)
for (wmap = ar->widgetmaps.first; wmap; wmap = wmap_tmp) {
wmap_tmp = wmap->next;
- WM_widgetmap_delete(wmap); /* XXX shouldn't be in blenkernel */
+ WM_manipulatormap_delete(wmap); /* XXX shouldn't be in blenkernel */
}
BLI_listbase_clear(&ar->widgetmaps);
BLI_freelistN(&ar->ui_lists);
diff --git a/source/blender/editors/armature/pose_select.c b/source/blender/editors/armature/pose_select.c
index 21d13c1..0a2a498 100644
--- a/source/blender/editors/armature/pose_select.c
+++ b/source/blender/editors/armature/pose_select.c
@@ -374,7 +374,7 @@ static int pose_de_select_all_exec(bContext *C, wmOperator *op)
/* handle facemap widget selection */
if ((ob->mode & OB_MODE_POSE) && has_facemap) {
- WM_widgetmap_select_all(C, (wmWidgetMap *)ar->widgetmaps.first, action);
+ WM_manipulatormap_select_all(C, (wmManipulatorMap *)ar->widgetmaps.first, action);
}
WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, NULL);
diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h
index a719231..463971b 100644
--- a/source/blender/editors/include/ED_transform.h
+++ b/source/blender/editors/include/ED_transform.h
@@ -117,9 +117,9 @@ struct ScrArea;
struct Base;
struct Scene;
struct Object;
-struct wmWidget;
-struct wmWidgetGroup;
-struct wmWidgetGroupType;
+struct wmManipulator;
+struct wmManipulatorGroup;
+struct wmManipulatorGroupType;
struct wmOperator;
/* UNUSED */
@@ -162,14 +162,14 @@ void Transform_Properties(struct wmOperatorType *ot, int flags);
/* transform manipulators */
-void TRANSFORM_WGT_manipulator(struct wmWidgetGroupType *wgt);
+void TRANSFORM_WGT_manipulator(struct wmManipulatorGroupType *wgt);
-void TRANSFORM_WGT_object(struct wmWidgetGroupType *wgt);
+void TRANSFORM_WGT_object(struct wmManipulatorGroupType *wgt);
-int WIDGETGROUP_manipulator2d_poll(const struct bContext *C, struct wmWidgetGroupType *wgrouptype);
-void WIDGETGROUP_manipulator2d_init(const struct bContext *C, struct wmWidgetGroup *wgroup);
-void WIDGETGROUP_manipulator2d_refresh(const struct bContext *C, struct wmWidgetGroup *wgroup);
-void WIDGETGROUP_manipulator2d_draw_prepare(const struct bContext *C, struct wmWidgetGroup *wgroup);
+int WIDGETGROUP_manipulator2d_poll(const struct bContext *C, struct wmManipulatorGroupType *wgrouptype);
+void WIDGETGROUP_manipulator2d_init(const struct bContext *C, struct wmManipulatorGroup *wgroup);
+void WIDGETGROUP_manipulator2d_refresh(const struct bContext *C, struct wmManipulatorGroup *wgroup);
+void WIDGETGROUP_manipulator2d_draw_prepare(const struct bContext *C, struct wmManipulatorGroup *wgroup);
/* Snapping */
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index 5c72a9a..9015210 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -63,9 +63,9 @@ struct wmOperator;
struct wmOperatorType;
struct wmWindow;
struct wmWindowManager;
-struct wmWidget;
-struct wmWidgetGroup;
-struct wmWidgetGroupType;
+struct wmManipulator;
+struct wmManipulatorGroup;
+struct wmManipulatorGroupType;
struct GPUFX;
struct GPUOffScreen;
struct GPUFXSettings;
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index d6b6d67..6236e3d 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -73,8 +73,8 @@ struct bNodeSocket;
struct wmDropBox;
struct wmDrag;
struct wmEvent;
-struct wmWidget;
-struct wmWidgetGroup;
+struct wmManipulator;
+struct wmManipulatorGroup;
typedef struct uiBut uiBut;
typedef struct uiBlock uiBlock;
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 2935578..195be0b 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -2202,9 +2202,9 @@ void OBJECT_OT_game_physics_copy(struct wmOperatorType *ot)
static int object_widget_add_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob = ED_object_active_context((bContext *)C);
- wmWidgetMapType *wmaptype = WM_widgetmaptype_find(&(const struct wmWidgetMapType_Params) {
- "View3D", SPACE_VIEW3D, RGN_TYPE_WINDOW, WM_WIDGETMAPTYPE_3D});
- wmWidgetGroupType *wgrouptype = WM_widgetgrouptype_append(wmaptype, TRANSFORM_WGT_object);
+ wmManipulatorMapType *wmaptype = WM_manipulatormaptype_find(&(const struct wmManipulatorMapType_Params) {
+ "View3D", SPACE_VIEW3D, RGN_TYPE_WINDOW, WM_MANIPULATORMAPTYPE_3D});
+ wmManipulatorGroupType *wgrouptype = WM_manipulatorgrouptype_append(wmaptype, TRANSFORM_WGT_object);
/* assign the objects id name to the widget */
strcpy(wgrouptype->idname, ob->id.name);
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 4dfab2e..23f45e4 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -1069,7 +1069,7 @@ static void region_cursor_set(wmWindow *win, int swinid, int swin_changed)
for (ARegion *ar = sa->regionbase.first; ar; ar = ar->next) {
if (ar->swinid == swinid) {
if (swin_changed || (ar->type && ar->type->event_cursor)) {
- if (WM_widgetmap_cursor_set(ar->widgetmaps.first, win))
+ if (WM_manipulatormap_cursor_set(ar->widgetmaps.first, win))
return;
ED_region_cursor_set(win, sa, ar);
}
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index e7fcc9f..270892a 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -2765,19 +2765,19 @@ static int graph_widget_backdrop_transform_poll(bContext *C)
(sipo->backdrop_camera));
}
-static void widgetgroup_backdrop_init(const bContext *UNUSED(C), wmWidgetGroup *wgroup)
+static void widgetgroup_backdrop_init(const bContext *UNUSED(C), wmManipulatorGroup *wgroup)
{
- wmWidgetWrapper *wwrapper = MEM_mallocN(sizeof(wmWidgetWrapper), __func__);
+ wmManipulatorWrapper *wwrapper = MEM_mallocN(sizeof(wmManipulatorWrapper), __func__);
wgroup->customdata = wwrapper;
- wwrapper->widget = WIDGET_rect_transform_new(
+ wwrapper->widget = MANIPULATOR_rect_transform_new(
wgroup, "backdrop_cage",
- WIDGET_RECT_TRANSFORM_STYLE_SCALE_UNIFORM | WIDGET_RECT_TRANSFORM_STYLE_TRANSLATE);
+ MANIPULATOR_RECT_TRANSFORM_STYLE_SCALE_UNIFORM | MANIPULATOR_RECT_TRANSFORM_STYLE_TRANSLATE);
}
-static void widgetgroup_backdrop_refresh(const struct bContext *C, wmWidgetGroup *wgroup)
+static void widgetgroup_backdrop_refresh(const struct bContext *C, wmManipulatorGroup *wgroup)
{
- wmWidget *cage = ((wmWidgetWrapper *)wgroup->customdata)->widget;
+ wmManipulator *cage = ((wmManipulatorWrapper *)wgroup->customdata)->widget;
ARegion *ar = CTX_wm_region(C);
const Scene *scene = CTX_data_scene(C);
const int width = (scene->r.size * scene->r.xsch) / 150.0f;
@@ -2787,16 +2787,16 @@ static void widgetgroup_backdrop_refresh(const struct bContext *C, wmWidgetGroup
origin[0] = BLI_rcti_size_x(&ar->winrct) / 2.0f;
origin[1] = BLI_rcti_size_y(&ar->winrct) / 2.0f;
- WM_widget_set_origin(cage, origin);
- WIDGET_rect_transform_set_dimensions(cage, width, height);
+ WM_manipulator_set_origin(cage, origin);
+ MANIPULATOR_rect_transform_set_dimensions(cage, width, height);
/* XXX hmmm, can't we do this in _init somehow? Issue is op->ptr is freed after OP is done. */
wmOperator *op = wgroup->type->op;
- WM_widget_set_property(cage, RECT_TRANSFORM_SLOT_OFFSET, op->ptr, "offset");
- WM_widget_set_property(cage, RECT_TRANSFORM_SLOT_SCALE, op->ptr, "scale");
+ WM_manipulator_set_property(cage, RECT_TRANSFORM_SLOT_OFFSET, op->ptr, "offset");
+ WM_manipulator_set_property(cage, RECT_TRANSFORM_SLOT_SCALE, op->ptr, "scale");
}
-static void GRAPH_WGT_backdrop_transform(wmWidgetGroupType *wgt)
+static void GRAPH_WGT_backdrop_transform(wmManipulatorGroupType *wgt)
{
wgt->name = "Backdrop Transform Widgets";
@@ -2841,7 +2841,7 @@ static void graph_widget_backdrop_transform_cancel(struct bContext *C, struct wm
static int graph_widget_backdrop_transform_modal(bContext *C, wmOperator *op, const wmEvent *event)
{
ARegion *ar = CTX_wm_region(C);
- wmWidgetMap *wmap = ar->widgetmaps.first;
+ wmManipulatorMap *wmap = ar->widgetmaps.first;
BackDropTransformData *data = op->customdata;
if (event->type == data->event_type && event->val == KM_PRESS) {
@@ -2850,7 +2850,7 @@ static int graph_widget_backdrop_transform_modal(bContext *C, wmOperator *op, co
}
switch (event->type) {
- case EVT_WIDGET_UPDATE:
+ case EVT_MANIPULATOR_UPDATE:
{
SpaceIpo *sipo = CTX_wm_space_graph(C);
RNA_float_get_array(op->ptr, "offset", sipo->backdrop_offset);
@@ -2892,7 +2892,7 @@ static int graph_widget_backdrop_transform_modal(bContext *C, wmOperator *op, co
}
}
}
- WM_widgetmap_tag_refresh(wmap);
+ WM_manipulatormap_tag_refresh(wmap);
return OPERATOR_RUNNING_MODAL;
}
@@ -2900,7 +2900,7 @@ static int graph_widget_backdrop_transform_modal(bContext *C, wmOperator *op, co
void GRAPH_OT_widget_backdrop_transform(struct wmOperatorType *ot)
{
float default_offset[2] = {0.0f, 0.0f};
- wmWidgetMapType *wmaptype = WM_widgetmaptype_find(&(const struct wmWidgetMapType_Params) {
+ wmManipulatorMapType *wmaptype = WM_manipulatormaptype_find(&(const struct wmManipulatorMapType_Params) {
"Graph_Canvas", SPACE_IPO, RGN_TY
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list