CGTalk > Software > Autodesk 3ds max > 3dsMax SDK and MaxScript
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 11-19-2012, 03:58 AM   #1
thehive
Expert
portfolio
Eric Robert
animator/ illustrator
work/\holic Studios.com
Orlando, United States
 
Join Date: Feb 2005
Posts: 1,687
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-19-2012, 08:50 PM   #2
TaylorAnimated
New Member
 
TaylorAnimated's Avatar
portfolio
Michael Taylor
Oakville, Canada
 
Join Date: Oct 2011
Posts: 22
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

Code:
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.

Code:
$object.renderable = off
__________________
www.TaylorAnimated.com
 
Old 11-19-2012, 09:02 PM   #3
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,431
Send a message via ICQ to denisT
Quote:
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-20-2012, 03:52 AM   #4
thehive
Expert
portfolio
Eric Robert
animator/ illustrator
work/\holic Studios.com
Orlando, United States
 
Join Date: Feb 2005
Posts: 1,687
I would if i can get the max listener to work it wont display anything
 
Old 11-20-2012, 01:34 PM   #5
thehive
Expert
portfolio
Eric Robert
animator/ illustrator
work/\holic Studios.com
Orlando, United States
 
Join Date: Feb 2005
Posts: 1,687
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-20-2012, 03:38 PM   #6
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,431
Send a message via ICQ to denisT
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):
Code:
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-20-2012 at 03:43 PM.
 
Old 11-20-2012, 06:35 PM   #7
thehive
Expert
portfolio
Eric Robert
animator/ illustrator
work/\holic Studios.com
Orlando, United States
 
Join Date: Feb 2005
Posts: 1,687
oh sweet thanks ill mess with this, much appreciated
 
Old 11-20-2012, 06:35 PM   #8
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 06:18 AM.


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