Hide Them Bones

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 03 March 2013   #1
Question Hide Them Bones

Hi all,

So I just wanted a simple button to hide/unhide bones, I searched around and have found a few good examples, however, they don't seem to work? What have I missed here, it seems pretty straight forward?!

(
		if hideByCategory.bones == true then
		(
		hideByCategory.bones = false
		)
		else
		(
		hideByCategory.bones = true
		)
)


Thanks!
 
Old 04 April 2013   #2
Originally Posted by Animare: Hi all,

So I just wanted a simple button to hide/unhide bones, I searched around and have found a few good examples, however, they don't seem to work? What have I missed here, it seems pretty straight forward?!

(
		if hideByCategory.bones == true then
		(
		hideByCategory.bones = false
		)
		else
		(
		hideByCategory.bones = true
		)
)


Thanks!


There is probably a much better way to write this but try.....

if hideByCategory.bones == false then
(
	hideByCategory.bones = true
)
else 

if hideByCategory.bones == true do
(
	hideByCategory.bones = false
)
__________________
Luke
Web site

3d Max 2012 Win 7
Intel Corei5 8g Ram

 
Old 04 April 2013   #3
Simplest possible way might be

hideByCategory.bones = NOT ( hideByCategory.bones )


Type that in the listener, select/mark the text and drag it onto a toolbar of choice. That should generate the button functionality for you.
__________________

PowerPreview: High Quality Nitrous Previews for 3ds Max 2012|2013|2014

[ Free Download (ScriptSpot) ]

Home of The Frogs | Online Portfolio
 
Old 04 April 2013   #4
why is to hide bones? they are not visible behind a mesh anyway.
are anyone still using bones in the rig?
 
Old 04 April 2013   #5
Talking

Thanks guys,

Weird things happening, when I run the code, nothing happens but when I try to click on a bone it disappears. Might just be my max, I still need to patch it to the latest hotfix! But then again with 2014 round the corner I might just wait till it comes up in my subscription.

It seems to hide the bones but no re-draw the viewport?!

Frog tried your code but it didn't seem to work either. Again does weird things.


Denis I'm using Character studio , hey you gotta make things work when you're a one man show. Is that your real pic, maxscript programmers aren't supposed to look like Die hard 3 villans?!
 
Old 04 April 2013   #6
Originally Posted by Animare: Weird things happening, when I run the code, nothing happens but when I try to click on a bone it disappears. Might just be my max, I still need to patch it to the latest hotfix!

there is some issue with screen redraw with some viewport settings.
try:

hideByCategory.bones = not hideByCategory.bones
redrawviews()
 
Old 04 April 2013   #7
Originally Posted by denisT: are anyone still using bones in the rig?


Yup. Why wouldn't you?
__________________
Paul Neale
http://paulneale.com
 
Old 04 April 2013   #8
Originally Posted by PEN: Yup. Why wouldn't you?

let's talk about 'bones' what hidebycategory hides... a 'bone' in this case is any geometry superclass object with boneEnable inode property set to ON.
so using this 'bone' i have two limitations (geometry and boneEnable set on) and one very questionable advantage (any).
that's #1
#2 any geometry in wire mode renders slower in viewport than a helper (dummy, point...)
#3 when i debug my own rig i like to havesolid'classic bone' preview for bones, but my animators who make animation like a la motion builder (maya) 'picker' style controls (wire). so my rig 'bone' has to have two (or maybe more) different previews.
the only one class can solve these problems it's... the scripted manipulator. or a custom class that extends the scripted manipuator. the last thing i use as a rig bone object.

Last edited by denisT : 04 April 2013 at 01:46 AM.
 
Old 04 April 2013   #9
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 02:57 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.