[Bf-blender-cvs] [d30f313141c] custom-manipulators: Merge branch 'blender2.8' into custom-manipulators

Campbell Barton noreply at git.blender.org
Fri Apr 7 13:44:29 CEST 2017


Commit: d30f313141cbf9f733ef1ae0c3351eda98376a52
Author: Campbell Barton
Date:   Fri Apr 7 21:44:21 2017 +1000
Branches: custom-manipulators
https://developer.blender.org/rBd30f313141cbf9f733ef1ae0c3351eda98376a52

Merge branch 'blender2.8' into custom-manipulators

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



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

diff --cc source/blender/editors/object/object_edit.c
index 953471c6827,abdbf3afd5a..51fce12f872
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@@ -2009,42 -2008,6 +2009,44 @@@ void OBJECT_OT_game_physics_copy(struc
  	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
  }
  
++#if 0
 +static int object_widget_add_exec(bContext *C, wmOperator *UNUSED(op))
 +{
 +	Object *ob = ED_object_active_context((bContext *)C);
 +	wmManipulatorMapType *mmaptype = WM_manipulatormaptype_find(&(const struct wmManipulatorMapType_Params) {
 +	        "View3D", SPACE_VIEW3D, RGN_TYPE_WINDOW});
 +	wmManipulatorGroupType *wgrouptype = WM_manipulatorgrouptype_append(mmaptype, TRANSFORM_WGT_object);
 +	/* 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;
 +}
 +
 +void OBJECT_OT_widget_add(wmOperatorType *ot)
 +{
 +	PropertyRNA *prop;
 +
 +	/* identifiers */
 +	ot->name = "Add Widget";
 +	ot->description = "Add a widget to the active object";
 +	ot->idname = "OBJECT_OT_widget_add";
 +
 +	/* api callbacks */
 +	ot->invoke = WM_menu_invoke;
 +	ot->exec = object_widget_add_exec;
 +	ot->poll = ED_operator_object_active;
 +
 +	/* flags */
 +	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 +
 +	/* properties */
 +	prop = RNA_def_enum(ot->srna, "type", rna_enum_wm_widget_type_items, 0, "Type", "Select the type of widget to add");
 +	ot->prop = prop;
 +}
++#endif
 +
  /* generic utility function */
  
  bool ED_object_editmode_calc_active_center(Object *obedit, const bool select_only, float r_center[3])
diff --cc source/blender/editors/object/object_ops.c
index 8e1eaa08db2,91950872a3d..3ab6828d637
--- a/source/blender/editors/object/object_ops.c
+++ b/source/blender/editors/object/object_ops.c
@@@ -258,8 -250,6 +258,10 @@@ void ED_operatortypes_object(void
  	WM_operatortype_append(OBJECT_OT_data_transfer);
  	WM_operatortype_append(OBJECT_OT_datalayout_transfer);
  	WM_operatortype_append(OBJECT_OT_surfacedeform_bind);
 +
++#if 0
 +	WM_operatortype_append(OBJECT_OT_widget_add);
++#endif
  }
  
  void ED_operatormacros_object(void)
diff --cc source/blender/editors/transform/transform_manipulator.c
index a857ec827c7,91aaa5da0e9..e12f1b4286a
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@@ -921,6 -921,6 +921,7 @@@ static int calc_manipulator_stats(cons
  				if (ob == NULL)
  					ob = base->object;
  				calc_tw_center(scene, base->object->obmat[3]);
++				protectflag_to_drawflags(base->object->protectflag, &rv3d->twdrawflag);
  				totsel++;
  			}
  		}




More information about the Bf-blender-cvs mailing list