AbcImport without creating a new AlembicNode when updating animation

431 views
Skip to first unread message

Erik Johansson-Evegård

unread,
Sep 26, 2016, 3:14:08 PM9/26/16
to Python Programming for Autodesk Maya
Been bashing my head against this today.

import maya.cmds as mc
mc.AbcImport('/path/to/alembic/animation1.abc', mode='import', connect='|path|to|lookdev|asset')

This works fine and dandy and the lookdev asset moves as it should.

However then I wan't to switch to a new animation and have tried running AbcImport again with path to the new animation and same connect. Tried both import and replace mode.
It switches the animation of the asset but it also creates a new AlembicNode keeping the old one in the scene. For some reason it's not allowed to change the path directly on the AlembicNode.

With a ton of assets and a ton of animation updates this will create loads and loads of not used AlembicNodes.

How are people solving this? Is anyone actually using AbcImport in production?


Marcus Ottosson

unread,
Sep 26, 2016, 3:24:20 PM9/26/16
to python_in...@googlegroups.com

For some reason it’s not allowed to change the path directly on the AlembicNode.

Me thinks there are trolls in the implementation of the trusty ol’ AlembicNode.

Me thinks that if it did let you change the name, it would take Maya to the grave. You can test this for yourself by replacing the file on disk - essentially forcing a change of input. Maya will not approve.

My impression is that the Alembic implementation in Maya is rather terrible. I tend to stick with the basics.

Maybe have a go with referencing the alembic instead, and make the path of the reference your variable instead.


--
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+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/1507c50c-1783-469e-8dd7-aa45e94a325b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Marcus Ottosson
konstr...@gmail.com

Erik Johansson-Evegård

unread,
Sep 26, 2016, 3:36:01 PM9/26/16
to python_in...@googlegroups.com
Doing the reference dance at the moment but thought i'll try and do what seems to be the recommended way in the documentation.
Using AbcImport feels faster as well but maybe it's only in my head.

On Mon, Sep 26, 2016 at 9:24 PM, Marcus Ottosson <konstr...@gmail.com> wrote:

For some reason it’s not allowed to change the path directly on the AlembicNode.

Me thinks there are trolls in the implementation of the trusty ol’ AlembicNode.

Me thinks that if it did let you change the name, it would take Maya to the grave. You can test this for yourself by replacing the file on disk - essentially forcing a change of input. Maya will not approve.

My impression is that the Alembic implementation in Maya is rather terrible. I tend to stick with the basics.

Maybe have a go with referencing the alembic instead, and make the path of the reference your variable instead.

On 26 September 2016 at 20:14, Erik Johansson-Evegård <erik.johansson.evegard@gmail.com> wrote:
Been bashing my head against this today.

import maya.cmds as mc
mc.AbcImport('/path/to/alembic/animation1.abc', mode='import', connect='|path|to|lookdev|asset')

This works fine and dandy and the lookdev asset moves as it should.

However then I wan't to switch to a new animation and have tried running AbcImport again with path to the new animation and same connect. Tried both import and replace mode.
It switches the animation of the asset but it also creates a new AlembicNode keeping the old one in the scene. For some reason it's not allowed to change the path directly on the AlembicNode.

With a ton of assets and a ton of animation updates this will create loads and loads of not used AlembicNodes.

How are people solving this? Is anyone actually using AbcImport in production?


--
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+unsubscribe@googlegroups.com.



--
Marcus Ottosson
konstr...@gmail.com

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/w3-jUkx3vdg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOB3pKpgzikNJCkkj%2BX804uH7FDhkznYjeWVDhE74F8z3Q%40mail.gmail.com.

Roy Nieterau

unread,
Sep 27, 2016, 5:24:53 PM9/27/16
to Python Programming for Autodesk Maya
A quirk to keep in mind when re-opening a scene with referenced Alembics without the Alembic plug-in loaded upfront is that it will just ignore those references (fail them basically). The same would happen on a farm. Therefore on our Maya launches (also on the farm) we force the loading of the Alembic plug-in, but I'm not entirely sure if it's still the same. (But I remember testing it again with Maya 2016 and the problem still being there).

Good luck! :D


On Monday, September 26, 2016 at 9:36:01 PM UTC+2, Erik Johansson-Evegård wrote:
Doing the reference dance at the moment but thought i'll try and do what seems to be the recommended way in the documentation.
Using AbcImport feels faster as well but maybe it's only in my head.
On Mon, Sep 26, 2016 at 9:24 PM, Marcus Ottosson <konstr...@gmail.com> wrote:

