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-08-22 09:16:55 +0300
committerJoshua Leung <aligorith@gmail.com>2015-08-22 09:16:55 +0300
commit4d146bdf13090008e6d3c552eb2fadc12c206369 (patch)
tree54ed5fcbd27011b7f31df2a61b048477fb969485 /source/blender/makesrna/intern/rna_action.c
parent79e3a27c7a4b16fe3b55c5f2b3500f9e2e8bae16 (diff)
Fix T45689: Pose Libraries cannot be used when using lib-linked actions as poselibs
This commit makes some tweaks that make it at least possible to use lib-linked actions as Pose Libraries. Specifically: * The apply poses button is no longer greyed out * It is possible to select different poses from the list of poses * All pose library operators which edit the poses stored in the poselib now have improved poll callbacks which perform extra checks for lib-linked actions (which cannot be edited, as all those changes will be lost) Caveats: * Due to the way the UI list template works, it doesn't seem to be possible to make it not grey out the items in the list. (While the double-click to rename thing shouldn't be allowed, items should at least look like they can be clicked on) * The difference between clickable vs not-clickable isn't too great, making it hard to tell that that while the Add/Remove/Sanitise toggles are not usable, the Apply Poses is actually functional. But, this is a more of a UI-toolbox level issue
Diffstat (limited to 'source/blender/makesrna/intern/rna_action.c')
-rw-r--r--source/blender/makesrna/intern/rna_action.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index 424e2004749..b8a490ea904 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -650,13 +650,14 @@ static void rna_def_action_pose_markers(BlenderRNA *brna, PropertyRNA *cprop)
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "TimelineMarker");
- RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_flag(prop, PROP_EDITABLE | PROP_LIB_EXCEPTION);
RNA_def_property_pointer_funcs(prop, "rna_Action_active_pose_marker_get",
"rna_Action_active_pose_marker_set", NULL, NULL);
RNA_def_property_ui_text(prop, "Active Pose Marker", "Active pose marker for this action");
prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "active_marker");
+ RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
RNA_def_property_int_funcs(prop, "rna_Action_active_pose_marker_index_get",
"rna_Action_active_pose_marker_index_set", "rna_Action_active_pose_marker_index_range");
RNA_def_property_ui_text(prop, "Active Pose Marker Index", "Index of active pose marker");
@@ -688,6 +689,7 @@ static void rna_def_action(BlenderRNA *brna)
prop = RNA_def_property(srna, "pose_markers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "markers", NULL);
RNA_def_property_struct_type(prop, "TimelineMarker");
+ RNA_def_property_flag(prop, PROP_LIB_EXCEPTION); /* T45689 - so that the list isn't greyed out; adding/removing is still banned though */
RNA_def_property_ui_text(prop, "Pose Markers", "Markers specific to this action, for labeling poses");
rna_def_action_pose_markers(brna, prop);