[Bf-blender-cvs] [177a8f6dab1] blender2.8: Manipulator: add access to manipulator's group
Campbell Barton
noreply at git.blender.org
Thu Jul 20 16:40:09 CEST 2017
Commit: 177a8f6dab191db2756cc247565458b07d5b6005
Author: Campbell Barton
Date: Thu Jul 20 04:35:48 2017 +1000
Branches: blender2.8
https://developer.blender.org/rB177a8f6dab191db2756cc247565458b07d5b6005
Manipulator: add access to manipulator's group
===================================================================
M source/blender/makesrna/intern/rna_wm_manipulator.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_wm_manipulator.c b/source/blender/makesrna/intern/rna_wm_manipulator.c
index 6efed5c1150..a4debc86505 100644
--- a/source/blender/makesrna/intern/rna_wm_manipulator.c
+++ b/source/blender/makesrna/intern/rna_wm_manipulator.c
@@ -393,6 +393,12 @@ static int rna_Manipulator_name_length(PointerRNA *ptr)
return strlen(mpr->name);
}
+static PointerRNA rna_Manipulator_group_get(PointerRNA *ptr)
+{
+ wmManipulator *mpr = ptr->data;
+ return rna_pointer_inherit_refine(ptr, &RNA_ManipulatorGroup, mpr->parent_mgroup);
+}
+
#ifdef WITH_PYTHON
static void rna_Manipulator_unregister(struct Main *bmain, StructRNA *type);
@@ -998,6 +1004,12 @@ static void rna_def_manipulator(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_struct_name_property(srna, prop);
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, NULL);
+ prop = RNA_def_property(srna, "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_Manipulator_group_get", NULL, NULL, NULL);
+ RNA_def_property_ui_text(prop, "", "Manipulator group this manipulator is a member of");
+
/* Color & Alpha */
prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_array(prop, 3);
More information about the Bf-blender-cvs
mailing list