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/makesdna | |
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/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_mesh_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 11 |
2 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index 05f8d2645ad..4c9f6014445 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -170,6 +170,7 @@ typedef struct TFace { #define ME_SUBSURF 128 #define ME_OPT_EDGES 256 #define ME_DS_EXPAND 512 +#define ME_SCULPT_DYNAMIC_TOPOLOGY 1024 /* me->drawflag, short */ #define ME_DRAWEDGES (1 << 0) diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 5af116df772..0d1ef7af591 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -830,7 +830,8 @@ typedef struct Sculpt { float special_rotation; - int pad; + /* Maximum edge length for dynamic topology sculpting (in pixels) */ + int detail_size; } Sculpt; typedef struct UvSculpt { @@ -1479,6 +1480,14 @@ typedef enum SculptFlags { SCULPT_USE_OPENMP = (1<<7), SCULPT_ONLY_DEFORM = (1<<8), SCULPT_SHOW_DIFFUSE = (1<<9), + + /* If set, the mesh will be drawn with smooth-shading in + dynamic-topology mode */ + SCULPT_DYNTOPO_SMOOTH_SHADING = (1<<10), + + /* If set, dynamic-topology brushes will collapse short edges in + addition to subdividing long ones */ + SCULPT_DYNTOPO_COLLAPSE = (1<<11) } SculptFlags; /* ImagePaintSettings.flag */ |