Digital humans the art of the digital double
Ever wanted to know how digital doubles are created in the movie industry? This course will give you an insight into how it's done.
# 1 29-12-2003 , 06:06 PM
DigitalDez's Avatar
Registered User
Join Date: Dec 2003
Posts: 2

Current viewport info

Is there a way to extract which viewport is currently active?

What I'm trying to do is create a simple (newbie) script to generate nurbs curves. I'd like it to be intuative like the default "Circle" and "Square" commands where they draw out perpendicular to the current viewport selected. Yet, if the Persp or a non-orthographic viewport is selected, it defaults to the top for creation. Any ideas?

# 2 29-12-2003 , 09:02 PM
dannyngan's Avatar
Registered User
Join Date: Dec 2002
Location: Seattle, WA
Posts: 1,154
Code:
getPanel -withFocus


Danny Ngan
Animator | Amaze Entertainment
my website | my blog | my job
# 3 29-12-2003 , 11:18 PM
DigitalDez's Avatar
Registered User
Join Date: Dec 2003
Posts: 2
Thanks for the help.

I tried to add the line of code you gave me and I did not get an error message, but I also did not receive the results I was hoping for. user added image

I'm trying to create a small script that will draw a facited nurbs polygon shape. Here is what I have so far:

My Code:
circle -nr 0 1 0 -r 1 -d 1;
rename "nurbsPoly1";

I'm trying to get rid of the blue code above so that Maya looks for which viewport is active and draws my nurbsPoly1 perpendicular to the active viewport or top viewport if Persp/non-orthagonal is active. Where would I place the "getPanel -withFocus;" in the syntax above to achieve this result?

# 4 21-01-2004 , 08:55 PM
Subscriber
Join Date: Jan 2003
Location: Denmark
Posts: 338
Hi DigitalDez,

eh... I'm not sure if understand your question correctly, but whatever you do, all the viewports are members of the same workspace... and have the same coordinates to operate with...

so if you create a Nurbs sphere or any other object, it will be on the same spot (coordinate) in all the "modelling" Viewports...

hope this made sense... user added image

regards

Strarup


------------------------------------------------
Alex V. U. Strarup

One mistake can ruin it all...
# 5 01-02-2004 , 08:50 AM
dannyngan's Avatar
Registered User
Join Date: Dec 2002
Location: Seattle, WA
Posts: 1,154
One thing you could do is rotate the nurbs circle 90 degrees on either the X or Z axis to match whatever view has focus.


Danny Ngan
Animator | Amaze Entertainment
my website | my blog | my job
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads