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:
authorMitchell Stokes <mogurijin@gmail.com>2011-07-03 05:59:17 +0400
committerMitchell Stokes <mogurijin@gmail.com>2011-07-03 05:59:17 +0400
commit5f4f75c51a511f4f190c16eedfc4c04c3b9aa387 (patch)
tree9c226d26639fdeb1c4b546183f4178979e7b93cb /source/blender
parent8c3f2923fdc0626d4c2e7f6307c1ec4fd0e8c7f3 (diff)
BGE Animations: Adding in layer weights to allow for layer blending.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/space_logic/logic_window.c1
-rw-r--r--source/blender/makesdna/DNA_actuator_types.h3
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c5
3 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c
index c1fc27eb9f3..882d89fcd33 100644
--- a/source/blender/editors/space_logic/logic_window.c
+++ b/source/blender/editors/space_logic/logic_window.c
@@ -3713,6 +3713,7 @@ static void draw_actuator_action(uiLayout *layout, PointerRNA *ptr)
row= uiLayoutRow(layout, 0);
uiItemR(row, ptr, "layer", 0, NULL, ICON_NONE);
+ uiItemR(row, ptr, "layer_weight", 0, NULL, ICON_NONE);
row= uiLayoutRow(layout, 0);
uiItemPointerR(layout, ptr, "frame_property", &settings_ptr, "properties", NULL, ICON_NONE);
diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h
index 071f66cddd6..93db8340aac 100644
--- a/source/blender/makesdna/DNA_actuator_types.h
+++ b/source/blender/makesdna/DNA_actuator_types.h
@@ -59,8 +59,9 @@ typedef struct bActionActuator {
short layer; /* Animation layer */
short end_reset; /* Ending the actuator (negative pulse) wont reset the the action to its starting frame */
short strideaxis; /* Displacement axis */
- short pad[3];
+ short pad;
float stridelength; /* Displacement incurred by cycle */ // not in use
+ float layer_weight; /* How much of the previous layer to use for blending. (<0 = disable, 0 = add mode) */
} bActionActuator;
typedef struct Sound3D
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index ebda1b82e8a..3c44720d469 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -631,6 +631,11 @@ static void rna_def_action_actuator(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Layer", "The animation layer to play the action on");
RNA_def_property_update(prop, NC_LOGIC, NULL);
+ prop= RNA_def_property(srna, "layer_weight", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, 0.0, 1.0);
+ RNA_def_property_ui_text(prop, "Layer Weight", "How much of the previous layer to blend into this one (0 = add mode)");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
prop= RNA_def_property(srna, "frame_property", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "frameProp");
RNA_def_property_ui_text(prop, "Frame Property", "Assign the action's current frame number to this property");