Maya for 3D Printing - Rapid Prototyping
In this course we're going to look at something a little different, creating technically accurate 3D printed parts.
# 1 12-10-2004 , 07:40 PM
Dann's Avatar
Registered User
Join Date: Feb 2003
Location: Los Angeles
Posts: 695

modelEditor problem

Hey gang. Some time back, I write a script to control the film offset values of a camera using sliders. It's smart enough to know whether or not there is any image plane attached to your camera/view, and what sliders to give you to control the image planes. As you can see, I love my script and use it often.

However, as I was recently writing a new script to control a Z depth renderer using circles for the near and far depths, I found that my film offset script doesn't work if you have any objects linked to the camera. In the words of Pink Floyd... "This will not do, call the court marshall!"

The problem seems to be that when the camera has objects attached to it, my script returns the Shape name rather than the object name. I even noticed that in Maya (v5 by the way) under the Panels>Perspective drop down menu, it lists the camera differently if there are objects attached to it.

If you want to look at my files, try running the filmOffset5 script on camera1, and then on camera2. (Click on the view to make it active, you do not need to select the camera). If you check the script editor, you can see some info I'm printing out. Lines C & D should both be the camera names, whereas line E should be the shape name.

It seems that I've stumbled onto a Maya bug that I cannot figure out a work-around for. Any thoghts? I know this is very long winded, so thank you for your patience.

Eternally grateful,
-dann

Attached Files
File Type: zip modeleditor2.zip (11.2 KB, 204 views)

Last edited by Dann; 12-10-2004 at 07:42 PM.
# 2 13-10-2004 , 12:44 AM
Dann's Avatar
Registered User
Join Date: Feb 2003
Location: Los Angeles
Posts: 695
Nevermind, I added the lines

if ($camShape[0] == "")
{
$camShape[0] = $currentCamera;
}

Thanks to anyone who thought about helping.

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