Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / MEL / Get current value from a modelEditor flag?
  RSS 2.0 ATOM  

Get current value from a modelEditor flag?
Rate this thread
 
56312
 
Permlink of this thread  
avatar
  • Total Posts: 8
  • Joined: 20 December 2006 12:27 PM

Hello

string $panel = `getPanel -withFocus`;
string $me = `modelPanel -q -me $panel`;
modelEditor -e  -fsc "fragment" -fmd "linear" -fdn 0.1 -fst 131.14 -fen 1000 -fcl 0.6001831293 0.7849393487 0.7487754822 1 $me;

This changes my Hardware Fog setting on my focused viewport.

And is there any way to get current value of these for example ?
-fst (Fog Start Distance)
-fen (For End Distance) ?

What I want to do is get current value and ADD 50 and SUBTRACT 50
so when I make shelf buttons of these I can quickly change
the Near and Far value without opening the Fog setting window every time.

I would very much appreciate any info/help !!
Thank you so much

-J



Replies: 0
avatar
  • THNKR
  • Posted: 27 May 2011 04:26 AM

For example:

modelEditor --fst (`modelEditor -q -fst $me` * 2.0) -fen (`modelEditor -q -fen $me` * 2.0$me;
modelEditor --fst (`modelEditor -q -fst $me` * .5) -fen (`modelEditor -q -fen $me` * .5$me;


Replies: 1
/img/forum/dark/default_avatar.png

Thank you so much THNKR !!!
That’s so helpful !!!!!!
Thank you so much !!!!!!!

Author: solagratia77

Replied: 27 May 2011 04:42 AM