For some reason it’s not allowed to change the path directly on the AlembicNode.

Me thinks there are trolls in the implementation of the trusty ol’ AlembicNode.

Me thinks that if it did let you change the name, it would take Maya to the grave. You can test this for yourself by replacing the file on disk - essentially forcing a change of input. Maya will not approve.

My impression is that the Alembic implementation in Maya is rather terrible. I tend to stick with the basics.

Maybe have a go with referencing the alembic instead, and make the path of the reference your variable instead.

On 26 September 2016 at 20:14, Erik Johansson-Evegård <erik.johans...@gmail.com> wrote:
Been bashing my head against this today.

import maya.cmds as mc
mc.AbcImport('/path/to/alembic/animation1.abc', mode='import', connect='|path|to|lookdev|asset')

This works fine and dandy and the lookdev asset moves as it should.

However then I wan't to switch to a new animation and have tried running AbcImport again with path to the new animation and same connect. Tried both import and replace mode.
It switches the animation of the asset but it also creates a new AlembicNode keeping the old one in the scene. For some reason it's not allowed to change the path directly on the AlembicNode.

With a ton of assets and a ton of animation updates this will create loads and loads of not used AlembicNodes.

How are people solving this? Is anyone actually using AbcImport in production?


--
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+unsub...@googlegroups.com.



--
Marcus Ottosson
konstr...@gmail.com

Erik Johansson-Evegård

unread,
Sep 28, 2016, 3:45:13 AM9/28/16
to python_in...@googlegroups.com
Have had mc.loadPlugin('AbcImport', qt=True) in userSetup.py as long as I can remember :)

On Tue, Sep 27, 2016 at 11:24 PM, Roy Nieterau <royni...@gmail.com> wrote:
A quirk to keep in mind when re-opening a scene with referenced Alembics without the Alembic plug-in loaded upfront is that it will just ignore those references (fail them basically). The same would happen on a farm. Therefore on our Maya launches (also on the farm) we force the loading of the Alembic plug-in, but I'm not entirely sure if it's still the same. (But I remember testing it again with Maya 2016 and the problem still being there).

Good luck! :D

On Monday, September 26, 2016 at 9:36:01 PM UTC+2, Erik Johansson-Evegård wrote:
Doing the reference dance at the moment but thought i'll try and do what seems to be the recommended way in the documentation.
Using AbcImport feels faster as well but maybe it's only in my head.
On Mon, Sep 26, 2016 at 9:24 PM, Marcus Ottosson <konstr...@gmail.com> wrote:

For some reason it’s not allowed to change the path directly on the AlembicNode.

Me thinks there are trolls in the implementation of the trusty ol’ AlembicNode.

Me thinks that if it did let you change the name, it would take Maya to the grave. You can test this for yourself by replacing the file on disk - essentially forcing a change of input. Maya will not approve.

My impression is that the Alembic implementation in Maya is rather terrible. I tend to stick with the basics.

Maybe have a go with referencing the alembic instead, and make the path of the reference your variable instead.

On 26 September 2016 at 20:14, Erik Johansson-Evegård <erik.johans...@gmail.com> wrote:
Been bashing my head against this today.

import maya.cmds as mc
mc.AbcImport('/path/to/alembic/animation1.abc', mode='import', connect='|path|to|lookdev|asset')

This works fine and dandy and the lookdev asset moves as it should.

However then I wan't to switch to a new animation and have tried running AbcImport again with path to the new animation and same connect. Tried both import and replace mode.
It switches the animation of the asset but it also creates a new AlembicNode keeping the old one in the scene. For some reason it's not allowed to change the path directly on the AlembicNode.

With a ton of assets and a ton of animation updates this will create loads and loads of not used AlembicNodes.

How are people solving this? Is anyone actually using AbcImport in production?


--
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+unsubscribe@googlegroups.com.



--
Marcus Ottosson
konstr...@gmail.com

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/w3-jUkx3vdg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/w3-jUkx3vdg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.

erik.jo...@fido.se

unread,
Oct 8, 2016, 5:05:56 PM10/8/16
to Python Programming for Autodesk Maya
Autodesk support says I have to do my own cleanup. Either by deleting history (removes AlembicNode) or some other way. So I guess that answers that.
Reply all
Reply to author
Forward
0 new messages