Chad Vernon
  • Home
  • Reel/Resume
  • Work
  • Resources
  • About
  • Contact
sideBar

Search

Categories

  • CG
  • cvxporter
  • Maya
    • API
    • Plug-ins
  • Personal

Archives

  • May 2012
  • March 2012
  • September 2011
  • June 2011
  • March 2011
  • December 2010
  • November 2010
  • September 2010
  • August 2010
  • July 2010
  • May 2010
  • April 2010
  • March 2010
  • December 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007
  • August 2007

Rss

  • Main Entries RSS
  • Comments RSS
Home » Resources » cvRivet

cvRivet

Description

A node that lets you rivet to polygonal meshes, nurbs surfaces, and nurbs curves. This lets you attach transforms to shapes.

The cvRivet dependency node can drive multiple rivets as shown below:

Node Reference

Long Name Type Default
rivetTranslation
Output translation value
multi-point 0
rivetRotation
Output rotation value
multi-point 0
vertexId
Rivet vertex id for mesh rivet.
multi-int 0
upVertexId
Vertex id of up vector for mesh rivet.
multi-int 0
UCoord
U coordinate to rivet to for surfaces and curves.
multi-float 0.0
VCoord
V coordinate to rivet to for surfaces.
multi-float 0.0
calculateRotation
Set to false to only calculate translation values. Can be used as an optimization.
bool true
upObject
Matrix of a transform to use as an up object.
multi-matrix identity
useUpObject
True to use an explicit up object. If false, the up vector is determined by:
Meshes – An adjacent vertex.
Surfaces – The surface tangent.
Curves – A y vector (0, 1, 0)
multi-bool false
inMesh
Geometry to rivet to (mesh, surface, or curve)
generic null

Usage Notes

Create a Rivet

Rivets of each type (meshes, surfaces, and curves) are created with the same command. You can create rivets by selection or solely by command. For meshes, select one or more vertices. For surfaces, selected one or more surface points. For curves, select one or more curve points.

import cvRivet
cvRivet.create(shape=None, cvs=[], rotation=True, newRivetNode=False, upObject=None)
    """
    Sets up a cvRivet node on a mesh, nurbsCurve, or nurbsSurface.

    Mesh:
        Select vertices on a mesh and run:

        import rivet
        rivet.create()
            or
        rivet.create('meshName', [2,4,53,3])

    Nurbs Surface:
        Select a surface point and run:

        import rivet
        rivet.create()
            or
        rivet.create('surfaceName', [[0.2, 0.5], [0.4, 0.3]])

    Nurbs Curve:
        Select a curve point and run:

        import rivet
        rivet.create()
            or
        rivet.create('curveName', [0.0, 0.3, 0.5])

    Parameters:
        shape - Name of the shape to rivet to.
        cvs   - List of cvs to rivet to.  For meshes, this should be a list of vertex indices.
                For nurbs surfaces, this should be a list of lists of uv coordinate pairs.
                For nurbs curves, this should be a list of u coordinates.
        newRivetNode - If True, a new rivet dependency node will be created to calculate the rivets.  If False, an existing rivet node will be used.
        upObject - Specifies a transform to use as an up vector.

    Returns:
        A list of lists of length 3.  The first element will be the name of the rivet node.
        The second element will be the name of the locator that is connected to the rivet.
        The third element is the index of the rivet on the rivet node.

    """

Once the rivets are created, you can adjust the rivet attributes using the attributes added to the riveted locators.

Setting a New Up Vector Object

Select the riveted locator, shift select the new up object:

import cvRivet
cvRivet.setUpObject()

or

cvRivet.setUpObject('rivetedLocatorName', 'newUpObject')

No Responses to “cvRivet”

Subscribes to this topic Comment RSS or TrackBack URL

Leave A Reply

Allowed tag : <blockquote>, <p>, <code>, <em>, <small>, <ul>, <li>, <ol>, <a href=>..

 Username

 Email Address

 Website

Sticky: Always double check your comment before posting Please Note: Comment Moderation Maybe Active So There Is No Need To Resubmit Your Comments
Home » Resources » cvRivet

© 2011 Chad Vernon