Keeping instances with ResetXForm doesn't make sense because resetting XForm means individually changing the transformation properties of an object to meet certain criteria (such as aligning orientation or resetting scale).
But that doesn't mean my function doesn't work with the XForm modifier. If you apply it manually (addmodifier <node> (XForm ())), you will see that everything works the same as for other modifiers.
But ... sometimes it makes sense to reset the XForm for the "master" node and get a "relative" reset for all its instances. In this case, I see the only solution:
# 1 find all instances of the master node
# 2 reset the master's xform
# 3 replace all instances with master object
The code might look like this:
fn replaceNodeXForm node =
(
instancemgr.getinstances node &instances
resetxform node
collapsestack node
instancereplace instances node
)
/* where $ is a master
replaceNodeXForm $
*/