Notifications
Clear all

[Closed] How to identify Cameras?

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
2 Replies

What about checking superclassof the object? All camera objects should return camera.

for o in 1 to selection.count do (print (classof selection[o]))

for o in 1 to selection.count do (print (superclassof selection[o]))

-Eric

Great! Thank you Eric, I had “superClassOf” in a corner of my mind but couldn’t get it

  • Enrico