diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-12-22 05:08:42 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-12-22 05:08:42 +0400 |
commit | 2a5cabb039faf8a4f39a5dbe0edc0497a4f72b63 (patch) | |
tree | 27f63aa843429457bfacc67ac7698f11674538f0 /source/blender/editors/mesh | |
parent | 78e688b71ced5ea4f34cfc4b3d913cfebaedd461 (diff) |
code cleanup and minor changes
- use DummyRNA_NULL_items to replace empty enums.
- replace calloc with malloc in copy_dverts since its copied over after.
- add wmGesture->userdata, so operators that use gestures have somewhere to store their own data (not used yet).
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 4fcec28a26b..a1978f110ac 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -40,6 +40,7 @@ #include "RNA_define.h" #include "RNA_access.h" +#include "RNA_enum_types.h" #include "BLI_blenlib.h" #include "BLI_noise.h" @@ -2528,7 +2529,6 @@ static void edbm_blend_from_shape_ui(bContext *C, wmOperator *op) void MESH_OT_blend_from_shape(wmOperatorType *ot) { PropertyRNA *prop; - static EnumPropertyItem shape_items[] = {{0, NULL, 0, NULL, NULL}}; /* identifiers */ ot->name = "Blend From Shape"; @@ -2545,7 +2545,7 @@ void MESH_OT_blend_from_shape(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - prop = RNA_def_enum(ot->srna, "shape", shape_items, 0, "Shape", "Shape key to use for blending"); + prop = RNA_def_enum(ot->srna, "shape", DummyRNA_NULL_items, 0, "Shape", "Shape key to use for blending"); RNA_def_enum_funcs(prop, shape_itemf); RNA_def_float(ot->srna, "blend", 1.0f, -FLT_MAX, FLT_MAX, "Blend", "Blending factor", -2.0f, 2.0f); RNA_def_boolean(ot->srna, "add", 1, "Add", "Add rather than blend between shapes"); |