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:
authorJoshua Leung <aligorith@gmail.com>2015-02-13 16:48:36 +0300
committerJoshua Leung <aligorith@gmail.com>2015-02-14 14:06:18 +0300
commitec2ede430231ef7f32e76f0626f76a9733ee1b72 (patch)
tree54fb287a3725b58729b312e102a01c2f15dcef9e /source/blender/makesrna/intern/rna_actuator.c
parentdde0765de2bf61afc063650159b6274ffe407b0a (diff)
Bugfix: Referencing actions from Action Actuator was not setting a user
This reverts the change made in 8872cba7e956a9d9a840e55e5323945497524795 which was contributing to actions being lost in some cases [1], even when they were assigned to those actuaters, which needed them to be able to function. Now there's one less case where users are needed but were missing :) Note that this still doesn't solve the core issue where nothing is responsible for associating actions created for a particular datablock (and not currently being used in its active action slot, or in the NLA stack) with that datablock. That issue is the cause of most action disappearances as well as for other problems (such as renaming bones being unable to fix unreferenced/unused actions) where there are diifferences between users' mental models and the data model. Proper fixes are coming soon (restoring fake users here isn't a proper fix, as it only masks the fundamental mismatch/problem here). [1] http://blenderartists.org/forum/showthread.php?357021-BGE-loses-actions
Diffstat (limited to 'source/blender/makesrna/intern/rna_actuator.c')
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index 691a7432275..6f2c968764c 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -531,14 +531,6 @@ static void rna_Actuator_editobject_mesh_set(PointerRNA *ptr, PointerRNA value)
eoa->me = value.data;
}
-static void rna_Actuator_action_action_set(PointerRNA *ptr, PointerRNA value)
-{
- bActuator *act = (bActuator *)ptr->data;
- bActionActuator *aa = (bActionActuator *) act->data;
-
- aa->act = value.data;
-}
-
#else
static void rna_def_actuator(BlenderRNA *brna)
@@ -618,10 +610,8 @@ static void rna_def_action_actuator(BlenderRNA *brna)
prop = RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "act");
RNA_def_property_struct_type(prop, "Action");
- RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT);
RNA_def_property_ui_text(prop, "Action", "");
- /* note: custom set function is ONLY to avoid rna setting a user for this. */
- RNA_def_property_pointer_funcs(prop, NULL, "rna_Actuator_action_action_set", NULL, NULL);
RNA_def_property_update(prop, NC_LOGIC, NULL);
prop = RNA_def_property(srna, "use_continue_last_frame", PROP_BOOLEAN, PROP_NONE);