HyperPoint#

HyperPoint.__init__(self)#

as_HyperPointMain_v1.2

About :#

Author: (Subbaiah) Subbu Addanki Character Supervisor (Rigging) & Programmer

Visit :#

http://www.pythonscripting.com http://subbuadd.blogspot.com

Contact :#

Mail Id: subbu.add@gmail.com Mobile No: +91-9741454400 / +91-9949005359

HyperPoint.adjustCloseToObj(self, srcObj, srcDistObj, trgtObjOrPos, stepVal=0.001, action='scale', rotateDir='ry', showProgress=True, **shArgs)#

[shArgs : so=srcObj, sdo=srcDistObj, to=trgtObjOrPos, sv=stepVal, a=action, rd=rotateDir, sp=showProgress]

Purpose:

:: Adjusts the source object’s scale or rotation to bring it closer to a target object or position. The function iteratively scales or rotates the source object until it reaches a specified proximity to the target.

Parameters:
  • srcObj – <obj> # The source object to be scaled or rotated.

  • srcDistObj – <obj> # The object used to measure the distance to the target.

  • trgtObjOrPos – <obj/position> # The target object or position to adjust the source object towards.

  • stepVal – <float>, optional (default=0.001) # The incremental value for each step in scaling or rotating.

  • action – <str>, optional (default=’scale’) # The type of adjustment: ‘scale’ or ‘rotate’.

  • rotateDir – <str>, optional (default=’ry’) # The axis of rotation if the action is ‘rotate’.

  • showProgress – <bool>, optional (default=True) # Whether to show progress during the adjustment.

Returns:

None # This function does not return a value but modifies the source object’s transformation.

Code Examples:

>>> adjustCloseToObj("pCube1", "pCube2", [1, 2, 3], stepVal=0.002, action='rotate', rotateDir='rx')
# This example rotates 'pCube1' around the x-axis in small increments towards the position [1, 2, 3].
graph TD Start[("fa:fa-play Start")] --> Initialize[("fas:fa-cogs Initialize Function")] Initialize --> CheckShArgs{"/fas:fa-question-circle Check shArgs"} CheckShArgs --"Arguments Provided"--> PrepareAdjustment[("fas:fa-sliders-h Prepare Adjustment")] PrepareAdjustment --> PerformAction{"/fas:fa-sync-alt Perform Action"} PerformAction --"Scale"--> ScaleObject[("fas:fa-search-plus Scale Object")] PerformAction --"Rotate"--> RotateObject[("fas:fa-undo-alt Rotate Object")] ScaleObject --> CheckDistance RotateObject --> CheckDistance CheckDistance{"/fas:fa-ruler-combined Check Distance"} --"Distance Decreasing"--> UpdateStep CheckDistance --"Distance Not Decreasing"--> EndAdjustment[("fas:fa-ban End Adjustment")] UpdateStep[("fas:fa-arrow-up Update Step Value")] --> PerformAction EndAdjustment --> End[("fas:fa-stop End")] style Start fill:#00cc00,stroke:#000,stroke-width:3px style Initialize fill:#ffcc00,stroke:#000,stroke-width:2px style CheckShArgs fill:#99ff99,stroke:#000,stroke-width:2px style PrepareAdjustment fill:#cc99ff,stroke:#000,stroke-width:2px style PerformAction fill:#ffcc99,stroke:#000,stroke-width:2px style ScaleObject fill:#99ccff,stroke:#000,stroke-width:2px style RotateObject fill:#99ccff,stroke:#000,stroke-width:2px style CheckDistance fill:#ffcc99,stroke:#000,stroke-width:2px style UpdateStep fill:#cc99ff,stroke:#000,stroke-width:2px style EndAdjustment fill:#ff6666,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the adjustCloseToObj function:

  1. The function initializes and checks if shArgs are provided.

  2. Based on the provided arguments, it prepares for either scaling or rotating the source object.

  3. The action (scaling or rotating) is performed iteratively.

  4. After each action, it checks the distance to the target.

  5. If the distance is decreasing, the step value is updated and the action continues.

  6. If the distance is not decreasing, the adjustment ends.

  7. The function concludes after completing the adjustments.

HyperPoint.adjustTillInsideMesh(self, srcObj, srcDistObj, trgtMesh, stepVal=-0.001, action='scale', rotateDir='ry', minScale=0.05, **shArgs)#

[shArgs : so=srcObj, sdo=srcDistObj, tm=trgtMesh, sv=stepVal, a=action, rd=rotateDir, ms=minScale]

Purpose:

:: Adjusts the source object’s scale or rotation until it is inside a target mesh. This function is useful in scenarios where an object needs to be positioned precisely within a mesh boundary, often in rigging and collision detection.

Parameters:
  • srcObj – <obj> # The source object to be adjusted.

  • srcDistObj – <obj> # An object representing the distance reference point.

  • trgtMesh – <obj> # The target mesh to check for containment.

  • stepVal – <float>, optional (default=-0.001) # The incremental step value for scaling or rotating.

  • action – <str>, optional (default=’scale’) # The type of adjustment: ‘scale’ or ‘rotate’.

  • rotateDir – <str>, optional (default=’ry’) # The axis of rotation if the action is ‘rotate’.

  • minScale – <float>, optional (default=0.05) # The minimum scale limit to prevent infinite scaling down.

Returns:

<bool> # Returns True if the object is adjusted inside the mesh, False otherwise.

Code Examples:

>>> adjustTillInsideMesh("pCube1", "pCube2", "pMesh1", stepVal=-0.002, action='scale')
# This example scales 'pCube1' down in small increments until it is inside 'pMesh1'.
    HP.adjustTillInsideMesh('L_Palm_HndCtrl', 'L_Palm_Curve_5_HndCtrl', 'body', stepVal=-0.001, action='scale')
