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/object/object_edit.c | |
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/object/object_edit.c')
-rw-r--r-- | source/blender/editors/object/object_edit.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 12edb3e8edb..c9492d8f683 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -1676,10 +1676,6 @@ static EnumPropertyItem game_properties_copy_operations[] = { {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem gameprops_items[] = { - {0, NULL, 0, NULL, NULL} -}; - static EnumPropertyItem *gameprops_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free) { Object *ob = ED_object_active_context(C); @@ -1689,7 +1685,7 @@ static EnumPropertyItem *gameprops_itemf(bContext *C, PointerRNA *UNUSED(ptr), P int a, totitem = 0; if (!ob) - return gameprops_items; + return DummyRNA_NULL_items; for (a = 1, prop = ob->prop.first; prop; prop = prop->next, a++) { tmp.value = a; @@ -1760,7 +1756,7 @@ void OBJECT_OT_game_property_copy(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_enum(ot->srna, "operation", game_properties_copy_operations, 3, "Operation", ""); - prop = RNA_def_enum(ot->srna, "property", gameprops_items, 0, "Property", "Properties to copy"); + prop = RNA_def_enum(ot->srna, "property", DummyRNA_NULL_items, 0, "Property", "Properties to copy"); RNA_def_property_flag(prop, PROP_SKIP_SAVE); RNA_def_enum_funcs(prop, gameprops_itemf); ot->prop = prop; |