Page 1 of 1
a MEL script to set manual focus distance to Locator?
Posted: Sun Feb 08, 2009 7:07 pm
I use a separate camera in Maya usually to tune materials (until we get region render - hint hint) and have to manually set the focus distance whenever I move the persp1 camera or my things will be out of focus. Maxwell inputs aren't available as driven key items so I'm wondering if there is a way to make this manual focus value update based on a locator's distance from the persp1 camera.
Posted: Sun Feb 08, 2009 7:17 pm
I just tried a Connection Editor link between a distance tool and the Maxwell camera settings but it didn't work:
Posted: Mon Feb 09, 2009 9:54 am
Maxwell doesn't use the native "focusDistance" attribute, it has its own custom attribute called "mxFocusDistance". Try something like this instead:
Code: Select all
connectAttr distanceDimensionShape1.distance cameraShape1.mxFocusDistance
Posted: Mon Feb 09, 2009 6:20 pm
that did it - thanks so much.