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
path: root/source
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2010-05-15 03:09:55 +0400
committerDalai Felinto <dfelinto@gmail.com>2010-05-15 03:09:55 +0400
commit6d7a58669734b8b6cc13127e22111a51dd09fdb3 (patch)
tree01d8e7935dd61d9259ea71fbd025ec55782ca4e0 /source
parentcd6332ca1ef3eab73a9db312ba7a790902391c4b (diff)
Logic UI: setting all State temporarly to 1 when clicking in ALL (so it's more informative I think)
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c2
-rw-r--r--source/blender/makesrna/intern/rna_object.c13
2 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index b3800b2d68d..5f802fd47f1 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -1834,7 +1834,7 @@ static void rna_def_armature_actuator(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Secondary Target", "Set weight of this constraint");
RNA_def_property_update(prop, NC_LOGIC, NULL);
- prop= RNA_def_property(srna, "weight", PROP_FLOAT, PROP_PERCENTAGE);
+ prop= RNA_def_property(srna, "weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "weight");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Weight", "Set weight of this constraint");
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 95f142d299d..93a133bf380 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -859,6 +859,17 @@ static void rna_Base_layer_set(PointerRNA *ptr, const int *values)
/* rna_Base_layer_update updates the objects layer */
}
+static void rna_GameObjectSettings_state_get(PointerRNA *ptr, int *values)
+{
+ Object *ob= (Object*)ptr->data;
+ int i;
+ int all_states = (ob->scaflag & OB_ALLSTATE?1:0);
+
+ memset(values, 0, sizeof(int)*OB_MAX_STATES);
+ for(i=0; i<OB_MAX_STATES; i++)
+ values[i] = (ob->state & (1<<i)) | all_states;
+}
+
static void rna_GameObjectSettings_state_set(PointerRNA *ptr, const int *values)
{
Object *ob= (Object*)ptr->data;
@@ -1257,7 +1268,7 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "state", 1);
RNA_def_property_array(prop, OB_MAX_STATES);
RNA_def_property_ui_text(prop, "State", "State determining which controllers are displayed");
- RNA_def_property_boolean_funcs(prop, NULL, "rna_GameObjectSettings_state_set");
+ RNA_def_property_boolean_funcs(prop, "rna_GameObjectSettings_state_get", "rna_GameObjectSettings_state_set");
prop= RNA_def_property(srna, "used_state", PROP_BOOLEAN, PROP_LAYER_MEMBER);
RNA_def_property_array(prop, OB_MAX_STATES);