diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2010-05-07 06:37:05 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2010-05-07 06:37:05 +0400 |
commit | d559cf97bb4e21c988aa9a7f7acbcfa5277634bd (patch) | |
tree | 7cf0b77d09c777a1f4e2ca2236657ba9ca3bc03c /source/blender | |
parent | f259da614193c762db2f1530d8fc3a8971c43535 (diff) |
Logic UI: small fixes: order of sensor type enum + state actuator showing used states now
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_logic/logic_window.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_sensor.c | 8 |
2 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c index 90f60dfaad9..b320d5afad1 100644 --- a/source/blender/editors/space_logic/logic_window.c +++ b/source/blender/editors/space_logic/logic_window.c @@ -4171,10 +4171,14 @@ static void draw_actuator_sound(uiLayout *layout, PointerRNA *ptr, bContext *C) static void draw_actuator_state(uiLayout *layout, PointerRNA *ptr) { uiLayout *split; + Object *ob = (Object *)ptr->id.data; + PointerRNA settings_ptr; + RNA_pointer_create((ID *)ob, &RNA_GameObjectSettings, ob, &settings_ptr); + split = uiLayoutSplit(layout, 0.35, 0); uiItemR(split, ptr, "operation", 0, NULL, 0); - uiTemplateLayers(split, ptr, "state", NULL, NULL, 0); + uiTemplateLayers(split, ptr, "state", &settings_ptr, "used_state", 0); } static void draw_actuator_visibility(uiLayout *layout, PointerRNA *ptr) diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c index c8407dfced2..a8524a506bc 100644 --- a/source/blender/makesrna/intern/rna_sensor.c +++ b/source/blender/makesrna/intern/rna_sensor.c @@ -125,7 +125,6 @@ EnumPropertyItem *rna_Sensor_type_itemf(bContext *C, PointerRNA *ptr, int *free) RNA_enum_items_add_value(&item, &totitem, sensor_type_items, SENS_ARMATURE); } else if(ob->type==OB_MESH) { RNA_enum_items_add_value(&item, &totitem, sensor_type_items, SENS_COLLISION); - RNA_enum_items_add_value(&item, &totitem, sensor_type_items, SENS_TOUCH); } } @@ -139,7 +138,12 @@ EnumPropertyItem *rna_Sensor_type_itemf(bContext *C, PointerRNA *ptr, int *free) RNA_enum_items_add_value(&item, &totitem, sensor_type_items, SENS_RADAR); RNA_enum_items_add_value(&item, &totitem, sensor_type_items, SENS_RANDOM); RNA_enum_items_add_value(&item, &totitem, sensor_type_items, SENS_RAY); -// RNA_enum_items_add_value(&item, &totitem, sensor_type_items, SENS_TOUCH); + + if (ob != NULL) { + if(ob->type==OB_MESH) { + RNA_enum_items_add_value(&item, &totitem, sensor_type_items, SENS_TOUCH); + } + } RNA_enum_item_end(&item, &totitem); *free= 1; |