[Bf-blender-cvs] [58526b3bec9] custom-manipulators: Cleanup: remove redundant access function

Campbell Barton noreply at git.blender.org
Wed Jun 14 21:31:01 CEST 2017


Commit: 58526b3bec9426ccb92c1d316311ca8ac89943ce
Author: Campbell Barton
Date:   Thu Jun 15 05:33:01 2017 +1000
Branches: custom-manipulators
https://developer.blender.org/rB58526b3bec9426ccb92c1d316311ca8ac89943ce

Cleanup: remove redundant access function

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

M	source/blender/windowmanager/intern/wm_event_system.c
M	source/blender/windowmanager/manipulators/intern/wm_manipulator.c
M	source/blender/windowmanager/manipulators/intern/wm_manipulator_property.c
M	source/blender/windowmanager/manipulators/wm_manipulator_wmapi.h

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

diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index d69904292ec..92652eac84f 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -2179,7 +2179,7 @@ static int wm_handlers_do_intern(bContext *C, wmEvent *event, ListBase *handlers
 				/* handle user configurable manipulator-map keymap */
 				else if (mpr) {
 					/* get user customized keymap from default one */
-					const wmManipulatorGroup *highlightgroup = wm_manipulator_get_parent_group(mpr);
+					const wmManipulatorGroup *highlightgroup = mpr->parent_mgroup;
 					const wmKeyMap *keymap = WM_keymap_active(wm, highlightgroup->type->keymap);
 					wmKeyMapItem *kmi;
 
diff --git a/source/blender/windowmanager/manipulators/intern/wm_manipulator.c b/source/blender/windowmanager/manipulators/intern/wm_manipulator.c
index b1f0e9a7a94..ae7353971f0 100644
--- a/source/blender/windowmanager/manipulators/intern/wm_manipulator.c
+++ b/source/blender/windowmanager/manipulators/intern/wm_manipulator.c
@@ -177,12 +177,6 @@ void WM_manipulator_free(ListBase *manipulatorlist, wmManipulatorMap *mmap, wmMa
 	MEM_freeN(mpr);
 }
 
-wmManipulatorGroup *wm_manipulator_get_parent_group(const wmManipulator *mpr)
-{
-	return mpr->parent_mgroup;
-}
-
-
 /* -------------------------------------------------------------------- */
 /** \name Manipulator Creation API
  *
diff --git a/source/blender/windowmanager/manipulators/intern/wm_manipulator_property.c b/source/blender/windowmanager/manipulators/intern/wm_manipulator_property.c
index df793f5e606..5ec3c3169eb 100644
--- a/source/blender/windowmanager/manipulators/intern/wm_manipulator_property.c
+++ b/source/blender/windowmanager/manipulators/intern/wm_manipulator_property.c
@@ -80,6 +80,7 @@ void WM_manipulator_property_def_rna(
 
 	/* if manipulator evokes an operator we cannot use it for property manipulation */
 	mpr->opname = NULL;
+
 	mpr_prop->ptr = *ptr;
 	mpr_prop->prop = RNA_struct_find_property(ptr, propname);
 	mpr_prop->index = index;
@@ -89,7 +90,6 @@ void WM_manipulator_property_def_rna(
 	}
 }
 
-/* TODO, de-duplicate */
 void WM_manipulator_property_def_func(
         wmManipulator *mpr, const char *idname,
         const wmManipulatorPropertyFnParams *params)
@@ -99,7 +99,6 @@ void WM_manipulator_property_def_func(
 	/* if manipulator evokes an operator we cannot use it for property manipulation */
 	mpr->opname = NULL;
 
-	/* XXX - de-duplicate*/
 	mpr_prop->custom_func.value_get_fn = params->value_get_fn;
 	mpr_prop->custom_func.value_set_fn = params->value_set_fn;
 	mpr_prop->custom_func.range_get_fn = params->range_get_fn;
diff --git a/source/blender/windowmanager/manipulators/wm_manipulator_wmapi.h b/source/blender/windowmanager/manipulators/wm_manipulator_wmapi.h
index 407470f8d89..cf031d89dd3 100644
--- a/source/blender/windowmanager/manipulators/wm_manipulator_wmapi.h
+++ b/source/blender/windowmanager/manipulators/wm_manipulator_wmapi.h
@@ -47,8 +47,6 @@ struct wmOperator;
 /* -------------------------------------------------------------------- */
 /* wmManipulator */
 
-struct wmManipulatorGroup *wm_manipulator_get_parent_group(const struct wmManipulator *mpr);
-
 /* wm_manipulator_type.c, for init/exit */
 void wm_manipulatortype_free(void);
 void wm_manipulatortype_init(void);




More information about the Bf-blender-cvs mailing list