Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2010-05-19 13:40:45 +0400
committerDalai Felinto <dfelinto@gmail.com>2010-05-19 13:40:45 +0400
commita7a9862cc928049bee3cf10685759144b1cc67c2 (patch)
tree9de7e53bf006171383eb3dd0a88561191c11032e /source/blender/makesrna/intern/rna_actuator.c
parent2d343d0774b2ff53894d17cb791ef7efc4332a93 (diff)
Logic UI and Operators: adjusts on Layout + copy properties operator + fix on copy logic bricks operator (and moved to OBJECT_OT)
* adjusts on Layout: - in order to avoid much changes when copying Logics, it's nice to have the logic s/c/a always displaying even though it's not valid (e.g. edit mesh used from a camera object). Now a message shows in the s/c/a alerting to the problem. * logic operators under OBJECT_OT - copy properties and logics Matt, is it possible to have the object game properties listed as a submenu from "Copy Properties" ? So from the "Copy Game Property" menu we would have three options: "Copy a property" -> (submenu) prop1, prop2, prop3 "Replace all Properties" "Merge all Properties" For the current task list in Logic Editor: http://www.pasteall.org/13245
Diffstat (limited to 'source/blender/makesrna/intern/rna_actuator.c')
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c41
1 files changed, 9 insertions, 32 deletions
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index 5f802fd47f1..e9da96e0960 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -56,14 +56,6 @@ EnumPropertyItem actuator_type_items[] ={
{ACT_VISIBILITY, "VISIBILITY", 0, "Visibility", ""},
{0, NULL, 0, NULL, NULL}};
-EnumPropertyItem edit_object_type_items[] ={
- {ACT_EDOB_ADD_OBJECT, "ADDOBJECT", 0, "Add Object", ""},
- {ACT_EDOB_END_OBJECT, "ENDOBJECT", 0, "End Object", ""},
- {ACT_EDOB_REPLACE_MESH, "REPLACEMESH", 0, "Replace Mesh", ""},
- {ACT_EDOB_TRACK_TO, "TRACKTO", 0, "Track to", ""},
- {ACT_EDOB_DYNAMICS, "DYNAMICS", 0, "Dynamics", ""},
- {0, NULL, 0, NULL, NULL} };
-
#ifdef RNA_RUNTIME
#include "BKE_sca.h"
@@ -346,28 +338,6 @@ static void rna_StateActuator_state_set(PointerRNA *ptr, const int *values)
}
}
-static EnumPropertyItem *rna_EditObjectActuator_mode_itemf(bContext *C, PointerRNA *ptr, int *free)
-{
- EnumPropertyItem *item= NULL;
- Object *ob = (Object *)ptr->id.data;
-
- int totitem= 0;
- if (ob->type!=OB_ARMATURE)
- {
- RNA_enum_items_add_value(&item, &totitem, edit_object_type_items, ACT_EDOB_REPLACE_MESH);
- RNA_enum_items_add_value(&item, &totitem, edit_object_type_items, ACT_EDOB_DYNAMICS);
- }
-
- RNA_enum_items_add_value(&item, &totitem, edit_object_type_items, ACT_EDOB_ADD_OBJECT);
- RNA_enum_items_add_value(&item, &totitem, edit_object_type_items, ACT_EDOB_END_OBJECT);
- RNA_enum_items_add_value(&item, &totitem, edit_object_type_items, ACT_EDOB_TRACK_TO);
-
- RNA_enum_item_end(&item, &totitem);
- *free= 1;
-
- return item;
-}
-
/* Always keep in alphabetical order */
EnumPropertyItem *rna_Actuator_type_itemf(bContext *C, PointerRNA *ptr, int *free)
{
@@ -1209,14 +1179,21 @@ static void rna_def_edit_object_actuator(BlenderRNA *brna)
{ACT_EDOB_SET_MASS, "SETMASS", 0, "Set Mass", ""},
{0, NULL, 0, NULL, NULL} };
+ static EnumPropertyItem prop_type_items[] ={
+ {ACT_EDOB_ADD_OBJECT, "ADDOBJECT", 0, "Add Object", ""},
+ {ACT_EDOB_END_OBJECT, "ENDOBJECT", 0, "End Object", ""},
+ {ACT_EDOB_REPLACE_MESH, "REPLACEMESH", 0, "Replace Mesh", ""},
+ {ACT_EDOB_TRACK_TO, "TRACKTO", 0, "Track to", ""},
+ {ACT_EDOB_DYNAMICS, "DYNAMICS", 0, "Dynamics", ""},
+ {0, NULL, 0, NULL, NULL} };
+
srna= RNA_def_struct(brna, "EditObjectActuator", "Actuator");
RNA_def_struct_ui_text(srna, "Edit Object Actuator", "Actuator used to edit objects");
RNA_def_struct_sdna_from(srna, "bEditObjectActuator", "data");
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
- RNA_def_property_enum_items(prop, edit_object_type_items);
- RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_EditObjectActuator_mode_itemf");
+ RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Edit Object", "The mode of the actuator");
RNA_def_property_update(prop, NC_LOGIC, NULL);