Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-06-26 01:19:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-06-26 01:19:55 +0300
commit70b5cec5fafc09fedb2a0cc2713565c4340a5536 (patch)
tree09ba0b7cfcc7604d26be109e1e84e07a738395da /source/blender/windowmanager
parent3c7355b3a2190f028904d9bc8ef8f1bb4730a238 (diff)
Manipulator: add optional properties argument
Needed for RNA/Py API
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/manipulators/WM_manipulator_api.h4
-rw-r--r--source/blender/windowmanager/manipulators/intern/wm_manipulator.c7
2 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/windowmanager/manipulators/WM_manipulator_api.h b/source/blender/windowmanager/manipulators/WM_manipulator_api.h
index d6e468089f8..ecb0af818b2 100644
--- a/source/blender/windowmanager/manipulators/WM_manipulator_api.h
+++ b/source/blender/windowmanager/manipulators/WM_manipulator_api.h
@@ -38,6 +38,7 @@
struct ARegion;
struct GHashIterator;
+struct IDProperty;
struct Main;
struct PropertyRNA;
struct wmKeyConfig;
@@ -66,7 +67,8 @@ void WM_manipulator_free(
ListBase *manipulatorlist, struct wmManipulatorMap *mmap, struct wmManipulator *mpr,
struct bContext *C);
-struct PointerRNA *WM_manipulator_set_operator(struct wmManipulator *, struct wmOperatorType *ot);
+struct PointerRNA *WM_manipulator_set_operator(
+ struct wmManipulator *, struct wmOperatorType *ot, struct IDProperty *properties);
/* callbacks */
void WM_manipulator_set_fn_custom_modal(struct wmManipulator *mpr, wmManipulatorFnModal fn);
diff --git a/source/blender/windowmanager/manipulators/intern/wm_manipulator.c b/source/blender/windowmanager/manipulators/intern/wm_manipulator.c
index ba0e720485a..d11defc4e98 100644
--- a/source/blender/windowmanager/manipulators/intern/wm_manipulator.c
+++ b/source/blender/windowmanager/manipulators/intern/wm_manipulator.c
@@ -232,7 +232,8 @@ void WM_manipulator_free(ListBase *manipulatorlist, wmManipulatorMap *mmap, wmMa
* \{ */
-PointerRNA *WM_manipulator_set_operator(wmManipulator *mpr, wmOperatorType *ot)
+PointerRNA *WM_manipulator_set_operator(
+ wmManipulator *mpr, wmOperatorType *ot, IDProperty *properties)
{
mpr->op_data.type = ot;
@@ -241,6 +242,10 @@ PointerRNA *WM_manipulator_set_operator(wmManipulator *mpr, wmOperatorType *ot)
}
WM_operator_properties_create_ptr(&mpr->op_data.ptr, ot);
+ if (properties) {
+ mpr->op_data.ptr.data = properties;
+ }
+
return &mpr->op_data.ptr;
}