Issue with Maxscript to check transform controller type

Hi,

I’m after a little help with a maxscript query which should be straightforward but has me stumped!

I’m trying to check the position/rotation controller types of objects in a scene and ‘if a certain type’ do ‘something’

eg.

posCon = $.position.controller
if posCon == Position_List do (print “Do Something”)

I think it’s the terminology of ‘Position_list’ that is the issue, but not sure ‘what’ it should be?

Any help much appreciated! Thanks

I think you need to use the “classof()” function to get the type of controller.

if (classof posCon) == position_list do ( ...

https://help.autodesk.com/view/MAXDEV/2023/ENU/?guid=GUID-0AEEF510-1859-48B7-9A19-A6158B0310A7

1 Like

Oh boy, I thought it might be something like that but didn’t know how to structure it - Many thanks katz!