Notifications
Clear all

[Closed] How to test CAMERA and Rectangle Objects

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

2 Replies

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")
)

1 Reply
(@lucky6969c)
Joined: 11 months ago

Posts: 0

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