graph TD Start[("fa:fa-play Start")] --> Initialize[("fas:fa-cogs Initialize Function")] Initialize --> CheckMeshContainment{"/fas:fa-question-circle Check If Mesh Contains Point"} CheckMeshContainment --"Contained"--> EndAdjustment[("fas:fa-check-circle End Adjustment")] CheckMeshContainment --"Not Contained"--> PerformAction{"/fas:fa-sync-alt Perform Action"} PerformAction --"Scale"--> ScaleObject[("fas:fa-search-minus Scale Object")] PerformAction --"Rotate"--> RotateObject[("fas:fa-undo-alt Rotate Object")] ScaleObject --> CheckContainment RotateObject --> CheckContainment CheckContainment{"/fas:fa-ruler-combined Check Mesh Containment"} --"Contained"--> EndAdjustment CheckContainment --"Not Contained"--> CheckMinScale CheckMinScale{"/fas:fa-ruler-vertical Check Min Scale"} --"Below Min Scale"--> EndAdjustment CheckMinScale --"Above Min Scale"--> UpdateStep[("fas:fa-arrow-up Update Step Value")] UpdateStep --> PerformAction EndAdjustment --> End[("fas:fa-stop End")] style Start fill:#00cc00,stroke:#000,stroke-width:3px style Initialize fill:#ffcc00,stroke:#000,stroke-width:2px style CheckMeshContainment fill:#99ff99,stroke:#000,stroke-width:2px style PerformAction fill:#ffcc99,stroke:#000,stroke-width:2px style ScaleObject fill:#99ccff,stroke:#000,stroke-width:2px style RotateObject fill:#99ccff,stroke:#000,stroke-width:2px style CheckContainment fill:#ffcc99,stroke:#000,stroke-width:2px style CheckMinScale fill:#ff9999,stroke:#000,stroke-width:2px style UpdateStep fill:#cc99ff,stroke:#000,stroke-width:2px style EndAdjustment fill:#ff6666,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the adjustTillInsideMesh function:

  1. The function initializes and checks if the source object is already inside the target mesh.

  2. If not inside, it adjusts the object’s scale or rotation based on the action specified.

  3. After each adjustment, it checks again for mesh containment.

  4. The process repeats, adjusting the object until it is contained within the mesh or reaches the minimum scale limit.

  5. The function concludes once the object is inside the mesh or the minimum scale is reached.

HyperPoint.alignHndCtrls(self, hndCtrl=None, alignAxis='x')#

[shArgs : hc=hndCtrl, aa=alignAxis]

Purpose:

:: Aligns hand control objects along a specified axis. This function is particularly useful in character rigging, where precise alignment of control handles is required for animating hand movements.

Parameters:
  • hndCtrl – <obj>, optional # The hand control object to align with its siblings. If not provided, uses the currently selected object.

  • alignAxis – <str>, optional (default=’x’) # The axis along which the hand controls will be aligned (‘x’, ‘y’, or ‘z’).

Returns:

None # This function does not return a value but modifies the positions of hand control objects.

Code Examples:

>>> alignHndCtrls("leftHandCtrl", alignAxis='y')
# This example aligns the sibling hand controls of 'leftHandCtrl' along the y-axis.
graph TD Start[("fa:fa-play Start")] --> Initialize[("fas:fa-cogs Initialize Function")] Initialize --> CheckHandControl{"/fas:fa-question-circle Check Hand Control"} CheckHandControl --"Hand Control Provided"--> UseProvidedControl[("fas:fa-hand-point-up Use Provided Control")] CheckHandControl --"Hand Control Not Provided"--> UseSelectedControl[("fas:fa-mouse-pointer Use Selected Control")] UseProvidedControl --> GetSiblingControls[("fas:fa-users Get Sibling Controls")] UseSelectedControl --> GetSiblingControls GetSiblingControls --> AlignControls{"/fas:fa-ruler-combined Align Controls"} AlignControls --"Align on X-axis"--> AlignX[("fas:fa-arrows-alt-h Align X")] AlignControls --"Align on Y-axis"--> AlignY[("fas:fa-arrows-alt-v Align Y")] AlignControls --"Align on Z-axis"--> AlignZ[("fas:fa-arrows-alt-v Align Z")] AlignX --> End[("fas:fa-stop End")] AlignY --> End AlignZ --> End style Start fill:#00cc00,stroke:#000,stroke-width:3px style Initialize fill:#ffcc00,stroke:#000,stroke-width:2px style CheckHandControl fill:#99ff99,stroke:#000,stroke-width:2px style UseProvidedControl fill:#cc99ff,stroke:#000,stroke-width:2px style UseSelectedControl fill:#cc99ff,stroke:#000,stroke-width:2px style GetSiblingControls fill:#99ccff,stroke:#000,stroke-width:2px style AlignControls fill:#ffcc99,stroke:#000,stroke-width:2px style AlignX fill:#99ccff,stroke:#000,stroke-width:2px style AlignY fill:#99ccff,stroke:#000,stroke-width:2px style AlignZ fill:#99ccff,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the alignHndCtrls function:

  1. The function starts and checks if a hand control object is provided.

  2. If provided, it uses the specified control; otherwise, it uses the currently selected control.

  3. It then retrieves the sibling controls of the hand control.

  4. Based on the specified axis, the function aligns the sibling controls to the position of the primary hand control.

  5. The function ends after aligning the controls along the specified axis.

HyperPoint.as_PlaceAllJoints(self)#

Purpose:

:: Places all joints for a given model, typically a bird, based on specific criteria and alignment. This function is specifically designed for rigging processes in 3D animation and modeling, where joint placement is crucial for realistic movement and deformation.

  • The function determines the placement of joints such as spine, tail, neck, jaw, and wings based on various positional references and alignment criteria.

  • It involves complex calculations and conditional logic to accurately position the joints in relation to the model’s geometry.

Returns:

None # This function does not return a value but adjusts the positions of various joints in the model.

Code Examples:

>>> as_PlaceAllJoints()
# This example will place all the joints for the currently selected bird model as per the defined criteria.
graph TD Start[("fa:fa-play Start")] --> Initialize[("fas:fa-cogs Initialize Function")] Initialize --> PrepareReferences[("fas:fa-map-marker-alt Prepare References")] PrepareReferences --> PlaceSpineJoints[("fas:fa-align-justify Place Spine Joints")] PlaceSpineJoints --> PlaceTailJoints[("fas:fa-tail-feather Place Tail Joints")] PlaceTailJoints --> PlaceNeckJoints[("fas:fa-necklace Place Neck Joints")] PlaceNeckJoints --> PlaceJawJoints[("fas:fa-tooth Place Jaw Joints")] PlaceJawJoints --> PlaceWingJoints[("fas:fa-feather-alt Place Wing Joints")] PlaceWingJoints --> FinalAdjustments[("fas:fa-tools Final Adjustments")] FinalAdjustments --> End[("fas:fa-stop End")] style Start fill:#00cc00,stroke:#000,stroke-width:3px style Initialize fill:#ffcc00,stroke:#000,stroke-width:2px style PrepareReferences fill:#99ccff,stroke:#000,stroke-width:2px style PlaceSpineJoints fill:#99ff99,stroke:#000,stroke-width:2px style PlaceTailJoints fill:#ffcc99,stroke:#000,stroke-width:2px style PlaceNeckJoints fill:#cc99ff,stroke:#000,stroke-width:2px style PlaceJawJoints fill:#ff9999,stroke:#000,stroke-width:2px style PlaceWingJoints fill:#ffcc00,stroke:#000,stroke-width:2px style FinalAdjustments fill:#cccccc,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the as_PlaceAllJoints function:

  1. The function begins by initializing and preparing various reference points and nodes.

  2. It then proceeds to place spine, tail, neck, jaw, and wing joints based on the model’s geometry and predefined logic.

  3. The function makes several adjustments to the positions and orientations of these joints to ensure proper alignment.

  4. The process involves complex conditional checks and spatial calculations to achieve precise joint placement.

  5. The function concludes once all joints are correctly positioned and oriented as per the rigging requirements.

