synched with trunk at revision 36569
[blender.git] / source / blender / editors / space_logic / logic_window.c
index bce492f..e09f9cf 100644 (file)
@@ -718,6 +718,8 @@ static const char *actuator_name(int type)
                return "State";
        case ACT_ARMATURE:
                return "Armature";
+       case ACT_STEERING:
+               return "Steering";              
        }
        return "unknown";
 }
@@ -4364,6 +4366,48 @@ static void draw_actuator_visibility(uiLayout *layout, PointerRNA *ptr)
        uiItemR(row, ptr, "apply_to_children", 0, NULL, ICON_NONE);
 }
 
+static void draw_actuator_steering(uiLayout *layout, PointerRNA *ptr)
+{
+       uiLayout *row;
+       uiLayout *col;
+
+       uiItemR(layout, ptr, "mode", 0, NULL, 0);
+       uiItemR(layout, ptr, "target", 0, NULL, 0);
+       uiItemR(layout, ptr, "navmesh", 0, NULL, 0);    
+
+       row = uiLayoutRow(layout, 0);
+       uiItemR(row, ptr, "distance", 0, NULL, 0);
+       uiItemR(row, ptr, "velocity", 0, NULL, 0);
+       row = uiLayoutRow(layout, 0);
+       uiItemR(row, ptr, "acceleration", 0, NULL, 0);
+       uiItemR(row, ptr, "turn_speed", 0, NULL, 0);
+
+       row = uiLayoutRow(layout, 0);
+       col = uiLayoutColumn(row, 0);
+       uiItemR(col, ptr, "facing", 0, NULL, 0);
+       col = uiLayoutColumn(row, 0);
+       uiItemR(col, ptr, "facing_axis", 0, NULL, 0);
+       if (!RNA_boolean_get(ptr, "facing"))
+       {
+               uiLayoutSetActive(col, 0);
+       }
+       col = uiLayoutColumn(row, 0);
+       uiItemR(col, ptr, "normal_up", 0, NULL, 0);
+       if (!RNA_pointer_get(ptr, "navmesh").data)
+       {
+               uiLayoutSetActive(col, 0);
+       }
+
+       row = uiLayoutRow(layout, 0);
+       uiItemR(row, ptr, "self_terminated", 0, NULL, 0);
+       if (RNA_enum_get(ptr, "mode")==ACT_STEERING_PATHFOLLOWING)
+       {
+               uiItemR(row, ptr, "update_period", 0, NULL, 0); 
+               row = uiLayoutRow(layout, 0);
+       }
+       uiItemR(row, ptr, "show_visualization", 0, NULL, 0);    
+}
+
 static void draw_brick_actuator(uiLayout *layout, PointerRNA *ptr, bContext *C)
 {
        uiLayout *box;
@@ -4428,6 +4472,8 @@ static void draw_brick_actuator(uiLayout *layout, PointerRNA *ptr, bContext *C)
                case ACT_VISIBILITY:
                        draw_actuator_visibility(box, ptr);
                        break;
+               case ACT_STEERING:
+                       draw_actuator_steering(box, ptr);
        }
 }