diff options
author | Jacques Lucke <jacques@blender.org> | 2022-02-15 14:32:15 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-02-15 14:32:15 +0300 |
commit | 07032dd218922d2f1ba3275470bee01579f739c7 (patch) | |
tree | 0dbb41127ef33eb1006ba1b49d552c40d3c4d884 /source/blender/makesrna | |
parent | 07ed869b94fa8acf18d64864c6d8662bfbec33dd (diff) |
Curves: add initial sculpt mode
This adds a new sculpt mode to the experimental new curves object.
Currently, this mode can only be entered and exited, nothing else.
The main initial purpose of this node will be to use it for hair grooming.
The patch also adds the `editors/curves/` directory for the new curves
object, which will be necessary for many other things as well.
I added a completely new mode (`OB_MODE_SCULPT_CURVES`), because
`OB_MODE_SCULPT` seems to be rather specific to meshes, and reusing
it doesn't seem worth the trouble. The tools/brushes used in mesh vs.
curves sculpt mode are quite distinct as well.
I had to add DNA_userdef_enums.h to make the patch compile with C++
(forward declaration of enums isn't allowed). This follows the same
pattern that we use for other enums in dna.
Differential Revision: https://developer.blender.org/D14107
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_context.c | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 953c959dcd0..a0e5fc282d2 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -427,6 +427,7 @@ set(LIB bf_editor_armature bf_editor_asset bf_editor_curve + bf_editor_curves bf_editor_gizmo_library bf_editor_gpencil bf_editor_io diff --git a/source/blender/makesrna/intern/rna_context.c b/source/blender/makesrna/intern/rna_context.c index 772562d9575..bc4bd9ad3d6 100644 --- a/source/blender/makesrna/intern/rna_context.c +++ b/source/blender/makesrna/intern/rna_context.c @@ -39,6 +39,7 @@ const EnumPropertyItem rna_enum_context_mode_items[] = { {CTX_MODE_SCULPT_GPENCIL, "SCULPT_GPENCIL", 0, "Grease Pencil Sculpt", ""}, {CTX_MODE_WEIGHT_GPENCIL, "WEIGHT_GPENCIL", 0, "Grease Pencil Weight Paint", ""}, {CTX_MODE_VERTEX_GPENCIL, "VERTEX_GPENCIL", 0, "Grease Pencil Vertex Paint", ""}, + {CTX_MODE_SCULPT_CURVES, "SCULPT_CURVES", 0, "Curves Sculpt", ""}, {0, NULL, 0, NULL, NULL}, }; diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index fd39ff893f1..9c4ebf79a08 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -84,6 +84,7 @@ const EnumPropertyItem rna_enum_object_mode_items[] = { ICON_VPAINT_HLT, "Vertex Paint", "Grease Pencil Vertex Paint Strokes"}, + {OB_MODE_SCULPT_CURVES, "SCULPT_CURVES", ICON_SCULPTMODE_HLT, "Sculpt Mode", ""}, {0, NULL, 0, NULL, NULL}, }; |