HyperPoint.getConnectedVertices(self, vtxList=None)#

[shArgs : vl=vtxList]

Purpose:

:: Retrieves the vertices connected to the given list of vertices in a polygonal mesh. This function is essential in 3D modeling and rigging for manipulating mesh geometry.

Parameters:

vtxList – <list>, optional # A list of vertices to find connected vertices for. If not provided, uses the current selection.

Returns:

<list> # A list of vertices that are connected to the input vertices.

Code Examples:

>>> selected_vertices = ["pCube1.vtx[0]", "pCube1.vtx[1]"]
>>> connected_vertices = getConnectedVertices(selected_vertices)
# Returns the vertices connected to the first two vertices of 'pCube1'.
graph TD Start[("fa:fa-play Start")] --> Initialize[("fas:fa-cogs Initialize Function")] Initialize --> CheckVtxList{"/fas:fa-question-circle Check Vertex List"} CheckVtxList --"vtxList provided"--> UseProvidedList[("fas:fa-list-ol Use Provided List")] CheckVtxList --"vtxList not provided"--> UseSelection[("fas:fa-mouse-pointer Use Current Selection")] UseProvidedList --> GrowSelection[("fas:fa-expand-arrows-alt Grow Polygon Selection Region")] UseSelection --> GrowSelection GrowSelection --> DeselectOriginal[("fas:fa-minus-circle Deselect Original Vertices")] DeselectOriginal --> GetConnected[("fas:fa-link Get Connected Vertices")] GetConnected --> End[("fas:fa-stop End")] style Start fill:#00cc00,stroke:#000,stroke-width:3px style Initialize fill:#ffcc00,stroke:#000,stroke-width:2px style CheckVtxList fill:#99ff99,stroke:#000,stroke-width:2px style UseProvidedList fill:#cc99ff,stroke:#000,stroke-width:2px style UseSelection fill:#cc99ff,stroke:#000,stroke-width:2px style GrowSelection fill:#99ccff,stroke:#000,stroke-width:2px style DeselectOriginal fill:#ffcc99,stroke:#000,stroke-width:2px style GetConnected fill:#99ff99,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the getConnectedVertices function:

  1. The function starts and checks if a vertex list is provided.

  2. If a vertex list is provided, it uses that list; otherwise, it uses the currently selected vertices.

  3. It then grows the selection region to include connected vertices.

  4. The original vertices in the list are deselected, leaving only the connected vertices selected.

  5. The connected vertices are then retrieved and returned.

  6. The function ends after returning the list of connected vertices.

HyperPoint.getDirLoc_fromInsideMesh(self, srcLoc, meshName, locDir=[0, 1, 0], longestLoc=0, getLoc=1, locName='as_DirLoc', mSpace=1)#

[shArgs : sl=srcLoc, mn=meshName, ld=locDir, ll=longestLoc, gl=getLoc, ln=locName, ms=mSpace]

Purpose:

:: Creates a locator at a specific direction and distance from a source location, within or on the surface of a specified mesh. This function is crucial in 3D modeling and animation for precise spatial positioning relative to mesh geometry.

Parameters:
  • srcLoc – <obj> # The source locator from which to calculate the direction.

  • meshName – <obj> # The mesh within which the directional locator is to be placed.

  • locDir – <list>, optional (default=[0, 1, 0]) # The direction in which to place the locator relative to the source location.

  • longestLoc – <int>, optional (default=0) # Determines whether to calculate the farthest (1) or closest (0) point in the specified direction.

  • getLoc – <int>, optional (default=1) # Specifies whether to return the locator (1) or just its position (0).

  • locName – <str>, optional (default=’as_DirLoc’) # The name for the created locator.

  • mSpace – <int>, optional (default=1) # The transformation space in which to calculate translations.

Returns:

<obj/None> # Returns the created locator or its position, or None if no suitable location is found.

Code Examples:

>>> getDirLoc_fromInsideMesh("Head_HyperPnt", "body", [0, -1, 0], longestLoc=1, getLoc=1, locName='DirectionLocator')
# This example creates a locator named 'DirectionLocator' below the 'Head_HyperPnt' within the 'body' mesh.
graph TD Start[("fa:fa-play Start")] --> Initialize[("fas:fa-cogs Initialize Function")] Initialize --> CheckSourceLocation{"/fas:fa-question-circle Check Source Location"} CheckSourceLocation --"Source Exists"--> PrepareDirection[("fas:fa-arrow-right Prepare Direction")] PrepareDirection --> CalculatePosition[("fas:fa-calculator Calculate Position")] CalculatePosition --> DetermineLongestOrClosest{"/fas:fa-balance-scale Determine Longest/Closest"} DetermineLongestOrClosest --"Longest"--> GetLongestPosition[("fas:fa-arrows-alt-v Get Longest Position")] DetermineLongestOrClosest --"Closest"--> GetClosestPosition[("fas:fa-compress-arrows-alt Get Closest Position")] GetLongestPosition --> FinalizeLocator GetClosestPosition --> FinalizeLocator FinalizeLocator --> End[("fas:fa-stop End")] style Start fill:#00cc00,stroke:#000,stroke-width:3px style Initialize fill:#ffcc00,stroke:#000,stroke-width:2px style CheckSourceLocation fill:#99ff99,stroke:#000,stroke-width:2px style PrepareDirection fill:#cc99ff,stroke:#000,stroke-width:2px style CalculatePosition fill:#ffcc99,stroke:#000,stroke-width:2px style DetermineLongestOrClosest fill:#ff9999,stroke:#000,stroke-width:2px style GetLongestPosition fill:#99ccff,stroke:#000,stroke-width:2px style GetClosestPosition fill:#99ccff,stroke:#000,stroke-width:2px style FinalizeLocator fill:#cccccc,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the getDirLoc_fromInsideMesh function:

  1. The function begins by initializing and validating the source location.

  2. It then prepares the direction vector based on the specified parameters.

  3. The position for the locator is calculated in the specified direction from the source location.

  4. Based on whether the longest or closest position is required, it either finds the farthest or nearest point in the specified direction.

  5. The function then finalizes the locator or position, depending on the ‘getLoc’ parameter.

  6. The function concludes after creating the locator or determining the position.

HyperPoint.getEndHndCtrl(self, mainHndCtrl, getAllChdCtrls=False, bipedSetup=False)#

[shArgs : mhc=mainHndCtrl, gacc=getAllChdCtrls, bs=bipedSetup]

Purpose:

:: Retrieves the end hand control from a hierarchy of controls, with options for biped setups and retrieving all child controls. This function is used in rigging for 3D animation, where determining the end control of a rigging chain is necessary for animations and deformations.

Parameters:
  • mainHndCtrl – <obj> # The main hand control from which to start the search.

  • getAllChdCtrls – <bool>, optional (default=False) # If True, retrieves all child hand controls. If False, retrieves only the last hand control.

  • bipedSetup – <bool>, optional (default=False) # Specifies if the rig setup is a biped, affecting the hierarchy search method.

