UIKit0 / alembic

Automatically exported from code.google.com/p/alembic
Other
0 stars 0 forks source link

"-sl" option in Maya AbcExport does nothing #290

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Use Alembic 1.1(from source)
AbcExport -j "-sl -file /path/to/file.abc"

Please provide any additional information below.

"-sl" option(which do exporting only selected nodes) does nothing in 
AbcExport.cpp ...

        else if (jobArgs.useSelectionList)
        {
            MSelectionList activeList;
            MGlobal::getActiveSelectionList(activeList);
            if (activeList.length() == 0)
            {
                MString errorMsg =
                    "-selection specified but nothing is actively selected.";
                MGlobal::displayError(errorMsg);
                return MS::kFailure;
            }
        }

Original issue reported on code.google.com by syoyofuj...@gmail.com on 6 Sep 2012 at 11:00

GoogleCodeExporter commented 9 years ago
Did you have anything selected in your scene?

I just tested this and it's exporting what I have selected.

Original comment by miller.lucas on 6 Sep 2012 at 4:30

GoogleCodeExporter commented 9 years ago
Also the code you quoted in AbcExport.cpp is just a quick check for correctness.

The logic that does the real thing is here:
http://code.google.com/p/alembic/source/browse/maya/AbcExport/AbcWriteJob.cpp?na
me=1_01_00#260

Original comment by miller.lucas on 6 Sep 2012 at 4:58

GoogleCodeExporter commented 9 years ago
Yes > Did you have anything selected in your scene?

1) Create a simple plane geometry & select it in Maya
2) AbcExport -j "-sl -file /path/to/file.abc";

Then, what I actually get is,

$ ls -la file.abc
-rw-r--r--  1 syoyo  staff  4487 Sep  7 02:37 geometry.abc

// Alembic file info:
  # of children: 1
  ScalarProperty name=statistics:interpretation=:datatype=string:numsamps=1
  ScalarProperty name=.childBnds:interpretation=box:datatype=float64_t[6]:numsamps=1
  Xform:
    trans
Object: name = /pPlane1
  CompoundProperty name=.xform:schema=AbcGeom_Xform_v3
    ScalarProperty name=.ops:interpretation=:datatype=uint8_t:numsamps=1
    ArrayProperty name=.animChans:interpretation=:datatype=uint32_t:numsamps=1
    ScalarProperty name=isNotConstantIdentity:interpretation=:datatype=bool_t:numsamps=1
    ScalarProperty name=.inherits:interpretation=:datatype=bool_t:numsamps=1
    ScalarProperty name=.vals:interpretation=:datatype=float64_t[3]:numsamps=1
# of samples: 0
min time    : 0
max time    : 0

There are node info, but lacks any primitive parameters(e.g. P, N)

3) AbcExport -j "-root |pPlane1 -file /path/to/file.abc";

When I specify a geometry explicitly, which gives,

$ ls -la file.abc 
-rw-r--r--  1 syoyo  staff  9686 Sep  7 02:32 file.abc

// Alembic file info:
  # of children: 1
  ScalarProperty name=statistics:interpretation=:datatype=string:numsamps=1
  ScalarProperty name=.childBnds:interpretation=box:datatype=float64_t[6]:numsamps=1
  Xform:
    trans
Object: name = /pPlane1
  CompoundProperty name=.xform:schema=AbcGeom_Xform_v3
    ScalarProperty name=.ops:interpretation=:datatype=uint8_t:numsamps=1
    ArrayProperty name=.animChans:interpretation=:datatype=uint32_t:numsamps=1
    ScalarProperty name=isNotConstantIdentity:interpretation=:datatype=bool_t:numsamps=1
    ScalarProperty name=.inherits:interpretation=:datatype=bool_t:numsamps=1
    ScalarProperty name=.vals:interpretation=:datatype=float64_t[3]:numsamps=1
  PolyMesh:
  # of samples = 1
  # of positions = 4
  # of counts    = 1
Object: name = /pPlane1/pPlaneShape1
  CompoundProperty name=.geom:schema=AbcGeom_PolyMesh_v1
    ArrayProperty name=.faceCounts:interpretation=:datatype=int32_t:numsamps=1
    ArrayProperty name=.faceIndices:interpretation=:datatype=int32_t:numsamps=1
    ArrayProperty name=P:interpretation=point:datatype=float32_t[3]:numsamps=1
    ArrayProperty name=N:interpretation=normal:datatype=float32_t[3]:numsamps=1
    ScalarProperty name=.selfBnds:interpretation=box:datatype=float64_t[6]:numsamps=1
# of samples: 1
min time    : 0
max time    : 0

As far as I know, I didn't get this strange behavior in Alembic 1.0.4.

FYI, I'm using Maya 2012 x64 SP on Mac SnowLeopard.

Original comment by syoyofuj...@gmail.com on 6 Sep 2012 at 5:39

GoogleCodeExporter commented 9 years ago
I mean  "-sl" option works correctly > As far as I know, I didn't get this 
strange behavior in Alembic 1.0.4.

Original comment by syoyofuj...@gmail.com on 6 Sep 2012 at 5:41

GoogleCodeExporter commented 9 years ago
When you create the plane (via polyPlane for example), only the parent 
transform is actually selected by default.

Original comment by miller.lucas on 6 Sep 2012 at 5:58

GoogleCodeExporter commented 9 years ago
So did you changed the behavior of "-sl" in ver 1.1 from 1.0.4? I think only 
exporting transformation node is meaning less in most case.

Original comment by syoyofuj...@gmail.com on 6 Sep 2012 at 6:05

GoogleCodeExporter commented 9 years ago
Yes, there was this change:
http://code.google.com/r/millerlucas-dev/source/detail?r=157df2c32ff09148af53116
72f791d1e151ea9d5

Exporting only transforms is a valid workflow.

If you find that using -selection is deficient because you do not want to 
select the appropriate meshes, you can use -root to write out all nodes at and 
below the specified node.

Original comment by miller.lucas on 6 Sep 2012 at 6:28

GoogleCodeExporter commented 9 years ago
Hmm...

So what is best way to export multple selection nodes including its child shape 
nodes(selection done on Maya viewport will select xfrom node) as easy as 
previous "-sl" option?

Original comment by syoyofuj...@gmail.com on 7 Sep 2012 at 6:58

GoogleCodeExporter commented 9 years ago
You can select things in the Maya viewport and press the down key, that should 
select the shapes in most cases.

Original comment by miller.lucas on 7 Sep 2012 at 4:45