converted more mixed tab/space indentations to tabs. only whitespace changes.
[blender.git] / source / blender / makesrna / intern / rna_controller.c
index c5a5797..92c7620 100644 (file)
@@ -1,4 +1,4 @@
-/**
+/*
  * $Id$
  *
  * ***** BEGIN GPL LICENSE BLOCK *****
  * ***** END GPL LICENSE BLOCK *****
  */
 
+/** \file blender/makesrna/intern/rna_controller.c
+ *  \ingroup RNA
+ */
+
+
 #include <stdlib.h>
 
 #include "WM_types.h"
@@ -39,7 +44,7 @@ EnumPropertyItem controller_type_items[] ={
        {CONT_LOGIC_XOR, "LOGIC_XOR", 0, "Xor", "Logic Xor"},
        {CONT_LOGIC_XNOR, "LOGIC_XNOR", 0, "Xnor", "Logic Xnor"},
        {CONT_EXPRESSION, "EXPRESSION", 0, "Expression", ""},
-       {CONT_PYTHON, "PYTHON", 0, "Python Script", ""},
+       {CONT_PYTHON, "PYTHON", 0, "Python", ""},
        {0, NULL, 0, NULL, NULL}};
 
 #ifdef RNA_RUNTIME
@@ -51,24 +56,24 @@ static struct StructRNA* rna_Controller_refine(struct PointerRNA *ptr)
        bController *controller= (bController*)ptr->data;
 
        switch(controller->type) {
-               case CONT_LOGIC_AND:
-                       return &RNA_AndController;
-               case CONT_LOGIC_OR:
-                       return &RNA_OrController;
-               case CONT_LOGIC_NAND:
-                       return &RNA_NandController;
-               case CONT_LOGIC_NOR:
-                       return &RNA_NorController;
-               case CONT_LOGIC_XOR:
-                       return &RNA_XorController;
-               case CONT_LOGIC_XNOR:
-                       return &RNA_XnorController;
-                case CONT_EXPRESSION:
-                       return &RNA_ExpressionController;
-               case CONT_PYTHON:
-                       return &RNA_PythonController;
-               default:
-                       return &RNA_Controller;
+       case CONT_LOGIC_AND:
+               return &RNA_AndController;
+       case CONT_LOGIC_OR:
+               return &RNA_OrController;
+       case CONT_LOGIC_NAND:
+               return &RNA_NandController;
+       case CONT_LOGIC_NOR:
+               return &RNA_NorController;
+       case CONT_LOGIC_XOR:
+               return &RNA_XorController;
+       case CONT_LOGIC_XNOR:
+               return &RNA_XnorController;
+       case CONT_EXPRESSION:
+               return &RNA_ExpressionController;
+       case CONT_PYTHON:
+               return &RNA_PythonController;
+       default:
+               return &RNA_Controller;
        }
 }
 
@@ -170,13 +175,13 @@ void RNA_def_controller(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Type", "");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
 
-       prop= RNA_def_property(srna, "expanded", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", CONT_SHOW);
        RNA_def_property_ui_text(prop, "Expanded", "Set controller expanded in the user interface");
        RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);     
        RNA_def_property_update(prop, NC_LOGIC, NULL);
 
-       prop= RNA_def_property(srna, "priority", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "use_priority", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", CONT_PRIO);
        RNA_def_property_ui_text(prop, "Priority", "Mark controller for execution before all non-marked controllers (good for startup scripts)");
        RNA_def_property_ui_icon(prop, ICON_BOOKMARKS, 1);
@@ -185,7 +190,7 @@ void RNA_def_controller(BlenderRNA *brna)
        /* State */
        
        // array of OB_MAX_STATES
-       //prop= RNA_def_property(srna, "state", PROP_BOOLEAN, PROP_LAYER_MEMBER);
+       //prop= RNA_def_property(srna, "states", PROP_BOOLEAN, PROP_LAYER_MEMBER);
        //RNA_def_property_array(prop, OB_MAX_STATES);
        //RNA_def_property_clear_flag(prop, PROP_EDITABLE);
        //RNA_def_property_ui_text(prop, "", "Set Controller state index (1 to 30)");
@@ -193,7 +198,7 @@ void RNA_def_controller(BlenderRNA *brna)
        //RNA_def_property_update(prop, NC_LOGIC, NULL);
 
        // number of the state
-       prop= RNA_def_property(srna, "state", PROP_INT, PROP_UNSIGNED);
+       prop= RNA_def_property(srna, "states", PROP_INT, PROP_UNSIGNED);
        RNA_def_property_int_sdna(prop, NULL, "state_mask");
        RNA_def_property_range(prop, 1, OB_MAX_STATES);
        RNA_def_property_ui_text(prop, "", "Set Controller state index (1 to 30)");
@@ -207,7 +212,6 @@ void RNA_def_controller(BlenderRNA *brna)
 
        prop= RNA_def_property(srna, "expression", PROP_STRING, PROP_NONE);
        RNA_def_property_string_sdna(prop, NULL, "str");
-       RNA_def_property_string_maxlength(prop, 127);
        RNA_def_property_ui_text(prop, "Expression", "");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
 
@@ -231,7 +235,7 @@ void RNA_def_controller(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Module", "Module name and function to run e.g. \"someModule.main\". Internal texts and external python files can be used");
        RNA_def_property_update(prop, NC_LOGIC, NULL);
 
-       prop= RNA_def_property(srna, "debug", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "use_debug", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", CONT_PY_DEBUG);
        RNA_def_property_ui_text(prop, "D", "Continuously reload the module from disk for editing external modules without restarting");
        RNA_def_property_update(prop, NC_LOGIC, NULL);