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:
authorJulian Eisel <julian@blender.org>2022-04-06 18:06:23 +0300
committerJulian Eisel <julian@blender.org>2022-04-06 19:30:51 +0300
commitd8a9bcea6ce5a64f7bac43c0d7e78707b2f64b13 (patch)
treed5994461f71c2fc265adcdab512140c385206add
parentc14ed182f516cf723b88603a3282d692ba631feb (diff)
Fix F-Curve visibility toggle disabled for library overridden rig
When showing an action data-block added to a library overridden object in the Graph Editor, the visibility toggles would be disabled. Toggling the visibility should be possible still and works with the shortcuts, just the button was incorrectly disabled. Also added the usual disabled hint for the tooltip. Differential Revision: https://developer.blender.org/D14568 Reviewed by: Bastien Montagne
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index ed0befbcc24..ead189c0389 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -51,6 +51,7 @@
#include "BKE_curve.h"
#include "BKE_gpencil.h"
#include "BKE_key.h"
+#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_nla.h"
@@ -5117,11 +5118,11 @@ static void draw_setting_widget(bAnimContext *ac,
break;
}
- if ((ale->fcurve_owner_id != NULL &&
- (ID_IS_LINKED(ale->fcurve_owner_id) || ID_IS_OVERRIDE_LIBRARY(ale->fcurve_owner_id))) ||
- (ale->id != NULL && (ID_IS_LINKED(ale->id) || ID_IS_OVERRIDE_LIBRARY(ale->id)))) {
+ if ((ale->fcurve_owner_id != NULL && !BKE_id_is_editable(ac->bmain, ale->fcurve_owner_id)) ||
+ (ale->fcurve_owner_id == NULL && ale->id != NULL &&
+ !BKE_id_is_editable(ac->bmain, ale->id))) {
if (setting != ACHANNEL_SETTING_EXPAND) {
- UI_but_flag_enable(but, UI_BUT_DISABLED);
+ UI_but_disable(but, TIP_("Can't edit this property from a linked data-block"));
}
}
}