PDA

View Full Version : Catching Object renames


Riffmaster
02-23-2012, 11:46 AM
I am trying to catch any camera renaming made by the user, I am currently using a When construct

when names cameras change id:#CamNameChange do getcams()

This provides me with the event I need to register the new camera name but I also need to register it's old name. What would be the best way to achieve this?

Thanks,

D.

Moosley
02-23-2012, 11:52 AM
Could you extend the camera object with a custom oldName attribute into which you can put the current name? When the event is called you can then query the oldName attribute and do what you need with it before updating it to the new name.

Riffmaster
02-23-2012, 12:16 PM
Thanks, good idea. Have stored the camera names in the setAppData this seems to work quite well with minimal fuss.

Cheers.

CGTalk Moderation
02-23-2012, 12:16 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.