Visablity contoler roll out window

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 11 November 2012   #1
Visablity contoler roll out window

Hey guys, I'm ok with max scripting im trying to make a roll-out with slider or spinners that can be keyed with a value of 0-1 to animate the viability of objects. all i would need is one working i could do the rest to adapted it. many thanks

Cheers

basically it would look like this



Eyes"
left
right
up
down
Mouth:
open
close
quarter
and so on
 
Old 11 November 2012   #2
Take a look at the checkbox UI control, it gives you an easy on/off binary function.

For the visibility, are you speaking of hiding it from view in the viewport? Or making it unrenderable. If you are trying to make it go away from the viewport, you simple need to hide it

hide $object
unhide $object


If you would like to still see the object but have it unrenderable, you need to edit it's renderable property.

$object.renderable = off
__________________
www.TaylorAnimated.com
 
Old 11 November 2012   #3
Originally Posted by thehive: Hey guys, I'm ok with max scripting im trying to make a roll-out with slider or spinners that can be keyed with a value of 0-1 to animate the viability of objects. all i would need is one working i could do the rest to adapted it. many thanks

simply set the spinner (slider) controller property to corresponding node visibility controller.
 
Old 11 November 2012   #4
I would if i can get the max listener to work it wont display anything
 
Old 11 November 2012   #5
Some how i got Reaction manager to work correctly, its still wonky as it display odd number then goes back to normal . i really wish they would make this a bit more easier to use an stable to use its not like they cant look to see how mayas SDKs work
 
Old 11 November 2012   #6
here is a way how it can be done. (i personally prefer to add CA to baseobject and use the wiring instead of the instancing controllers but most of developers like to do the things how i show below):

   delete objects
 global visAttr = attributes visAttr
 (
 	parameters main rollout:main
 	(
 		R_Eye_Open type:#float default:1 ui:(ui_R_Eye_Open_sl, ui_R_Eye_Open_sp)
 		R_Eye_Close type:#float default:0 ui:(ui_R_Eye_Close_sl, ui_R_Eye_Close_sp) 
 	)
 	rollout main "Parameters"
 	(
 		group "Right Eye: "
 		(
 			label lb_R_Eye_Open "Open" align:#left
 			slider ui_R_Eye_Open_sl range:[0,1,0] ticks:0 width:90 align:#left offset:[0,-2] across:2
 			spinner ui_R_Eye_Open_sp range:[0,1,0] type:#float scale:0.01 fieldwidth:40 align:#right offset:[0,0]
 			label lb_R_Eye_Close "Close" align:#left
 			slider ui_R_Eye_Close_sl range:[0,1,0] ticks:0 width:90 align:#left offset:[0,-2] across:2
 			spinner ui_R_Eye_Close_sp range:[0,1,0] type:#float scale:0.01 fieldwidth:40 align:#right offset:[0,0]
 		)
 	)
 )
 at time 0, undo off, redraw off, animate off
 (
 	max create mode
 	Head = plane name:"Head" width:40 length:40 widthsegs:1 lengthsegs:1 pos:[0,10,0] wirecolor:orange
 
 	R_Eye_Open = plane name:"R_Eye_Open" width:10 length:10 widthsegs:1 lengthsegs:1 pos:[-10,20,1] wirecolor:green
 	R_Eye_Close = plane name:"R_Eye_Close" width:10 length:10 widthsegs:1 lengthsegs:1 pos:[-10,20,1] wirecolor:(green*0.5)
 
 	L_Eye_Open = plane name:"L_Eye_Open" width:10 length:10 widthsegs:1 lengthsegs:1 pos:[10,20,1] wirecolor:blue
 
 	#(R_Eye_Open, R_Eye_Close, L_Eye_Open).parent = Head
 	Head.transform = translate ((eulerangles 90 0 0) as matrix3) [0,0,20]
 	
 	modi = EmptyModifier name:"Face Control"
 	custattributes.add modi visAttr
 
 	R_Eye_Open.visibility = Bezier_Float()
 	modi.R_Eye_Open.controller = R_Eye_Open.visibility.controller
 	modi.R_Eye_Open = 1
 	R_Eye_Close.visibility = Bezier_Float()
 	modi.R_Eye_Close.controller = R_Eye_Close.visibility.controller
 	
 	max modify mode
 	select Head
 	addmodifier Head modi
 	modpanel.setcurrentobject modi
 )
   


also the sample shows how to use both slider and spinner to control the same parameter

Last edited by denisT : 11 November 2012 at 03:43 PM.
 
Old 11 November 2012   #7
oh sweet thanks ill mess with this, much appreciated
 
Old 11 November 2012   #8
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 12:19 PM.


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