PDA

View Full Version : Instances of Grouped References: BUG?


Seraphoen
02-03-2006, 06:29 PM
Hey guys, Got a strange bug here.

I have a large environment file that I want to reference a prop file into like a "parking meter" for example. So I reference the prop file in and then I group it and I make sure to name the group something different that the actual file, (it doesn't like same names) then I instance that group and therefore it instances the reference as well. So now I am able to place and position the parking meters where ever I want, as many as I want. The problem I have is that it seems that at random the instanced references will not stick to the instanced groups I made if I save, close the file and reopen it. The original references drop out of their groups that I made and all the other instances no longer appear in the groups that they should be in either. I thinking that for whatever reason the instances can't find the "original" since it has dropped out of the group upon load. the only problem is, is that I can't get this bug to happen all the time sometimes I can set up the file like this, save, reopen and its fine, then I can save, reopen later on and its bugged again. If anyone has and suggestion on what could cause this please let me know.

Seraphoen
02-03-2006, 09:37 PM
bump for bumps sake.

JamesPiechota
02-03-2006, 11:58 PM
Which version of Maya are you using?

JamesPiechota
02-04-2006, 09:00 AM
Also:

Are you using prefixes or namespaces when referencing? (namespaces tend to be more stable)
How many levels of referencing do you have? Does the prop file contain references?
Does the prop file contain instances, or duplicate naming (more than one node with the same name)?
Are you using the "Group" option to create the group or grouping manually?
Do you have multiple references to the same file?

Seraphoen
02-06-2006, 03:14 PM
Hey JamesPiechota, thanks for responding

To answer:

I am using maya 6.5.
I am using namespaces (checked on)
Just one level of referencing (no nested references)
The prop file itself does not contain instancing or duplicate naming. (contains one group and one mesh within the file.)
I am grouping Manually since the auto group in the reference options puts the pivot to the center of the object by default.
I do not have references to the same file twice.

JamesPiechota
02-07-2006, 09:05 AM
From your description it sounds like you're avoiding most of the common instabilities - you may, instead, have a problem with failed reference edits hanging around (similar to the problem encountered in this thread: http://forums.cgsociety.org/showthread.php?p=3222734#post3222734). This could explain why the problem appears to happen unpredictably - it may not happen until the scene and/or reference have been used/modified a bit.

Unfortunately in 6.5 there aren't many tools for manipulating reference edits. You could try cleaning the reference while it is loaded: Reference Editor > File > Clean Up Reference. It is important that this is only done while the reference is loaded otherwise all edits will deleted, whether valid or not.

That being said, Maya has always had trouble dealing with instances and referencing so it is quite possible this scene is hitting a different bug (although Maya 6.5 behaves much better in this respect than prior versions).

If you'd like I'd be happy to take a look at your scene.

pascal
02-07-2006, 11:44 AM
I believe its good practice to avoid changing the hierarchy of the referenced elements.
You said you imported the scene and made a group. In my expereience, you shouldn't.

It's better to either make the group in the referenced scene, or reference the scene and check the "group" option in the paramaters.

my 2cents,
Pascal.

Seraphoen
02-07-2006, 03:23 PM
Thanks for the responses guys, it helps. So far so good. After a lot of testing, I have found that I can reproduce the bug consistantly by reordering the groups in the outliner. Basically if I bring the references in, in one order, and then rearrange that order for organization after instancing the groups, it fails to apply the instances that aren't in the original order of creation when I re-open the file. I can get it to do it every time. It shouldn't matter what order I put my groups but I redid everything and this time left the group order alone. I will continue to watch for unwanted reference edits, but the only thing I am doing it moving the group with the reference in it. Is that considered a reference edit? I am not editing anything else in the original file.

JamesPiechota
02-07-2006, 11:44 PM
Nice catch - while re-ordering the DAG isn't a reference edit unto itself, it does affect the way that Maya stores reference edits. Every time an instance is made of the referenced object a reference edit is created to represent it. When loading a reference these reference edits are applied serially in a specific order. Unfortunately by re-ordering the DAG Maya gets confused and is unable to correctly apply all of the parent edits.

Here's a chunk of an 6.5 MA file representing the reference edits before re-ordering (it can be found shortly after the 'createNode reference' line):


0 |cube:pCube1 group1 "-s -nc -r "
0 |group1|cube:pCube1 group2 "-s -nc -r -add "
0 |group1|cube:pCube1 group3 "-s -nc -r -add "
0 |group1|cube:pCube1 group4 "-s -nc -r -add "

These edits would cause Maya to first parent |cube:pCube1 to group1, then to instance |group1|cube:pCube1 to group2, and so on. Here's a chunk from a file after moving the group3 node so that it appears first in the outliner:


0 |group3|cube:pCube1 group1 "-s -nc -r "
0 |group3|cube:pCube1 group2 "-s -nc -r -add "
0 |cube:pCube1 group3 "-s -nc -r -add "
0 |group3|cube:pCube1 group4 "-s -nc -r -add "

As you can see the first operation Maya will attempt to do is parent |group3|cube:pCube1 group1 - unfortunately there isn't a |group3|cube:pCube1 yet, as that parent operation does not occur until the 3rd line.

This situation is handled better in 7.0 (I could reproduce the bug in 6.5 but not 7.0). Although this may not be any consolation.

If you need to fix the scene manually I believe you would have to manually edit the MA file by moving the line that creates the parent to the first node in the outliner (e.g. group3) up to the beginning of the edit chunk, removing its "-add" flag, and adding an "-add" flag the (now) second line. An example:


0 |cube:pCube1 group3 "-s -nc -r "
0 |group3|cube:pCube1 group1 "-s -nc -r -add "
0 |group3|cube:pCube1 group2 "-s -nc -r -add "
0 |group3|cube:pCube1 group4 "-s -nc -r -add "

I believe this process would work on a more complex scene as well but I have not tested it. If you have some scenes that are already broken, I'd be happy to fix them up for you.

Seraphoen
02-08-2006, 03:11 PM
Sweet well it looks like that was my problem I was able to get everything back. Maya referencing is still very unstable. It doesn't even like me to remove references from the list once they are in. Makes the files freeze sometimes upon re-opening. Can't wait till we upgrade to Maya 7.0 or better yet, 3ds Max! :) thanks again man for all yur input, it was very helpful.

cheung0402
02-15-2006, 05:04 PM
I have a scene in 6.0, which contains a reference file.

When I remove the referenced file in reference editor, maya crashes.

Anyone know what's wrong? And any solutions?

Thx

CGTalk Moderation
02-15-2006, 05:04 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.