FORUMS: list search recent posts

Snap light to object

COW Forums : Autodesk Maya

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
SSGGMM
Snap light to object
on Jun 27, 2007 at 6:57:49 pm

Having one of those days where I'm trying to fix problems that happened 6 months ago.

I'm trying to create a shelf button that creates a new light inside a room. The only snag left is this: That same room changes position throughout a hundred or so scene files. I need that light to appear in THAT room, whereever that room happens to be. I thought I could simply snap the light to a selected vertex, but maya won't let me snap lights to anything.

Any ideas?


Return to posts index

Steve Sayer
Re: Snap light to object
on Jun 28, 2007 at 11:41:28 am

If the room has the same name in each scene, you can create a short MEL script to find it, get its position, and move the newly-created light there.

A good start might actually be to parent the light under the room, then reset its transforms--that should move it directly to the centre of the room.

If you want to get really fancy, and you're comfortable with MEL, you could even dispense with the idea of the shelf button and have the script open up your hundred files automatically, make the change, save and close. :)

-Steve


Return to posts index

TeeRav
Re: Snap light to object
on Jul 3, 2007 at 3:49:13 am

ahh i believe this is where referencing could have paid off for you


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]