Hello,
So, in a hectic recent few weeks of no time to experiment and a bunch of harsh deadlines, I made a whole bunch of recommendations about how things should be achieved without adequate time to test my suppositions…other than my “well, it worked fine in MAYA” former experience.
One of them is now biting me in the butt…Max XREF’s. As another thread has become bogged down with XREF opinions, I thought I’d stick in my request for help and guidance in to temp some of those opinions this way…
Looking around the web, it seems to be a common problem in MAX that object references can easily lose their connection if the original model is altered, resulting in the dreaded (off the top of my head) Unresolved error. Are there any ways around this? I haven’t come across any solutions… someone mentioned not using the “convert to editable…X” modifier on the original model, but I don’t use these anyway and it still seems pretty problematic.
I don’t think using scene references is an option, I’ll have to check, but my current thinking is just doing without references all together as someone suggested.
Simply modifying an object will not break the xref. What version of Max are you using? In version 8 and earlier, if you delete an object and the replace with one of the same name, that would break the xref. This was fixed in newer versions.
Can you be more specific about the problems you’re having?
Max version 9. I’m not exactly sure on what was done to the model, It was altered by one of the juniors, now it isn’t picked up by the reference, Unfortunately I was away for a week and he isn’t sure exactly what he did… perhaps he did replace it somehow (attach it to another object duplicate it or something) I doubt it, but it’s possible.
The name is the same. The engine picks it up fine, just not Max.
I was wondering if there was any known set of no-no’s for editing referenced models and in particular whether there was some painless way to fix it without deleting them all and starting again.
I tried attaching the broken model to an earlier working version… just clutching at straws, but it didn’t work.
I think the bug fix for fixing broken xrefs if the name is the same was actually part of the Max 9 Extension.
So if you don’t have that, here’s a small script that should automatically fix broken xrefs where there’s a new object, but the same name, in the xref file.
Select the broken ones and run this:
for obj in selection where objXRefMgr.IsNodeXRefed obj != undefined do
(
-- get object name
nm = obj.objectName
-- set to something temp
objXRefMgr.SetXRefItemSrcName obj "!!"
-- reset it to fource an update
objXRefMgr.SetXRefItemSrcName obj nm
)
Thanks for the help… for some reason that script isn’t giving me joy in my scene, although the theory sounds fine (it works when I do it manually)
I’m getting someone to take a look at it now, thanks for the pointers.
You might try just setting the .objectName property directly instead of using “SetXRefItemSrcName”. At some point, I don’t remember when, it changed from being read-only to read/write.
nm = obj.objectName
obj.objectName = "!!"
obj.objectName = nm