[Bf-blender-cvs] [b79c898] blender-v2.75-release: Fix: Don't show "Clear Keyframes" option in RMB menu for NLA Strip properties

Joshua Leung noreply at git.blender.org
Thu Jun 18 17:36:55 CEST 2015


Commit: b79c898bd683279a58644bc30a64d05593d1680f
Author: Joshua Leung
Date:   Sun Jun 14 01:21:02 2015 +1200
Branches: blender-v2.75-release
https://developer.blender.org/rBb79c898bd683279a58644bc30a64d05593d1680f

Fix: Don't show "Clear Keyframes" option in RMB menu for NLA Strip properties

Since these FCurves for these properties cannot be deleted, this operator is useless
in this case.

===================================================================

M	source/blender/editors/interface/interface_handlers.c

===================================================================

diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 59a06b3..c911e6c 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -6532,7 +6532,7 @@ static bool ui_but_menu(bContext *C, uiBut *but)
 			}
 		}
 		
-		if (but->flag & UI_BUT_ANIMATED) {
+		if ((but->flag & UI_BUT_ANIMATED) && (but->rnapoin.type != &RNA_NlaStrip)) {
 			if (is_array_component) {
 				uiItemBooleanO(layout, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Clear Keyframes"),
 				               ICON_NONE, "ANIM_OT_keyframe_clear_button", "all", 1);




More information about the Bf-blender-cvs mailing list