Tweak for dfelinto, logic ui
This commit is contained in:
@@ -3651,8 +3651,13 @@ static void draw_actuator_message(uiLayout *layout, PointerRNA *ptr)
|
||||
static void draw_actuator_motion(uiLayout *layout, PointerRNA *ptr)
|
||||
{
|
||||
uiLayout *split, *row, *col, *subcol;
|
||||
Object *ob = (Object *)ptr->id.data;
|
||||
PointerRNA settings_ptr;
|
||||
|
||||
RNA_pointer_create((ID *)ob, &RNA_GameObjectSettings, ob, &settings_ptr);
|
||||
|
||||
uiItemR(layout, ptr, "mode", 0, NULL, 0);
|
||||
|
||||
|
||||
switch (RNA_enum_get(ptr, "mode")) {
|
||||
case ACT_OBJECT_NORMAL:
|
||||
split = uiLayoutSplit(layout, 0.9, 0);
|
||||
@@ -3662,11 +3667,10 @@ static void draw_actuator_motion(uiLayout *layout, PointerRNA *ptr)
|
||||
split = uiLayoutSplit(layout, 0.9, 0);
|
||||
uiItemR(split, ptr, "rot", 0, NULL, 0);
|
||||
uiItemR(split, ptr, "local_rotation", UI_ITEM_R_TOGGLE, NULL, 0);
|
||||
|
||||
// Matt, how to check for ob->gameflag here? Do we need to pass the obj through the drawing function only for that?
|
||||
// if ((ob->gameflag & OB_DYNAMIC)==0)
|
||||
// break;
|
||||
|
||||
|
||||
if (RNA_enum_get(&settings_ptr, "physics_type") != OB_BODY_TYPE_DYNAMIC)
|
||||
break;
|
||||
|
||||
split = uiLayoutSplit(layout, 0.9, 0);
|
||||
uiItemR(split, ptr, "force", 0, NULL, 0);
|
||||
uiItemR(split, ptr, "local_force", UI_ITEM_R_TOGGLE, NULL, 0);
|
||||
|
||||
@@ -195,6 +195,9 @@ static void logic_listener(ARegion *ar, wmNotifier *wmn)
|
||||
{
|
||||
/* context changes */
|
||||
switch(wmn->category) {
|
||||
case NC_LOGIC:
|
||||
ED_region_tag_redraw(ar);
|
||||
break;
|
||||
case NC_SCENE:
|
||||
switch(wmn->data) {
|
||||
case ND_FRAME:
|
||||
|
||||
@@ -1128,6 +1128,7 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
|
||||
RNA_def_property_enum_items(prop, body_type_items);
|
||||
RNA_def_property_enum_funcs(prop, "rna_GameObjectSettings_physics_type_get", "rna_GameObjectSettings_physics_type_set", NULL);
|
||||
RNA_def_property_ui_text(prop, "Physics Type", "Selects the type of physical representation");
|
||||
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
||||
|
||||
prop= RNA_def_property(srna, "actor", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_ACTOR);
|
||||
|
||||
Reference in New Issue
Block a user