Discussion:
[Maya-Python] Creating assemblyReference is too slow
Yansi Yao
2018-10-12 11:49:23 UTC
Permalink
Hi all,

My context is:
- Maya2016 sp6, Windows 10 x64
- I have a maya file main.ma which contains an assemblyReference node
"seq_AR", and main.ma also contains many other nodes such as character
models, xgen models, and etc.
- The value of attribute seq_AR.definition is seq_AD.ma
- seq_AD.ma contains an assemblyDefinition node under which there are many
assemblyReference nodes. And each of these assemblyReference nodes points
to another assemblyDefinition file.
- All assemblyDefinition nodes have the same representations: 'bbox',
'gpucache', None, and etc.
The representation 'bbox' points to a maya file which contains only a
polygon cube.
The representation 'gpucache' points to an alembic file.
- The default active representation of all the assemblyDefinition nodes is
'gpucache'.
- The default active representation of all the assemblyReference nodes is
'gpucache'.


My problem:
Opening main.ma takes more than 2 hours, which is too long to be acceptable.


Here are some tests for debugging:
Test 1:
- I create a new empty scene
- Menu "Create" --> "Scene Assembly" --> "Assembly Reference". Select
seq_AD.ma to set the definition file, then press button "Open". The node is
created quickly.
- Rename the created assemblyReference node to "seq_AR".
- Saved the file to empty_with_AR.ma
- Reopen empty_with_AR.ma. It takes less than 10 min to open the file.


Test 2:
- I open main.ma, delete assemblyReference node "seq_AR". Now main.ma
contains only many other nodes such as character models, xgen models, and
etc.
- Saved as main_without_AR.ma
- Reopen main_without_AR.ma. It takes less than 20 min to open the file.


Test 3:
- I open main.ma, delete assemblyReference node "seq_AR". Now main.ma
contains only many other nodes such as character models, xgen models, and
etc.
- Menu "Create" --> "Scene Assembly" --> "Assembly Reference". Select
seq_AD.ma to set the definition file, then press button "Open". It takes 2
hours to load seq_AD.ma! After that, the assemblyReference node is created.
- Rename the created assemblyReference node to "seq_AR". Now main.ma
contains "seq_AR" and many other nodes such as character models, xgen
models, and etc.
- Saved as main_new_AR.ma
- Reopen main_new_AR.ma. It takes 2 hours to open the file.


It's weird that, in Test 3, it takes 2 hours to load seq_AD.ma to create an
assemblyReference when there are many other nodes in the scene.


And I have another idea: set the default active representation from
"gpucache" to "bbox" or None. But I'm not sure whether this idea can solve
my problem. Given that there are so many assemblyDefinition files and
assemblyReference files, I have to take several days to switch the default
active representation for these files. That's why I post this thread here
at first.


Cheers
Yao
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/bd6dba7c-b06e-48a5-ba5b-7ab51bd80ecd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
y***@gmail.com
2018-10-12 11:47:52 UTC
Permalink
Hi all,

My context is:
- Maya2016 sp6, Windows 10 x64
- I have a maya file main.ma which contains an assemblyReference node "seq_AR", and main.ma also contains many other nodes such as character models, xgen models, and etc.
- The value of attribute seq_AR.definition is seq_AD.ma
- seq_AD.ma contains an assemblyDefinition node under which there are many assemblyReference nodes. And each of these assemblyReference nodes points to another assemblyDefinition file.
- All assemblyDefinition nodes have the same representations: 'bbox', 'gpucache', None, and etc.
The representation 'bbox' points to a maya file which contains only a polygon cube.
The representation 'gpucache' points to an alembic file.
- The default active representation of all the assemblyDefinition nodes is 'gpucache'.
- The default active representation of all the assemblyReference nodes is 'gpucache'.


My problem:
Opening main.ma takes more than 2 hours, which is too long to be acceptable.


Here are some tests for debugging:
Test 1:
- I create a new empty scene
- Menu "Create" --> "Scene Assembly" --> "Assembly Reference". Select seq_AD.ma to set the definition file, then press button "Open". The node is created quickly.
- Rename the created assemblyReference node to "seq_AR".
- Saved the file to empty_with_AR.ma
- Reopen empty_with_AR.ma. It takes less than 10 min to open the file.


Test 2:
- I open main.ma, delete assemblyReference node "seq_AR". Now main.ma contains only many other nodes such as character models, xgen models, and etc.
- Saved as main_without_AR.ma
- Reopen main_without_AR.ma. It takes less than 20 min to open the file.


Test 3:
- I open main.ma, delete assemblyReference node "seq_AR". Now main.ma contains only many other nodes such as character models, xgen models, and etc.
- Menu "Create" --> "Scene Assembly" --> "Assembly Reference". Select seq_AD.ma to set the definition file, then press button "Open". It takes 2 hours to load seq_AD.ma! After that, the assemblyReference node is created.
- Rename the created assemblyReference node to "seq_AR". Now main.ma contains "seq_AR" and many other nodes such as character models, xgen models, and etc.
- Saved as main_new_AR.ma
- Reopen main_new_AR.ma. It takes 2 hours to open the file.


It's weird that, in Test 3, it takes 2 hours to load seq_AD.ma to create an assemblyReference when there are many other nodes in the scene.


And I have another idea: set the default active representation from "gpucache" to "bbox" or None. But I'm not sure whether this idea can solve my problem. Given that there are so many assemblyDefinition files and assemblyReference files, I have to take several days to switch the default active representation for these files. That's why I post this thread here at first.


Cheers
Yao
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/c26ce53c-614a-4553-8337-a66411948e50%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...