Maxscript, detect if an object is a reference (meaning it has a derived object line in the modifier stack)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've been beating my head against the wall for a couple weeks now, trying to solve this problem. It appears that using Maxscript, if an object has modifiers and the master object has been deleted already, there's no foolproof way to detect if it is a reference clone (has derived object line in the modifier stack). If it doesn't have modifers, you can just check subanim 4 and if it's a "Modified Object", then it is a reference. Or, if the master object hasn't been deleted from the scene yet, you can use InstanceMgr.GetInstances on the reference object, and then check to see if its subAnim[4][subAnim[4].numSubs] is equal to anything in that list, and if so, it's a reference. But if the master has been deleted and the reference has no modifiers, there doesn't seem to be a way. Thoughts?