Returns:

<obj/list> # Returns the last hand control or a list of all child hand controls, depending on parameters.

Code Examples:

>>> getEndHndCtrl("Spine_Curve_1_HndCtrl")
# Retrieves the last hand control in the chain starting from 'Spine_Curve_1_HndCtrl'.
graph TD Start[("fa:fa-play Start")] --> Initialize[("fas:fa-cogs Initialize Function")] Initialize --> CheckBipedSetup{"/fas:fa-user-alt Check Biped Setup"} CheckBipedSetup --"Biped Setup"--> GetParentChildren[("fas:fa-users Get Parent's Children")] CheckBipedSetup --"Standard Setup"--> GetChildren[("fas:fa-child Get Children")] GetParentChildren --> DetermineReturn GetChildren --> DetermineReturn DetermineReturn{"/fas:fa-decision Determine What to Return"} --"All Child Controls"--> ReturnAllChildControls[("fas:fa-hand-holding Return All Child Controls")] DetermineReturn --"Last Hand Control"--> ReturnLastHandControl[("fas:fa-hand-paper Return Last Hand Control")] ReturnAllChildControls --> End[("fas:fa-stop End")] ReturnLastHandControl --> End style Start fill:#00cc00,stroke:#000,stroke-width:3px style Initialize fill:#ffcc00,stroke:#000,stroke-width:2px style CheckBipedSetup fill:#99ff99,stroke:#000,stroke-width:2px style GetParentChildren fill:#cc99ff,stroke:#000,stroke-width:2px style GetChildren fill:#cc99ff,stroke:#000,stroke-width:2px style DetermineReturn fill:#ffcc99,stroke:#000,stroke-width:2px style ReturnAllChildControls fill:#99ccff,stroke:#000,stroke-width:2px style ReturnLastHandControl fill:#99ccff,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the getEndHndCtrl function:

  1. The function starts by initializing and identifying the main hand control.

  2. It checks if the rig setup is biped or standard, which determines the method of finding child controls.

  3. Based on the setup, it either retrieves children from the parent control or directly from the main control.

  4. The function then determines whether to return all child controls or just the last hand control, based on the ‘getAllChdCtrls’ parameter.

  5. The function concludes by returning either all child controls or the last hand control.

HyperPoint.getLapCurv(self, ctrlName='as_Dia_Ctrl', closeLoop=1, grpLevel=0, locList=None, oneShape=True, curvDegree=3, stepVal=1, offset=1)#

[shArgs : cn=ctrlName, cl=closeLoop, gl=grpLevel, ll=locList, os=oneShape, cd=curvDegree, sv=stepVal, o=offset]

Purpose:

:: Generates a curve (lap curve) based on a list of locators and various control parameters. This function is often utilized in rigging and animation for creating custom control curves based on specific spatial arrangements.

Parameters:
  • ctrlName – <str>, optional (default=’as_Dia_Ctrl’) # The name for the generated control curve.

  • closeLoop – <int>, optional (default=1) # Determines whether to close the curve loop.

  • grpLevel – <int>, optional (default=0) # Group level for the curve’s control group.

  • locList – <list>, optional # A list of locators to define the curve’s shape. If not provided, uses selected locators.

  • oneShape – <bool>, optional (default=True) # Whether to create the curve as a single shape.

  • curvDegree – <int>, optional (default=3) # Degree of the curve.

  • stepVal – <int>, optional (default=1) # Step value for curve creation.

  • offset – <int>, optional (default=1) # Determines whether to apply an offset to the curve.

Returns:

<list> # Returns a list containing the generated curve control.

Code Examples:

>>> getLapCurv("CustomCurve", closeLoop=1, grpLevel=2, oneShape=True, curvDegree=3, stepVal=1, offset=0)
# This example generates a curve named 'CustomCurve' based on the selected locators.
graph TD Start[("fa:fa-play Start")] --> Initialize[("fas:fa-cogs Initialize Function")] Initialize --> CheckLocators{"/fas:fa-question-circle Check Locators"} CheckLocators --"Locators Provided"--> ArrangeLocators[("fas:fa-sort-numeric-up Arrange Locators")] CheckLocators --"No Locators Provided"--> SelectLocators[("fas:fa-mouse-pointer Select Locators")] ArrangeLocators --> FinalizePosList[("fas:fa-list-ol Finalize Position List")] SelectLocators --> FinalizePosList FinalizePosList --> CreateCurve[("fas:fa-bezier-curve Create Curve")] CreateCurve --> ApplyOffset ApplyOffset{"/fas:fa-expand-arrows-alt Apply Offset"} --"Offset Applied"--> OffsetCurve[("fas:fa-expand-alt Offset Curve")] ApplyOffset --"No Offset"--> FinalizeCurve[("fas:fa-check Finalize Curve")] OffsetCurve --> FinalizeCurve FinalizeCurve --> End[("fas:fa-stop End")] style Start fill:#00cc00,stroke:#000,stroke-width:3px style Initialize fill:#ffcc00,stroke:#000,stroke-width:2px style CheckLocators fill:#99ff99,stroke:#000,stroke-width:2px style ArrangeLocators fill:#cc99ff,stroke:#000,stroke-width:2px style SelectLocators fill:#cc99ff,stroke:#000,stroke-width:2px style FinalizePosList fill:#ffcc99,stroke:#000,stroke-width:2px style CreateCurve fill:#99ccff,stroke:#000,stroke-width:2px style ApplyOffset fill:#ffcc99,stroke:#000,stroke-width:2px style OffsetCurve fill:#99ccff,stroke:#000,stroke-width:2px style FinalizeCurve fill:#cccccc,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the getLapCurv function:

  1. The function begins by initializing and checking the provided locators or selecting locators if none are provided.

  2. It arranges the locators in order and finalizes the position list for the curve.

  3. Based on the finalized positions, it creates the curve.

  4. The function then checks if an offset is to be applied and adjusts the curve accordingly.

  5. It finalizes the curve with the applied settings and group level.

  6. The function concludes after creating and potentially offsetting the curve based on the given parameters.

HyperPoint.getLongestVtx_BySpinBall(self, meshBody, spinBall, spinBallAim, stRot=0, endRot=180, rAxis='ry', pntName=None, processName=None)#

[shArgs : mb=meshBody, sb=spinBall, sba=spinBallAim, sr=stRot, er=endRot, ra=rAxis, pn=pntName, pn=processName]

Purpose:

:: Determines the farthest vertex from a spinning object (spinBall) on a mesh within a specified rotational range. Ideal for rigging and mesh analysis, where finding extreme points relative to a moving pivot is crucial.

