diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-07-23 22:19:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-07-24 10:21:09 +0300 |
commit | d53028b4501250d8d686c1b0e7d405b0ef6d1690 (patch) | |
tree | adc475a34d77e42aaf9f2a0b4b4f072425bf30f6 /source/blender/makesrna | |
parent | c7bc2f5e870c8074ed639a3b33c52df19679ca41 (diff) |
Manipulator: Expose Context.manipulator_group
Needed for operators run by the manipulator keymap
so they can access their selected manipulators.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_context.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_context.c b/source/blender/makesrna/intern/rna_context.c index a0b46a447ae..5701150b1bf 100644 --- a/source/blender/makesrna/intern/rna_context.c +++ b/source/blender/makesrna/intern/rna_context.c @@ -101,6 +101,14 @@ static PointerRNA rna_Context_region_data_get(PointerRNA *ptr) return PointerRNA_NULL; } +static PointerRNA rna_Context_manipulator_group_get(PointerRNA *ptr) +{ + bContext *C = (bContext *)ptr->data; + PointerRNA newptr; + RNA_pointer_create(NULL, &RNA_ManipulatorGroup, CTX_wm_manipulator_group(C), &newptr); + return newptr; +} + static PointerRNA rna_Context_main_get(PointerRNA *ptr) { bContext *C = (bContext *)ptr->data; @@ -229,6 +237,11 @@ void RNA_def_context(BlenderRNA *brna) RNA_def_property_struct_type(prop, "RegionView3D"); RNA_def_property_pointer_funcs(prop, "rna_Context_region_data_get", NULL, NULL, NULL); + prop = RNA_def_property(srna, "manipulator_group", PROP_POINTER, PROP_NONE); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_struct_type(prop, "ManipulatorGroup"); + RNA_def_property_pointer_funcs(prop, "rna_Context_manipulator_group_get", NULL, NULL, NULL); + /* Data */ prop = RNA_def_property(srna, "blend_data", PROP_POINTER, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_EDITABLE); |