New issue 36 by rogier.fransen: MeshPrimitiveParameter in Op causes error
when re-loading maya scene.
http://code.google.com/p/cortex-vfx/issues/detail?id=36
1. Create a python Op exposing a MeshPrimitiveParameter.
2. Create an Opholder node for this in a Maya scene.
3. Connect a Maya mesh. (Works as expected.)
4. Save the .ma file
5. Reload the .ma file
On reload of the file maya gives an error about incompatible parent
attributes and does not make the connection between the mesh and the
OpHolder node.
Cortex v5.
Rogier Fransen
rogier....@drdstudios.com
Comment #1 on issue 36 by thehaddonyoof: MeshPrimitiveParameter in Op
causes error when re-loading maya scene.
http://code.google.com/p/cortex-vfx/issues/detail?id=36
I'm seeing that here too. I'm not sure when I'll get a chance to look at
this so I hope one of these workarounds will be acceptable. I find that
using an ObjectParameter like this doesn't give me the problem :
IECore.ObjectParameter(
name = "meshyMesh",
description = "",
defaultValue = IECore.MeshPrimitive.createBox( IECore.Box3f( IECore.V3f(
-1 ), IECore.V3f( 1 ) ) ),
types = [ IECore.MeshPrimitive.staticTypeId() ],
)
We also frequently use this form which gives a Group containing a bunch of
geometry, along with some useful UI entries to help make connections etc :
IECore.ObjectParameter(
name = "geometry",
description = "",
defaultValue = IECore.Group(),
types = [ IECore.VisibleRenderable.staticTypeId() ],
userData = {
"maya" : {
"useGeometryCombiner" : IECore.BoolData( True ),
},
},
),
Will either of those do the job for you? One other option may be to make
the connection from outMesh rather than worldMesh - that seemed to work for
me too.
Attaching a simple Op which can be used to demonstrate the problem.
Attachments:
testMeshInput-1.py 542 bytes
Comment #3 on issue 36 by thehaddonyoof: MeshPrimitiveParameter in Op
causes error when re-loading maya scene.
http://code.google.com/p/cortex-vfx/issues/detail?id=36
(No comment was entered for this change.)
Comment #4 on issue 36 by andrewk.imageengine: MeshPrimitiveParameter in Op
Yes, changing it to an ObjectParameter does the job perfectly fine.
Sorry, I should have mentioned that in the report. We actually started with
that (ObjectParameter) probably as result of copy and paste from an
existing Op.
It was only when we thought we were being smart that we changed it to
MeshParameter. Turns out that was not such a smart move...
Comment #6 on issue 36 by andrewk....@gmail.com: MeshPrimitiveParameter in
Op causes error when re-loading maya scene.
http://code.google.com/p/cortex-vfx/issues/detail?id=36
This is fixed in r4298. See the comment in
src/IECoreMaya/MeshParameterHandler.cpp for an explanation of the bug.