[Closed] Scripted XrefScene Positioning
So you can move xref scenes by binding them to a parent node and moving the parent. You can then unbind them and they remain where they were moved to. Is this transform value stored anywhere I can access?
I have a need of scripting in a large number of xrefs and positioning them, ideally I could just control placement when I create the xref node via script, but not seeing a way to do that. Right now my current workaround idea is to fall back on the ‘transform via dummy’ xref parent node, and I’ll just have to animate the dummy from origin to its actual position and then detach the xrefs at the location I want them at.
Is there a better way?
MAXSceneXRef doesn’t have transform property. that means you don’t have access to it via mxs. using sdk you probably can because rootnode is INode.
so the only way via mxs is how you do it. make dummy, set as a scene’s parent, move, and delete (or set scene’s parent to undefined).
Ah well, was hoping I was just missing an entry in the reference, but that makes sense. Appreciate the response Denis.
i’ve double-checked sdk. rootnode is an INode but without transform controller. so there is no way to animate it via sdk as well. if you want to animate a scene node the only way to do it is animate its parent node.
Ugly work-a-round:
- Merge XRef objects
- move/rotate/scale the merged objects
- save the objects
- re-xref them
Can be done via maxscript…
What I wound up doing was creating one dummy object per xref I needed (40+), and then matching the name of those dummy objects to the filename of the xref. At frame 0 the dummy is at origin, at frame 1 the dummy is in the proper world space for the xref. Then I scripted the loading / node attachment / time change / detach. less than ideal but worked well enough for that project.
Ideally the architects would just have used shared coordinates in the first place and everything would have been aligned without me placing them manually. Oh well…