[Bf-blender-cvs] [75bd640] temp_widgets_update_tagging: Adjustments to make object widgets work with update tagging system

Julian Eisel noreply at git.blender.org
Tue May 17 21:51:35 CEST 2016


Commit: 75bd640af14871e720c399faf357416b37ffaa0c
Author: Julian Eisel
Date:   Tue May 17 21:49:54 2016 +0200
Branches: temp_widgets_update_tagging
https://developer.blender.org/rB75bd640af14871e720c399faf357416b37ffaa0c

Adjustments to make object widgets work with update tagging system

Object widgets are still unfinished and it's uncertain if they'll stay though.

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

M	source/blender/editors/object/object_edit.c

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

diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 626ae5f..86adb48 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -2201,17 +2201,21 @@ 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);
-	wmWidgetGroupType *wgrouptype = WM_widgetgrouptype_register(
+	wmWidgetGroupType *wgrouptype = WM_widgetgrouptype_register_update(
 	        CTX_data_main(C),
 	        &(const struct wmWidgetMapType_Params) {"View3D", SPACE_VIEW3D, RGN_TYPE_WINDOW, WM_WIDGETMAPTYPE_3D},
 	        WIDGETGROUP_object_manipulator_poll,
 	        WIDGETGROUP_object_manipulator_init,
+	        WIDGETGROUP_manipulator_refresh,
+	        WIDGETGROUP_manipulator_draw_prepare,
 	        WM_widgetgroup_keymap_common,
 	        "Object Widgets");
 
 	/* assign the objects id name to the widget */
 	strcpy(wgrouptype->idname, ob->id.name);
 
+	WM_main_add_notifier(NC_OBJECT | ND_DRAW, NULL);
+
 	return OPERATOR_FINISHED;
 }




More information about the Bf-blender-cvs mailing list