zQueryΒΆ

Query the Ziva scene setup to find nodes of particular types or relationships.

       zQuery [flags] [<node>...]
       -h     -help              <n/a>       this message
       -t     -type              <string>    Returns the nodes of the specified type connected to the selected simulation bodies.
                                             Supported node types are:
                                             zTissue, zBone, zCloth, zTet, zFiber, zMaterial, zGeo, zAttachment,
                                             zSolver, zSolverTransform, zEmbedder, zCache, zCacheTransform.
       -a     -allTypes          <n/a>       Returns all Ziva nodes associated with the given selection.
       -m     -mesh              <n/a>       Returns the maya meshes of the selected simulation bodies.
                                             Can be used in combination with -type to filter the meshes that are returned based
                                             on their association to nodes of the requested type.
       -cm    -collisionMesh     <n/a>       Returns a collision mesh affiliated with the selected tissue or cloth.
       -em    -embeddedMeshes    <n/a>       Returns any additional embedded meshes attached to the selected tissue or cloth.
       -as    -attachmentSource  <n/a>       Returns the source geometry of the selected attachments.
       -at    -attachmentTarget  <n/a>       Returns the target geometry of the selected attachments.
       -bt    -bodyType          <n/a>       Returns the body type (zBone, zTissue, or zCloth) of the selected simulation bodies.
                                             Can be used in combination with the -attachmentSource and -attachmentTarget flags, in which case
                                             the body types of the source/target bodies are returned instead of their meshes.
       -l     -longNames         <n/a>       Returned nodes will be given by fully-qualified long names. Default: Return unqualified short names.

       Usage:
       First, select the desired node(s) about which you want to query related Ziva simulation information.
       The node(s) can be provided to the command either by name, or in the current scene selection.
       The zQuery command will search for nodes of the requested type connected to the selected simulation
       bodies and/or solvers.
       If nothing is selected, the entire Maya scene will be searched.

       To select a simulation body, you can select the mesh or transform of that body, any of the Ziva
       dependency nodes that are part of that body (eg: zGeo, zBone, zMaterial, etc.),
       any Ziva nodes that solve and deform that body (eg: zSolver, zEmbedder, zCache, etc.),
       or any zAttachment nodes that constrain that body.

       To select an attachment, select the zAttachment node representing that attachment.

Examples:
 string $allZivaNodes[] = `zQuery -a`;
 string $tissues[] = `zQuery -t "zTissue"`;
 string $meshes[] = `zQuery -m zSolver1`;
 string $collisionMesh[] = `zQuery -cm myTissue`;
 string $bodyType = `zQuery -bt pSphereShape5`;
 string $sources[] = `zQuery -as attachment3`;
 string $sourceTypes[] = `zQuery -as -bt attachment3`;