diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-12-30 22:27:33 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-12-30 22:27:33 +0400 |
commit | fc442dbd51a5ef71757a1a179222f358b6efdc8c (patch) | |
tree | cc7bc014df652579d3e31b7b620ba194077e663d /source/blender/makesrna/intern/rna_object.c | |
parent | 31f978c8efdfd88d2cf2b5d9ae7c5d91c81e13d3 (diff) |
Add DNA/RNA/BKE infrastructure for dynamic-topology sculpt mode
* Add a detail_size field to the Sculpt struct, two new sculpt flags,
and a Mesh flag for dynamic-topology mode; that's it for file-level
changes needed by dynamic topology
* Add RNA for the new DNA field and flags
* Add a new icon for dynamic-topology created by Julio Iglesias. TODO:
update the icon for the new SVG icon format
* Add a SculptSession function for converting from BMesh to Mesh,
handles reordering mesh elements and setting face shading
Diffstat (limited to 'source/blender/makesrna/intern/rna_object.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 4918aabdb1f..6e81e866118 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -48,6 +48,7 @@ #include "BLI_utildefines.h" +#include "BKE_paint.h" #include "BKE_tessmesh.h" #include "BKE_group.h" /* needed for object_in_group() */ @@ -1436,6 +1437,12 @@ int rna_DupliObject_index_get(PointerRNA *ptr) return dob->persistent_id[0]; } +int rna_Object_use_dynamic_topology_sculpting_get(PointerRNA *ptr) +{ + SculptSession *ss = ((Object*)ptr->id.data)->sculpt; + return (ss && ss->bm); +} + #else static int rna_matrix_dimsize_4x4[] = {4, 4}; @@ -2629,6 +2636,12 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Active Shape Key Index", "Current shape key index"); RNA_def_property_update(prop, 0, "rna_Object_active_shape_update"); + /* sculpt */ + prop = RNA_def_property(srna, "use_dynamic_topology_sculpting", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_funcs(prop, "rna_Object_use_dynamic_topology_sculpting_get", NULL); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Dynamic Topology Sculpting", NULL); + RNA_api_object(srna); } |