PDA

View Full Version : How to identify Cameras?


SyncViewS
05-11-2009, 09:38 PM
Hi guys,
I need to create a filter function for a pickButton that allows to get Cameras in the scene, and while I can use classOf equal to TargetCamera and FreeCamera, I don't know how to identify other cameras provided by plugins, like VRay. Actually I don't use a filter function, and is quite annoying. Do you have any failsafe method? I can query for the existence of a specific property, like .fov, but it's not guaranteed to be in every other camera. Thanks.

- Enrico

PiXeL_MoNKeY
05-11-2009, 09:48 PM
What about checking superclassof the object? All camera objects should return camera.for o in 1 to selection.count do (print (classof selection[o]))
Freecamera
Targetcamera
Main_Camerafor o in 1 to selection.count do (print (superclassof selection[o]))camera
camera
camera-Eric

SyncViewS
05-11-2009, 10:09 PM
Great! Thank you Eric, I had "superClassOf" in a corner of my mind but couldn't get it :)

- Enrico

CGTalk Moderation
05-11-2009, 10:09 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.