Parameters:
  • meshBody – <obj> # The mesh body to analyze.

  • spinBall – <obj> # The spinning object used as a pivot for analysis.

  • spinBallAim – <obj> # The target object or point the spinBall aims at during rotation.

  • stRot – <float>, optional (default=0) # The starting rotation angle for analysis.

  • endRot – <float>, optional (default=180) # The ending rotation angle for analysis.

  • rAxis – <str>, optional (default=’ry’) # The rotation axis of the spinBall.

  • pntName – <str>, optional # The name for the located farthest point. Default is ‘as_SpinBall_LongestPnt’.

  • processName – <str>, optional # The name of the process for progress tracking.

Returns:

<list/None> # Returns a list with the farthest located point and all evaluated points, or None if no points are found.

Code Examples:

>>> getLongestVtx_BySpinBall("bodyMesh", "controlPivot", "aimTarget", 0, 180, 'ry', 'FarthestPoint', 'Finding Farthest Point')
# Analyzes the 'bodyMesh' to find the farthest vertex from 'controlPivot' as it rotates towards 'aimTarget'.
graph TD Start[("fa:fa-play Start")] --> Initialize[("fas:fa-cogs Initialize Function")] Initialize --> ValidateInputs{"/fas:fa-check-circle Validate Inputs"} ValidateInputs --"Valid Inputs"--> PerformRotation[("fas:fa-sync-alt Perform Rotation Analysis")] ValidateInputs --"Invalid Inputs"--> End[("fas:fa-stop End")] PerformRotation --> DetermineFarthestPoint[("fas:fa-search-location Determine Farthest Point")] DetermineFarthestPoint --> FinalizeResults[("fas:fa-check-double Finalize Results")] FinalizeResults --> End style Start fill:#00cc00,stroke:#000,stroke-width:3px style Initialize fill:#ffcc00,stroke:#000,stroke-width:2px style ValidateInputs fill:#99ff99,stroke:#000,stroke-width:2px style PerformRotation fill:#cc99ff,stroke:#000,stroke-width:2px style DetermineFarthestPoint fill:#ffcc99,stroke:#000,stroke-width:2px style FinalizeResults fill:#99ccff,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the getLongestVtx_BySpinBall function:

  1. The function starts by initializing and validating input parameters.

  2. It then rotates the spinBall object around the specified axis within the given rotational range, aiming at the target point or object.

  3. Throughout this rotation, the function evaluates the farthest point on the mesh body from the spinBall.

  4. Once the rotation range is covered, it finalizes the results, selecting the farthest point as the key result.

  5. The function concludes by returning the farthest point and all evaluated points, or None if no suitable points are found.

HyperPoint.getMainHndCtrl(self, subHndCtrl, LSide='L_', RSide='R_', delUnwanted=None)#

[shArgs : shc=subHndCtrl, ls=LSide, rs=RSide, du=delUnwanted]

Purpose:

:: Retrieves the main hand control based on a given sub-hand control, typically used in character rigging. The function identifies the main control by analyzing the naming conventions of the sub-control.

Parameters:
  • subHndCtrl – <obj> # The sub-hand control from which to derive the main hand control.

  • LSide – <str>, optional (default=’L_’) # The prefix indicating the left side, used to parse the control name.

  • RSide – <str>, optional (default=’R_’) # The prefix indicating the right side, used to parse the control name.

  • delUnwanted – <obj>, optional # An object to delete if the main hand control cannot be found.

Returns:

<obj/None> # Returns the main hand control node if found, or None if not found.

Code Examples:

>>> getMainHndCtrl("L_Arm_SubCtrl", LSide='L_', RSide='R_')
# Returns the main hand control associated with the 'L_Arm_SubCtrl'.
graph TD Start[("fa:fa-play Start")] --> Initialize[("fas:fa-cogs Initialize Function")] Initialize --> ParseControlName[("fas:fa-text-width Parse Control Name")] ParseControlName --> DetermineMainControl{"/fas:fa-question-circle Determine Main Control"} DetermineMainControl --"Main Control Found"--> ReturnMainControl[("fas:fa-check Return Main Control")] DetermineMainControl --"Main Control Not Found"--> HandleFailure[("fas:fa-times-circle Handle Failure")] ReturnMainControl --> End[("fas:fa-stop End")] HandleFailure --> End style Start fill:#00cc00,stroke:#000,stroke-width:3px style Initialize fill:#ffcc00,stroke:#000,stroke-width:2px style ParseControlName fill:#99ff99,stroke:#000,stroke-width:2px style DetermineMainControl fill:#ffcc99,stroke:#000,stroke-width:2px style ReturnMainControl fill:#99ccff,stroke:#000,stroke-width:2px style HandleFailure fill:#ff6666,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the getMainHndCtrl function:

  1. The function begins by initializing and identifying the sub-hand control.

  2. It then parses the control name based on the specified left and right side prefixes.

  3. The function determines the main control name from the parsed sub-control name.

  4. If the main control is found, it is returned; otherwise, the function handles the failure, optionally deleting an unwanted object.

  5. The function concludes by returning the main hand control or None if it cannot be found.

HyperPoint.getMeshCenter_fromOuterPoint(self, fromLoc=None, meshName='body', dirLoc=None, radialCenter=True, dirAxis=None, locName='meshMidLoc', getLoc=1, **shArgs)#

[shArgs : fl=fromLoc, mn=meshName, dl=dirLoc, rc=radialCenter, da=dirAxis, ln=locName, gl=getLoc]

Purpose:

:: Calculates the center position of a mesh from a specified outer point, optionally using a direction locator or axis. Essential in 3D modeling for determining central points relative to a mesh’s geometry for control placement or analysis.

Parameters:
  • fromLoc – <obj>, optional # The starting locator from which to calculate the mesh center.

  • meshName – <str>, optional (default=’body’) # The name of the mesh to analyze.

  • dirLoc – <obj>, optional # A directional locator for calculating the center position.

  • radialCenter – <bool>, optional (default=True) # Whether to calculate the center radially.

  • dirAxis – <str/list>, optional # The axis to use for directional calculations.

  • locName – <str>, optional (default=’meshMidLoc’) # The name for the created locator at the center position.

  • getLoc – <int>, optional (default=1) # Specifies whether to return the locator (1) or just its position (0).

Returns:

<obj/list> # Returns the locator at the center position or the position itself, depending on the ‘getLoc’ parameter.

returns:

if getLoc:
        return [centerLoc]
else:
        return [centerPos]

Code Examples:

