mmSolver.tools.attachbundletocurve#

Attach a Bundle node to a NURBS curve, ready to be solved.

Tools#

Attach Bundle to Curve tool. Attaches a bundle node to a NURBs curve.

mmSolver.tools.attachbundletocurve.tool.main()#

Renames selected markers and bundles (and the connected nodes).

Library#

Attach Bundle to Curve tool. Attaches a bundle node to a NURBs curve.

mmSolver.tools.attachbundletocurve.lib.get_nurbs_curve_nodes(nodes)#

Get the NURBS curve shape nodes from the given nodes.

Parameters:

nodes ([str, ..]) – Nodes to query.

Returns:

List of NURBS curve shape nodes.

Return type:

[str, ..]

mmSolver.tools.attachbundletocurve.lib.get_closest_point_on_nurbs_curve(pos, crv_shp_node)#

Get the position along a NURBS curve that is closest to the input position.

Position is expected to be in world space.

Parameters:
  • pos ([float, float, float]) – Position of the input to find closest point.

  • crv_shp_node (str) – NURBS curve shape node.

Returns:

Tuple of world space position and percentage along the NURBS curve.

Return type:

([float, float, float], float)

mmSolver.tools.attachbundletocurve.lib.connect_transform_to_nurbs_curve(tfm_node, crv_shp_node, attr_name)#

Connect a transform node to a NURBS curve.

The attribute created will range from 0.0 to 1.0, with a default value of 0.5.

Parameters:
  • tfm_node (str) – Transform node to connect to the NURBS curve.

  • crv_shp_node (str) – NURBS curve shape node to connect to.

  • attr_name (str) – Attribute name to create on the transform.

Returns:

A ‘pointOnCurveInfo’ node name connected between the transform and curve.

Return type:

str

mmSolver.tools.attachbundletocurve.lib.attach_bundle_to_curve(bnd_node, crv_shp_node, attr_name)#

Connect a Bundle node to a NURBS curve, and create an attribute to control the position along the curve.

Parameters:
  • bnd_node (str) – Bundle (transform) node to connect to the NURBS curve.

  • crv_shp_node (str) – NURBS curve shape node to connect to.

  • attr_name (str) – Attribute name to create on the bundle node.

Returns:

The ‘node.attr’ to be controlled for bundle movement along the curve.

Return type:

str

Constants#

Attach Bundle to Curve tool.