alignutils module

class alignutils.CoordFrame(origin=<hou.Vector3 [0, 0, 0]>, x=<hou.Vector3 [1, 0, 0]>, y=<hou.Vector3 [0, 1, 0]>, z=<hou.Vector3 [0, 0, 1]>, normalize=False)
flippedAboutUp(to_normal, target_up_vector)
flippedAboutX()
flippedAboutY()
flippedAboutZ()
spaceChangeTransform(dst_frame)
transform(xform)
transformed(xform)
alignutils.alignObject(src_obj, src_frame, dst_obj, dst_frame)

Changes the pivot space on src_obj to the equivalent of src_frame, and transforms src_obj to align src_frame with dst_frame on dst_obj.

alignutils.buildConnectedSelectionFromEdges(seed_edges)

Utility function for creating a hou.Selection() containing all the primitives connected to a list of seed edges.

alignutils.buildConnectedSelectionFromPoints(seed_points)

Utility function for creating a hou.Selection() containing all the points connected to a list of seed points.

alignutils.buildConnectedSelectionFromPrims(seed_prims)

Utility function for creating a hou.Selection() containing all the primitives connected to a list of seed primitives.

alignutils.buildConnectedSelectionFromSelComponent(selection, component_index, geometry)

Convenience function wrapping the various selections for which we can build a connected selection per component.

alignutils.buildCoordFrameXY(origin, xvec, yvec)
alignutils.buildCoordFrameXZ(origin, xvec, zvec)
alignutils.buildCoordFrameYX(origin, yvec, xvec)
alignutils.buildCoordFrameZX(origin, zvec, xvec)
alignutils.buildEdgeCoordFrame(geometry, edge, to_normal, target_up_vector)
alignutils.buildPointCoordFrame(geometry, point, to_normal, target_up_vector)
alignutils.buildPrimCoordFrame(geometry, prim, to_normal, target_up_vector)
alignutils.buildSelCoordFrame(geometry, sel, comp_index, to_normal, target_up_vector)
alignutils.buildSrcSpaceCoordFrames(src_node, src_sel, src_comp_index, dst_node, dst_sel, dst_comp_index, to_normal, target_up_vector)

Returns a tuple of CoordFrame objects representing the local coordinate frames of the two specified components in the source and destination selections.

alignutils.buildVertexCoordFrame(geometry, vertex, to_normal, target_up_vector)
alignutils.findPointXAlignDir(point, target_up_vector)
alignutils.findPrimXAlignDir(prim, target_up_vector)
alignutils.getObject(node)
alignutils.initNewSopFromGeometrySelection(newnode, container, geoselection, groupparminfo)

Set up the connections and group parameters of a new SOP from a hou.GeometrySelection.

alignutils.initNewSopFromSelection(newnode, container, inputnode, selection, geometry, groupparminfo, inheritselectabletemplateflags)

Set up the connections and group parameters of a new SOP from an input node and optional hou.Selection. If selection == None the group type is assumed to be primitives and the empty group string is used to affect all the geometry.

alignutils.initSopParmTransform(node, src_frame, dst_frame)

Initializes the standard transform parms on the given SOP node so that the transform aligns src_frame with dst_frame with the pivot transform aligned to src_frame.

alignutils.interactiveAlign(pane=None, quick_mode=True)

Queries the user for a source component and a target component, and transforms the geometry to align the source with the target. How this transform occurs depends on what level the operation is done. At the object level, the transform is done in the source object’s transform, and at the SOP level a transform SOP is appended.

Set quick_mode to False to allow selecting more than one source and target component at once.

alignutils.interactiveObjectAlign(pane=None, quick_mode=True)

The object level implementation of interactiveAlign().

alignutils.interactiveSopAlign(pane=None, quick_mode=True)

The SOP level implementation of interactiveAlign().

alignutils.marshalGeometrySelectionToSingletonTupleList(geo_sel)

Utility function for marshalling a hou.GeometrySelection potentially consisting of multiple nodes and hou.Selection instances with multiple components into a list of (node, selection, index) tuples.

alignutils.primBaryCenter(prim)
alignutils.setGroupParmsOnSop(node, groupparmname, selectionstring, grouptypeparmname, grouptypevalue)
alignutils.setObjParmPivotTransform(obj, new_pivot_xform)

Sets the pivot transform parameters so that the net pivot transform is new_pivot_xform and updates the object pre-transform so that the net world transform of the object remains unchanged.

alignutils.showError(msg)
alignutils.targetUpVector(scene_viewer)