>>> getMeshCenter_fromOuterPoint("EdgeLocator", "bodyMesh", dirAxis='y', locName='CenterLocator', getLoc=1)
# Calculates the center of 'bodyMesh' from 'EdgeLocator' in the Y direction and returns a locator named 'CenterLocator'.
graph TD Start[("fa:fa-play Start")] --> Initialize[("fas:fa-cogs Initialize Function")] Initialize --> ValidateInputs{"/fas:fa-check-circle Validate Inputs"} ValidateInputs --"Valid Inputs"--> DetermineDirection[("fas:fa-arrows-alt Determine Direction")] DetermineDirection --> CalculateCenter[("fas:fa-bullseye Calculate Center Position")] CalculateCenter --> FinalizeResults[("fas:fa-check-double Finalize Results")] FinalizeResults --"Return Locator"--> ReturnLocator[("fas:fa-map-pin Return Locator")] FinalizeResults --"Return Position"--> ReturnPosition[("fas:fa-location-arrow Return Position")] ReturnLocator --> End[("fas:fa-stop End")] ReturnPosition --> End style Start fill:#00cc00,stroke:#000,stroke-width:3px style Initialize fill:#ffcc00,stroke:#000,stroke-width:2px style ValidateInputs fill:#99ff99,stroke:#000,stroke-width:2px style DetermineDirection fill:#cc99ff,stroke:#000,stroke-width:2px style CalculateCenter fill:#ffcc99,stroke:#000,stroke-width:2px style FinalizeResults fill:#99ccff,stroke:#000,stroke-width:2px style ReturnLocator fill:#cccccc,stroke:#000,stroke-width:2px style ReturnPosition fill:#cccccc,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the getMeshCenter_fromOuterPoint function:

  1. The function starts by initializing and validating input parameters.

  2. It then determines the direction for center calculation, using either the provided directional locator or axis.

  3. The function calculates the center position of the mesh from the outer point based on the specified parameters.

  4. Depending on the ‘getLoc’ parameter, it finalizes the results by either returning the locator at the center position or the position itself.

  5. The function concludes after returning the appropriate locator or position.

HyperPoint.getMeshPnts_BySpinBall(self, meshBody, spinBall, spinBallAim, stRot=0, endRot=180, rAxis='ry', rPlus=1, messageTxt=None, locGrp=0, **shortArgs)#

[shArgs : mb=meshBody, sb=spinBall, sba=spinBallAim, sr=stRot, er=endRot, ra=rAxis, rp=rPlus, mt=messageTxt, lg=locGrp]

Purpose:

:: Identifies points on a mesh body based on the rotation of a ‘spinBall’ object around an axis, targeting another object or position. Useful in 3D modeling for precise point analysis and control placement on complex mesh surfaces.

Parameters:
  • meshBody – <obj> # The mesh body to be analyzed.

  • spinBall – <obj> # The spinning object used as a reference for point analysis.

  • spinBallAim – <obj> # The target object or position that the spinBall aims at during rotation.

  • stRot – <float>, optional (default=0) # The starting rotation angle for analysis.

  • endRot – <float>, optional (default=180) # The ending rotation angle for analysis.

  • rAxis – <str>, optional (default=’ry’) # The axis around which the spinBall rotates.

  • rPlus – <float>, optional (default=1) # The increment value for each rotation step.

  • messageTxt – <str>, optional # A message displayed during the process.

  • locGrp – <int/str>, optional (default=0) # Specifies whether to group located points and the group name.

Returns:

<list/None> # Returns a list of located points and the group (if specified), or None if no points are found.

Code Examples:

>>> getMeshPnts_BySpinBall("bodyMesh", "controlPivot", "aimTarget", 0, 180, 'ry', 1, 'Analyzing Mesh', 'PointGroup')
# Analyzes 'bodyMesh' to identify points based on the rotation of 'controlPivot' around the Y-axis towards 'aimTarget'.
graph TD Start[("fa:fa-play Start")] --> Initialize[("fas:fa-cogs Initialize Function")] Initialize --> ValidateInputs{"/fas:fa-check-circle Validate Inputs"} ValidateInputs --"Valid Inputs"--> PerformRotation[("fas:fa-sync-alt Perform Rotation Analysis")] ValidateInputs --"Invalid Inputs"--> End[("fas:fa-stop End")] PerformRotation --> LocatePoints[("fas:fa-map-pin Locate Points")] LocatePoints --> OrganizeResults[("fas:fa-sort-amount-up Organize Results")] OrganizeResults --> Finalize[("fas:fa-check-double Finalize Results")] Finalize --> End style Start fill:#00cc00,stroke:#000,stroke-width:3px style Initialize fill:#ffcc00,stroke:#000,stroke-width:2px style ValidateInputs fill:#99ff99,stroke:#000,stroke-width:2px style PerformRotation fill:#cc99ff,stroke:#000,stroke-width:2px style LocatePoints fill:#ffcc99,stroke:#000,stroke-width:2px style OrganizeResults fill:#99ccff,stroke:#000,stroke-width:2px style Finalize fill:#cccccc,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the getMeshPnts_BySpinBall function:

  1. The function starts by initializing and validating input parameters.

  2. It then rotates the spinBall object around the specified axis, aiming at the target point or object.

  3. During this rotation, the function locates points on the mesh body closest and farthest from the spinBall.

  4. The located points are organized and prepared for return, optionally grouped if specified.

  5. The function concludes after locating and organizing the points based on the rotation analysis.

HyperPoint.getNearestLoc_BySpinBall(self, meshBody, spinBall, spinBallAim, stRot=0, endRot=180, rAxis='ry', pntName=None, getLoc=1, getAllPnts=0, processName=None)#

[shArgs : mb=meshBody, sb=spinBall, sba=spinBallAim, sr=stRot, er=endRot, ra=rAxis, pn=pntName, gl=getLoc, gap=getAllPnts, pn=processName]

Purpose:

:: Identifies the nearest location on a mesh body to a ‘spinBall’ object, based on a specified rotational range and axis. Essential for 3D modeling and animation where determining proximity points relative to a moving pivot is key for accurate control placement.

Parameters:
  • meshBody – <obj> # The mesh body to be analyzed.

  • spinBall – <obj> # The spinning object used as a reference for proximity analysis.

  • spinBallAim – <obj> # The target object or position that the spinBall aims at during rotation.

  • stRot – <float>, optional (default=0) # The starting rotation angle for analysis.

  • endRot – <float>, optional (default=180) # The ending rotation angle for analysis.

  • rAxis – <str>, optional (default=’ry’) # The axis around which the spinBall rotates.

  • pntName – <str>, optional # The name for the located nearest point. Default is ‘as_SpinBall_LongestPnt’.

  • getLoc – <int>, optional (default=1) # Specifies whether to return the locator (1) or just its position (0).

  • getAllPnts – <int>, optional (default=0) # Determines whether to return all evaluated points.

  • processName – <str>, optional # A message displayed during the process.

Returns:

<obj/list/None> # Returns the nearest located point or position, all evaluated points if requested, or None if no points are found.

Code Examples:

