Logic UI: small fixes: order of sensor type enum + state actuator showing used states now
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user