[Bf-blender-cvs] [dee19b8cb7c] blender2.8: FaceMaps: add select flag
Campbell Barton
noreply at git.blender.org
Wed Jul 26 00:25:00 CEST 2017
Commit: dee19b8cb7c6287d183a833ea9e360be67631455
Author: Campbell Barton
Date: Wed Jul 26 05:21:38 2017 +1000
Branches: blender2.8
https://developer.blender.org/rBdee19b8cb7c6287d183a833ea9e360be67631455
FaceMaps: add select flag
For use by manipulators since they don't have their own persistent data
in the blend file.
===================================================================
M source/blender/makesdna/DNA_object_types.h
M source/blender/makesrna/intern/rna_object.c
===================================================================
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index 160f7f7feff..5c3c3ac7a0b 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -70,6 +70,8 @@ typedef struct bDeformGroup {
typedef struct bFaceMap {
struct bFaceMap *next, *prev;
char name[64]; /* MAX_VGROUP_NAME */
+ char flag;
+ char pad[7];
} bFaceMap;
/* Object Runtime display data */
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index de07785081e..50160b5b189 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -1778,6 +1778,11 @@ static void rna_def_face_map(BlenderRNA *brna)
/* update data because modifiers may use [#24761] */
RNA_def_property_update(prop, NC_GEOM | ND_DATA | NA_RENAME, "rna_Object_internal_update_data");
+ prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT);
+ RNA_def_property_ui_text(prop, "Select", "Face-map selection state (for tools to use)");
+ /* important not to use a notifier here, creates a feedback loop! */
+
prop = RNA_def_property(srna, "index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_int_funcs(prop, "rna_FaceMap_index_get", NULL, NULL);
More information about the Bf-blender-cvs
mailing list