>>> getNearestLoc_BySpinBall("bodyMesh", "controlPivot", "aimTarget", 0, 180, 'ry', 'NearestPoint', 1, 1, 'Analyzing Mesh')
# Analyzes 'bodyMesh' to identify the nearest point to 'controlPivot' as it rotates towards 'aimTarget'.
graph TD Start[("fa:fa-play Start")] --> Initialize[("fas:fa-cogs Initialize Function")] Initialize --> ValidateInputs{"/fas:fa-check-circle Validate Inputs"} ValidateInputs --"Valid Inputs"--> PerformRotation[("fas:fa-sync-alt Perform Rotation Analysis")] ValidateInputs --"Invalid Inputs"--> End[("fas:fa-stop End")] PerformRotation --> LocatePoints[("fas:fa-map-pin Locate Points")] LocatePoints --> OrganizeResults[("fas:fa-sort-amount-up Organize Results")] OrganizeResults --> Finalize[("fas:fa-check-double Finalize Results")] Finalize --> End style Start fill:#00cc00,stroke:#000,stroke-width:3px style Initialize fill:#ffcc00,stroke:#000,stroke-width:2px style ValidateInputs fill:#99ff99,stroke:#000,stroke-width:2px style PerformRotation fill:#cc99ff,stroke:#000,stroke-width:2px style LocatePoints fill:#ffcc99,stroke:#000,stroke-width:2px style OrganizeResults fill:#99ccff,stroke:#000,stroke-width:2px style Finalize fill:#cccccc,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the getNearestLoc_BySpinBall function:

  1. The function starts by initializing and validating input parameters.

  2. It then rotates the spinBall object around the specified axis within the given rotational range, aiming at the target point or object.

  3. During this rotation, the function locates the nearest point on the mesh body to the spinBall.

  4. The located points are organized and prepared for return, based on whether all points or only the nearest point are requested.

  5. The function concludes after locating and organizing the points based on the rotation analysis.

HyperPoint.getRootLoc(self, bodyMesh, LEye='L_Eye', REye='R_Eye', centerMargin=0.1)#

Purpose:

:: Determines the root location on a body mesh based on specified parameters, typically used for establishing base positions in rigging. The function calculates the root location by analyzing the mesh’s vertices and their positions relative to specified reference points.

Parameters:
  • bodyMesh – <str> # The name of the body mesh to analyze.

  • LEye – <str>, optional (default=’L_Eye’) # The name of the left eye, used as a reference point.

  • REye – <str>, optional (default=’R_Eye’) # The name of the right eye, used as a reference point.

  • centerMargin – <float>, optional (default=0.1) # The margin used for centering calculations on the mesh.

Returns:

<obj> # Returns a locator at the calculated root position on the body mesh.

Code Examples:

>>> getRootLoc("bodyMesh", 'LeftEye', 'RightEye', 0.1)
# Calculates the root location on 'bodyMesh' based on the positions of 'LeftEye' and 'RightEye'.
graph TD Start[("fa:fa-play Start")] --> Initialize[("fas:fa-cogs Initialize Function")] Initialize --> AnalyzeVertices[("fas:fa-vector-square Analyze Mesh Vertices")] AnalyzeVertices --> DetermineRootReference[("fas:fa-crosshairs Determine Root Reference")] DetermineRootReference --> CalculateRootLocation[("fas:fa-map-marker-alt Calculate Root Location")] CalculateRootLocation --> CreateRootLocator[("fas:fa-location-arrow Create Root Locator")] CreateRootLocator --> End[("fas:fa-stop End")] style Start fill:#00cc00,stroke:#000,stroke-width:3px style Initialize fill:#ffcc00,stroke:#000,stroke-width:2px style AnalyzeVertices fill:#99ccff,stroke:#000,stroke-width:2px style DetermineRootReference fill:#ffcc99,stroke:#000,stroke-width:2px style CalculateRootLocation fill:#99ff99,stroke:#000,stroke-width:2px style CreateRootLocator fill:#cccccc,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the getRootLoc function:

  1. The function begins by initializing and analyzing the vertices of the specified body mesh.

  2. It determines a root reference point on the mesh based on the positions of the left and right eyes.

  3. The root location is calculated based on this reference and additional parameters like center margin.

  4. A locator is then created at the calculated root position on the body mesh.

  5. The function concludes after establishing the root locator on the mesh.

HyperPoint.getVtxList_ByGrowInsideBall(self, srcVtx, vtxBall, totalVtx, progressNote='Growing Vtx List')#

Purpose:

:: Generates a list of vertices within the boundary of a specified ‘vtxBall’ object, starting from a source vertex. Utilized in 3D modeling to select mesh areas for manipulation or analysis based on spatial constraints.

Parameters:
  • srcVtx – <obj> # The source vertex from which the selection begins.

  • vtxBall – <obj> # The object defining the boundary area for vertex selection.

  • totalVtx – <int> # The total number of vertices to consider in the process.

  • progressNote – <str>, optional (default=’Growing Vtx List’) # A note displayed during the process.

Returns:

<list/None> # Returns a list of vertices within the specified boundary, or None if the source vertex is outside.

Code Examples:

>>> getVtxList_ByGrowInsideBall('body.vtx[1070]', 'vtxBall', 1000)
# Generates a list of vertices from 'body.vtx[1070]' within the boundary of 'vtxBall'.
graph TD Start[("fa:fa-play Start")] --> Initialize[("fas:fa-cogs Initialize Function")] Initialize --> ValidateVtxPosition{"/fas:fa-search-plus Validate Vertex Position"} ValidateVtxPosition --"Vertex Inside"--> GrowSelection[("fas:fa-expand-arrows-alt Grow Selection")] GrowSelection --> EvaluateVertices[("fas:fa-check Evaluate Vertices")] EvaluateVertices --> UpdateSelection[("fas:fa-sync Update Selection")] UpdateSelection --> CheckCompletion{"/fas:fa-flag-checkered Check Completion"} ValidateVtxPosition --"Vertex Outside"--> End[("fas:fa-stop End")] CheckCompletion --"Selection Complete"--> End CheckCompletion --"Continue Growing"--> GrowSelection style Start fill:#00cc00,stroke:#000,stroke-width:3px style Initialize fill:#ffcc00,stroke:#000,stroke-width:2px style ValidateVtxPosition fill:#99ff99,stroke:#000,stroke-width:2px style GrowSelection fill:#cc99ff,stroke:#000,stroke-width:2px style EvaluateVertices fill:#ffcc99,stroke:#000,stroke-width:2px style UpdateSelection fill:#99ccff,stroke:#000,stroke-width:2px style CheckCompletion fill:#ffcc99,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the getVtxList_ByGrowInsideBall function:

  1. The function begins by initializing and validating the position of the source vertex in relation to the ‘vtxBall’.

  2. If the source vertex is inside the ‘vtxBall’, it grows the selection region of vertices.

  3. The function evaluates the newly selected vertices to determine if they are within the ‘vtxBall’.

  4. Based on this evaluation, the selection is updated, and the process repeats until all inside vertices are selected or no more can be added.

  5. The function concludes after growing the vertex selection to the boundary of the ‘vtxBall’ or determining that the source vertex is outside.

HyperPoint.get_LapCurv(self)#

Purpose:

:: Retrieves and positions the lap curve based on specific points determined by a spinning ball algorithm. This function is commonly used in 3D modeling and animation to calculate precise curve positions on a mesh surface.

  • The function calculates points on a mesh surface using the spinning ball algorithm, creates locators at these points, and then determines the lap curve based on these locators.

  • It involves spatial calculations and adjustments to position the curve accurately in relation to specific objects or points.

