Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2010-07-13 15:06:19 +0400
committerDalai Felinto <dfelinto@gmail.com>2010-07-13 15:06:19 +0400
commitf533a70a4b80e0e347dc8284382c0d13359f4bb8 (patch)
treeaa2aa6aa9047c24379ee233d140486532d10a8e9 /source/blender/makesrna/intern/rna_controller.c
parenta806a892553738db53e8e74895c678cc0d1cabeb (diff)
Logic UI: HEADERS changes:
adding option to change state + showing the name, type as label when not-expanded + renaming rna prop "states" (from state_number) + small UI changes + capitalizing Controller Type names (as we had in 2.49). Why? I'm not sure. Therefore let's stick to 2.49 way of doing it for a bit longer. * It would be really nice to have a drag&drop system for logic (instead of the move up/down button) * The controller header is so messy :/ definitively should find a better way to handle that (for one the "change state" operator doesn't need this up/down arrow. I'm (temporarly) using the old code for that, so this will wait for when we use proper rna ui here. * I wonder if it's possible to get the name of the logic type straight from the rna prop (instead of using sensor_name(sens->type) )
Diffstat (limited to 'source/blender/makesrna/intern/rna_controller.c')
-rw-r--r--source/blender/makesrna/intern/rna_controller.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/makesrna/intern/rna_controller.c b/source/blender/makesrna/intern/rna_controller.c
index a004f2d11b2..6307c39be52 100644
--- a/source/blender/makesrna/intern/rna_controller.c
+++ b/source/blender/makesrna/intern/rna_controller.c
@@ -32,12 +32,12 @@
#include "DNA_controller_types.h"
EnumPropertyItem controller_type_items[] ={
- {CONT_LOGIC_AND, "LOGIC_AND", 0, "And", "Logic And"},
- {CONT_LOGIC_OR, "LOGIC_OR", 0, "Or", "Logic Or"},
- {CONT_LOGIC_NAND, "LOGIC_NAND", 0, "Nand", "Logic Nand"},
- {CONT_LOGIC_NOR, "LOGIC_NOR", 0, "Nor", "Logic Nor"},
- {CONT_LOGIC_XOR, "LOGIC_XOR", 0, "Xor", "Logic Xor"},
- {CONT_LOGIC_XNOR, "LOGIC_XNOR", 0, "Xnor", "Logic Xnor"},
+ {CONT_LOGIC_AND, "LOGIC_AND", 0, "AND", "Logic And"},
+ {CONT_LOGIC_OR, "LOGIC_OR", 0, "OR", "Logic Or"},
+ {CONT_LOGIC_NAND, "LOGIC_NAND", 0, "NAND", "Logic Nand"},
+ {CONT_LOGIC_NOR, "LOGIC_NOR", 0, "NOR", "Logic Nor"},
+ {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", ""},
{0, NULL, 0, NULL, NULL}};
@@ -185,15 +185,15 @@ void RNA_def_controller(BlenderRNA *brna)
/* State */
// array of OB_MAX_STATES
- prop= RNA_def_property(srna, "state", 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)");
- RNA_def_property_boolean_funcs(prop, "rna_Controller_state_get", "rna_Controller_state_set");
- RNA_def_property_update(prop, NC_LOGIC, NULL);
+ //prop= RNA_def_property(srna, "state", 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)");
+ //RNA_def_property_boolean_funcs(prop, "rna_Controller_state_get", "rna_Controller_state_set");
+ //RNA_def_property_update(prop, NC_LOGIC, NULL);
// number of the state
- prop= RNA_def_property(srna, "state_number", PROP_INT, PROP_UNSIGNED);
+ prop= RNA_def_property(srna, "state", 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)");