Commit: 5e05c17d7e0fa3eec5e029ea186f67cc981b0753
Author: Julian Eisel
Date:   Sun Aug 16 11:21:36 2015 +0200
Branches: wiggly-widgets
https://developer.blender.org/rB5e05c17d7e0fa3eec5e029ea186f67cc981b0753

Cleanup: Naming, no need to use widgetgroup->customdata

===================================================================

M       source/blender/editors/include/ED_transform.h
M       source/blender/editors/space_view3d/space_view3d.c
M       source/blender/editors/transform/manipulator_widget.c

===================================================================

diff --git a/source/blender/editors/include/ED_transform.h 
b/source/blender/editors/include/ED_transform.h
index 4e037aa..647ef8d 100644
--- a/source/blender/editors/include/ED_transform.h
+++ b/source/blender/editors/include/ED_transform.h
@@ -171,7 +171,7 @@ typedef struct ManipulatorGroup {
 } ManipulatorGroup;
 
 int WIDGETGROUP_manipulator_poll(const struct bContext *C, struct 
wmWidgetGroupType *wgrouptype);
-void WIDGETGROUP_manipulator_update(const struct bContext *C, struct 
wmWidgetGroup *wgroup);
+void WIDGETGROUP_manipulator_draw(const struct bContext *C, struct 
wmWidgetGroup *wgroup);
 
 void WIDGETGROUP_object_manipulator_draw(const struct bContext *C, struct 
wmWidgetGroup *wgroup);
 
diff --git a/source/blender/editors/space_view3d/space_view3d.c 
b/source/blender/editors/space_view3d/space_view3d.c
index d96dd62..461100c 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -873,7 +873,7 @@ static void view3d_widgets(void)
 {
        WM_widgetmaptype_find("View3D", SPACE_VIEW3D, RGN_TYPE_WINDOW, true, 
true);
 
-       WM_widgetgrouptype_new(WIDGETGROUP_manipulator_poll, 
WIDGETGROUP_manipulator_update, NULL, "View3D", SPACE_VIEW3D, RGN_TYPE_WINDOW, 
true);
+       WM_widgetgrouptype_new(WIDGETGROUP_manipulator_poll, 
WIDGETGROUP_manipulator_draw, NULL, "View3D", SPACE_VIEW3D, RGN_TYPE_WINDOW, 
true);
        WM_widgetgrouptype_new(WIDGETGROUP_lamp_poll, WIDGETGROUP_lamp_draw, 
NULL, "View3D", SPACE_VIEW3D, RGN_TYPE_WINDOW, true);
        WM_widgetgrouptype_new(WIDGETGROUP_camera_poll, 
WIDGETGROUP_camera_draw, NULL, "View3D", SPACE_VIEW3D, RGN_TYPE_WINDOW, true);
        WM_widgetgrouptype_new(WIDGETGROUP_armature_facemap_poll, 
WIDGETGROUP_armature_facemap_draw, NULL, "View3D", SPACE_VIEW3D, 
RGN_TYPE_WINDOW, true);
diff --git a/source/blender/editors/transform/manipulator_widget.c 
b/source/blender/editors/transform/manipulator_widget.c
index 1a901da..891b753 100644
--- a/source/blender/editors/transform/manipulator_widget.c
+++ b/source/blender/editors/transform/manipulator_widget.c
@@ -1976,7 +1976,7 @@ static void WIDGETGROUP_manipulator_free(struct 
wmWidgetGroup *wgroup)
 }
 #endif
 
-static void WIDGETGROUP_manipulator_create(const struct bContext *UNUSED(C), 
struct wmWidgetGroup *wgroup)
+static ManipulatorGroup *manipulator_widgetgroup_create(const struct bContext 
*UNUSED(C), struct wmWidgetGroup *wgroup)
 {
        ManipulatorGroup *manipulator = MEM_callocN(sizeof(ManipulatorGroup), 
"manipulator_data");
        wmWidget *widget, *axis;
@@ -2027,9 +2027,11 @@ static void WIDGETGROUP_manipulator_create(const struct 
bContext *UNUSED(C), str
        MAN_ITER_AXES_END;
 
        WM_widgetgroup_customdata_set(wgroup, manipulator);
+
+       return manipulator;
 }
 
-void WIDGETGROUP_manipulator_update(const struct bContext *C, struct 
wmWidgetGroup *wgroup)
+void WIDGETGROUP_manipulator_draw(const struct bContext *C, struct 
wmWidgetGroup *wgroup)
 {
        ScrArea *sa = CTX_wm_area(C);
        ARegion *ar = CTX_wm_region(C);
@@ -2042,8 +2044,7 @@ void WIDGETGROUP_manipulator_update(const struct bContext 
*C, struct wmWidgetGro
        int totsel;
        short i;
 
-       WIDGETGROUP_manipulator_create(C, wgroup);
-       manipulator = WM_widgetgroup_customdata(wgroup);
+       manipulator = manipulator_widgetgroup_create(C, wgroup);
 
        v3d->twflag &= ~V3D_DRAW_MANIPULATOR;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to