Shortcut for hide bone object toggle


Hi, this is a simple question: how can I assign a shortcut for hide bone object toggle, since it is not listed in the action list. Any ideas?

Thanks in advance. :slight_smile:


macroScript sc_toggleBoneDisplay
Buttontext:"Toggle Bone Display"
tooltip:"Toggle Bone Display"

	on execute do
		case of
			(hideByCategory.bones == true): (hideByCategory.bones = false)
			(hideByCategory.bones == false): (hideByCategory.bones = true)


Thanks a lot, works great! I assigned to shift+b as I think it should be by default. :smiley:


Just for the record: it’d be cleaner to do it like this:

[color=#007700][color=#fffffe]on execute do (
hideByCategory.bones = (not hideByCategory.bones);



Good to know. Still learning by (ab)using other peoples code.


I thought I’d add this little tidbit:

on execute do hideByCategory.bones = (not hideByCategory.bones)
on isChecked return hideByCategory.bones

This way when used in a quad menu or toolbar you get visual feedback to the state of the toggle, just like the other built-in toggles.


This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.