Returns:

None # This function does not return a value but performs operations related to curve positioning on a mesh.

Code Examples:

>>> get_LapCurv()
# This example will calculate and position the lap curve based on the spinning ball algorithm applied to the 'body' mesh.
graph TD Start[("fa:fa-play Start")] --> GetMeshPoints[("fas:fa-map-pin Get Mesh Points")] GetMeshPoints --> CreateLocators[("fas:fa-thumbtack Create Locators")] CreateLocators --> PositionLapCurve[("fas:fa-project-diagram Position Lap Curve")] PositionLapCurve --> SnapBullet[("fas:fa-magnet Snap Bullet to Closest Position")] SnapBullet --> Cleanup[("fas:fa-broom Cleanup Temporary Objects")] Cleanup --> End[("fas:fa-stop End")] style Start fill:#00cc00,stroke:#000,stroke-width:3px style GetMeshPoints fill:#ffcc00,stroke:#000,stroke-width:2px style CreateLocators fill:#99ccff,stroke:#000,stroke-width:2px style PositionLapCurve fill:#99ff99,stroke:#000,stroke-width:2px style SnapBullet fill:#ffcc99,stroke:#000,stroke-width:2px style Cleanup fill:#cccccc,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the get_LapCurv function:

  1. The function starts by calculating mesh points using the spinning ball algorithm.

  2. Locators are created at these points to mark the positions on the mesh.

  3. The lap curve is then positioned based on the locations of these locators.

  4. The function adjusts the position of the ‘Bullet’ object to the closest position determined by the spinning ball algorithm.

  5. Finally, the function cleans up any temporary objects created during the process.

  6. The function concludes after positioning the lap curve and cleaning up.

HyperPoint.message(self, messageTxt)#

Purpose:

:: Displays a message to the user through a dialog window. This function is primarily used in scripts and applications for user interaction, such as providing information or confirming actions.

Parameters:

messageTxt – <str> # The message text to be displayed in the dialog window.

Returns:

None # The function does not return a value but displays a dialog window with the message.

Code Examples:

>>> message("Operation completed successfully.")
# Displays a dialog window with the message "Operation completed successfully."
graph TD Start[("fa:fa-play Start")] --> DisplayMessage[("fas:fa-comment-alt Display Message")] DisplayMessage --> End[("fas:fa-stop End")] style Start fill:#00cc00,stroke:#000,stroke-width:3px style DisplayMessage fill:#ffcc00,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the message function:

  1. The function starts and immediately displays the specified message in a dialog window.

  2. The function concludes after displaying the message to the user.

HyperPoint.setGlobalScale(self)#

Purpose:

:: Dynamically adjusts the global scale of an object based on its distance from a reference point. Typically used in 3D animation and rigging to scale objects while maintaining their proportional relationship to other elements.

Returns:

None # The function does not return a value but scales the ‘Global_Curve’ object based on distance measurements.

Code Examples:

>>> setGlobalScale()
# Dynamically adjusts the scale of 'Global_Curve' based on its distance from 'Root_BirdLoc'.
graph TD Start[("fa:fa-play Start")] --> Initialize[("fas:fa-cogs Initialize Function")] Initialize --> CalculateInitialDistance[("fas:fa-tape Calculate Initial Distance")] CalculateInitialDistance --> AdjustScale[("fas:fa-search-plus Adjust Scale")] AdjustScale --> EvaluateDistance[("fas:fa-ruler-combined Evaluate Distance")] EvaluateDistance --> CheckImprovement{"/fas:fa-balance-scale Check Improvement"} CheckImprovement --"Distance Improved"--> ContinueScaling[("fas:fa-repeat-alt Continue Scaling")] CheckImprovement --"No Improvement"--> StopScaling[("fas:fa-stop-circle Stop Scaling")] ContinueScaling --> AdjustScale StopScaling --> End[("fas:fa-stop End")] style Start fill:#00cc00,stroke:#000,stroke-width:3px style Initialize fill:#ffcc00,stroke:#000,stroke-width:2px style CalculateInitialDistance fill:#99ff99,stroke:#000,stroke-width:2px style AdjustScale fill:#cc99ff,stroke:#000,stroke-width:2px style EvaluateDistance fill:#ffcc99,stroke:#000,stroke-width:2px style CheckImprovement fill:#ffcc99,stroke:#000,stroke-width:2px style ContinueScaling fill:#99ccff,stroke:#000,stroke-width:2px style StopScaling fill:#ff6666,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the setGlobalScale function:

  1. The function begins by initializing and calculating the initial distance between the ‘Global_Curve’ and a reference point.

  2. It adjusts the scale of ‘Global_Curve’ slightly and evaluates the new distance to the reference point.

  3. The function checks if the scaling improved the proximity to the reference point.

  4. If the scaling is effective (distance reduced), it continues to adjust the scale; otherwise, it stops scaling.

  5. The function concludes after achieving an optimal scale based on the distance criteria.

HyperPoint.setNeckLine(self)#

Purpose:

:: Sets up the neck line for a character by determining the midpoint between the eyes and aligning it with other key points. Essential in 3D character rigging for defining the alignment and positioning of the neck and related controls.

Returns:

None # The function does not return a value but adjusts the positioning of relevant controls and locators for the neck.

Code Examples:

>>> setNeckLine()
# Sets up the neck line for a character, aligning it with the midpoint between the eyes and other key points.
graph TD Start[("fa:fa-play Start")] --> Initialize[("fas:fa-cogs Initialize Function")] Initialize --> DetermineEyeMidpoint[("fas:fa-eye Determine Eye Midpoint")] DetermineEyeMidpoint --> AnalyzeVertices[("fas:fa-vector-square Analyze Mesh Vertices")] AnalyzeVertices --> CalculateReferencePoint[("fas:fa-crosshairs Calculate Reference Point")] CalculateReferencePoint --> SetNeckAlignment[("fas:fa-align-center Set Neck Alignment")] SetNeckAlignment --> End[("fas:fa-stop End")] style Start fill:#00cc00,stroke:#000,stroke-width:3px style Initialize fill:#ffcc00,stroke:#000,stroke-width:2px style DetermineEyeMidpoint fill:#99ff99,stroke:#000,stroke-width:2px style AnalyzeVertices fill:#cc99ff,stroke:#000,stroke-width:2px style CalculateReferencePoint fill:#ffcc99,stroke:#000,stroke-width:2px style SetNeckAlignment fill:#99ccff,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the setNeckLine function:

  1. The function begins by initializing and determining the midpoint between the character’s eyes.

  2. It then analyzes the mesh vertices to identify key alignment points for the neck.

  3. A reference point is calculated based on the mesh analysis and the eye midpoint.

  4. The function aligns the neck setup with this reference point, ensuring proper neck alignment for the character.

  5. The function concludes after setting the neck alignment based on the calculated reference point.