PDA

View Full Version : How to test CAMERA and Rectangle Objects


lucky6969c
10-12-2009, 09:23 AM
Hello,
there are one camera and several rectangle objects in my scene.
At the moment, I used name comparisons to decide how to do next.
If I want to test what superclass they belong to, then it might look neater.
I tried to test CAMERA_CLASS_ID with CanConvertToClass...
But my plugin doesn't recognise that, could you please provide some
code snippets for me? Thanks in advance
Jack

ivanisavich
10-12-2009, 09:55 AM
for j in 1 to objects.count do
(
if iskindof objects[j] Camera then print (objects[j].name + " is a Camera")
if iskindof objects[j] Rectangle then print (objects[j].name + " is a Rectangle")
)

lucky6969c
10-12-2009, 10:03 AM
for j in 1 to objects.count do
(
if iskindof objects[j] Camera then print (objects[j].name + " is a Camera")
if iskindof objects[j] Rectangle then print (objects[j].name + " is a Rectangle")
)


Hello,
Thanks for your reply. it is very useful... how can I do the same with the SDK?
Jack

CGTalk Moderation
10-12-2009, 10:03 AM
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.