objects end up flying everywhere when I unlink them?


#1

So I’ve imported a dwg from Revit and when I go to move certain bits of geometry, they pull others (instances of some sort) with them. Tried unlinking them, however that just messes everything up and sends the instances flying all over the scene basically.

It’s a bit hard to explain in words so I’ve exported some of the offending objects and attached a small scene to demonstrate

Tried, unlinking, tried reset xform, nothing works. Any help would be great!


#2

Did you get to solve it?
I came across this problem often but haven’t found a clear solution. I cannot check your file now but, if there are not many parented objects in your scene, then just create points or helpers on the pivot of the children objects, then unlink them, and then manually reposition each one where they should be.
Other thing you may also try, which I find more effective, is to link everything in the scene to a new main helper. So they will still have a parent but become independent from one another.
If it doesn’t work, you can also reset the rotation and position of the objects (ALT+right click+choose options) that works for me sometimes, so you can try that out.


#3

try exporting to .obj and then importing back in


#4

Typically this is because of instanced transform controllers. You have to make the controllers unique, then you can unlink the object without them moving.

Edit:
YMMV, but because typically the immediate follow-up question is, ‘how do I do that on my entire scene?’ here’s a quick hint:


for o in selection do o.transform.controller = PRS()
for o in selection do o.parent = undefined


that would set the transform to a typical PositionRotationScale and then unlink it. You’d want to do it in two separate passes like that to account for hierarchies several levels deep, make sure first all your controllers are unique, then unlink them all.


#5

Thanks James, this thread is going straight to my bookmarks! :beer:


#6

Thanks for the suggestions guys. SnipeyX, the script still caused my objects to fly apart but maybe I did something wrong?

Anyway, one way to quickly solve it was simply to attach all the objects into one, then detach using a nifty script called “elements to objects” (basically the equivalent of Maya’s combine/separate)
This seems to reset the instanced transform controllers. Less than ideal however


#7

Sorry not sure I quite follow, how do I make the controllers unique? The script just blows the objects apart still, same as hitting the unlink button : /


#8

The other issue could be where in the timeline you are unparenting. Try changing your start frame to -100, go there, unparent, and then reset your animation start time.

Never unparent after the first keyframe for any object in the parented structure. This will cause the keyframe offset from unparenting to be done at the given frame. So if at frame 0 everything starts from 0,0,0 and translates from there, but you unparent at frame 100, then the result of the unparent are based on the state of frame 100 not frame 0.

Hope that helps,
-Eric

EDIT: Just tried the file and the script works just fine. Not sure why you are seeing the issue.
EDIT 2: DO NOT run the script from the listener as it just executes the second line. You need to copy it to a new maxscript in the editor and evaluate all.


#9

Ah will try that. Yeah I’d been running from the listener

EDIT: HA! That works. Thanks! (although I again thought it didn’t do anything for a second but then realised I hadn’t selected my objects!)


#10

theres another way to overcome this. just turn the stuff into editable poly and use xform modifier


#11

Dudeee after all those years, finally i reached to vallhalla with your script yoo @SnipeyX , thank you vey much…