Maya NURBS surface and curve cannot be re-connected to another cache file.

419 views
Skip to first unread message

Sam Wu

unread,
May 17, 2012, 9:18:41 PM5/17/12
to alembic-d...@googlegroups.com, samwu, Rya...@cgcg.com.tw
Depends on cache file condition, there will be two circumstances:

1. If the original cache file is invalid --> only mesh connected to new cache file successfuly
- error message:
# Error: No connection done for node 'asset:ballShape' with |asset:topGrp|asset:cache_root|asset:ball|asset:ballShape #
# Error: asset:ball is not compatible as a transform node. Connection failed. #

- Curve isn't connected to cache either, but there is no error message about the curve.

2. If the original cache file is valid --> only mesh connected to new cache file successfuly
No error message pops up, NURBS surface and curve are still connected to original cache file.

* Steps to re-produce 1st condition:
1. open "render_abcAttached.ma" 

2. python command:
newCache = 'YOUR PATH/cache_org/asset_HAIR.abc'
mc.AbcImport(newCache, ct='asset:cache_root')


Test Spec:
WinXP 64, Maya2012 SAP SP1, modified AbcImport v1.0.5

Possible work around:
1. delete alembic cache node first, feed NURBS surfaces and curves with dummy shapes, then run re-connect.
2. modify AbcImport source code. (need to delete alembic cache node first).  My colleague, Ryan, might add more details on this later.

We use 2nd work around in our production currently.
Let you guys know in case Alembic Dev team might want to take a look at this issue.


Sam
inValidCache_issue.rar

shihchin

unread,
May 20, 2012, 10:14:12 PM5/20/12
to alembic-d...@googlegroups.com, samwu, Rya...@cgcg.com.tw
Hello folks,
The current issue we want to resolve is:
If we open a maya file with non-existent abc-cache, we can't reconnect all nodes with another valid abc-cache successfully.

The error of "not compatible as a transform node" is occurred where we want to attach the MObject to
MFnNurbsCurve/MFnNurbsSurface in CreateSceneVisitor::operator().

The weird thing is that those MObjects are really match the desired type, but it's failed to be bound with the MFn*.
At first, we guess it might be the problem of missing handle of internal MObject, and we try to replace the MObject of each NURBS curve
by its MDagPath. Unfortunately, we got no luck with this modification. So, we use MObject.hasFn() for type checking process instead,
and it resolves the issues of "not compatible transform node".

For the re-connecting process, we found other strange problems in connectAttr() in NodeIteratorVisitorHelper.cpp:

First, we can't attach MFnNurbsCurve to the curveObj successfully (just like previous case).
But it's OK to use MFnDependencyNode to bind the curveObj!

Second, if the curveObj has a connection to its "create" plug, the modifier.doIt() would return MS::kFailure.
We have tried to use MEL command to connect plugs, but few curves' position data would not match their original data.
Therefore, we add a function to do the disconnection for curves in CreateSceneVisitor, and finally, the modifier.doIt() works fine (so far).

The attached files are the patches of our experiments, hope it helps someone who has ran into similar situations like us. :)

Shih-Chin


Sam Wu於 2012年5月18日星期五UTC+8上午9時18分41秒寫道:
patches.rar

Lucas Miller

unread,
May 22, 2012, 8:06:50 PM5/22/12
to alembic-d...@googlegroups.com
I think this might help you, and hopefully fixes most of the problems you've listed in this thread:

http://code.google.com/r/millerlucas-dev/source/detail?r=57626fdcc9745e57dccec6109ca2c94ed731d3f4

Nurbs Surfaces and Curves weren't being disconnected properly before being connected to by the Alembic cache.

Also the "not compatible as a transform node" was a confusing error, which was replaced with a better warning in cases where a child of the root of an Alembic scene doesn't exist in the Maya scene, and you aren't creating non-existent nodes.

Lucas

--
You received this message because you are subscribed to the Google
Groups "alembic-discussion" group.
To post to this group, send email to alembic-d...@googlegroups.com
To unsubscribe from this group, send email to
alembic-discuss...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/alembic-discussion?hl=en
 
For RSS or Atom feeds related to Alembic, see:
 
http://groups.google.com/group/alembic-dev/feeds
 
http://groups.google.com/group/alembic-discussion/feeds

Sam Wu

unread,
May 28, 2012, 10:36:43 AM5/28/12
to alembic-d...@googlegroups.com
Thank you, Lucas.
It seems that we use similar approaches.  It works.

By the way, thank you for the tips for solving issue #248/249.


Sam
To post to this group, send email to alembic-discussion@googlegroups.com

To unsubscribe from this group, send email to
Reply all
Reply to author
Forward
0 new messages