Destroyed MAYA scene

Destroyed MAYA scene

amandine04217
Contributor Contributor
1,396 Views
4 Replies
Message 1 of 5

Destroyed MAYA scene

amandine04217
Contributor
Contributor

Hi,

 

I come here on the English Forum because I've already tried on the french one but I didn't find an answer...

So first Im french, sorry if I make mistakes

I'm working on a Scene with a lot of reference , today I've opened it again and most of the object were deformed/ destroyed or deleted...

The thing is that I delete my history often and even on my previous load the objects are destroyed..

I wanted to know if there was a way to fix this or does the file is corrupted ?

BEFOREBEFORE

basement_setdress_apres....jpgafter...after...

0 Likes
Accepted solutions (1)
1,397 Views
4 Replies
Replies (4)
Message 2 of 5

Kahylan
Advisor
Advisor

Hi!

 

I would like to help you, but you don't provide any of the referenced scenes so all I can see is that the stuff in the file you provided looks fine.

But I have no idea about all the objects that are in the 25 missing referenced files.

Now what I can see, is that you have Fosterparent nodes. Fosterparent nodes mean that some of your references themselves contain references. This is always problematic. In the future before you reference a file, make sure it doesn't contain references.

 

If you could import all your references into the main file and attach that again, I could maybe look for signs of scene corruption, but with this many missing potentially problematic files there isn't much of a point, sorry...

0 Likes
Message 3 of 5

amandine04217
Contributor
Contributor

Hi! Thanks for the answer , and sure I didn't thought about it , I join the main file with it then but if it doesn't work , my references are in the "asset" file

0 Likes
Message 4 of 5

Kahylan
Advisor
Advisor
Accepted solution

Ok, I took a look at it, eventhough your asset folder was missing some of the referenced assets, I could take a look.

From what I can see, the references that are problematic are the following:

batterie.mb

horloge.mb

microphone.mb

guitare.mb

etagere.mb

 

all the other references looked fine. Now guitare.mb itselfe contains a reference that I didn't have so I'm not sure about that file, but from what I could tell from the others, the problem pretty much fixed itself for those references by doing the following:

1) delete the reference cleanly

2) create the reference again

3) parent the reference under the corresponding locator

4) set rotation and translation to (0,0,0) and scale to (1,1,1)

 

now doing this for 5 references by hand is quite annoying, and I didn't find what exactly the problem was. So I'm not sure if those references will spontaneously corrupt again. So I wrote a short script that does these steps for you.

Just select the toplevel groups of the reference files that have a corrupted connection and run this script from a python tab in your scripteditor:

import maya.cmds as mc

sel = mc.ls(sl = True)
for s in sel:
    par = mc.listRelatives(s, p = True)[0]
    fn = mc.referenceQuery(s,f = True)
    mc.file(fn, rr = True)
    asOld = mc.ls(assemblies = True)
    mc.file(fn, r = True)
    asNew = mc.ls(assemblies = True)
    refGroup = set(asNew).difference(asOld).pop()
    
    mc.parent(refGroup, par)
    refGroup = mc.listRelatives(par, c= True, pa = True, typ = 'transform' )[0]
    mc.setAttr("{0}.s".format(refGroup), 1,1,1)
    mc.setAttr("{0}.r".format(refGroup), 0,0,0)
    mc.setAttr("{0}.t".format(refGroup), 0,0,0)

 

Now some things I would do to minimize the risk of this happening again:

 

1)Delete non-deformer history in your referenced files. They have a lot of construction history on them that isn't really useful at this stage and slows down your scene. <- I have a suspicion that this caused the corrupted links, all the objects with problems had polyChipoff nodes in their history, but that could just be a coincidence

2) If there is a reference in your referenced file, import that reference into the referenced file

3) make sure that the playback speed is 25 in all referenced files (this kept giving me warinings, but I don't think it was what caused the problem)

 

I hope it helps!

 

Message 5 of 5

amandine04217
Contributor
Contributor

Wow! Thanks a lot for your answer 

I was not expecting that much , I'm very grateful

I will do all this and limited mistakes !

Thanks again!

0 Likes