HyperPoint#
- HyperPoint.__init__(self)#
as_HyperPointMain_v1.2
About :#
Author: (Subbaiah) Subbu Addanki Character Supervisor (Rigging) & Programmer
Visit :#
Contact :#
Mail Id: subbu.add@gmail.com Mobile No: +91-9741454400 / +91-9949005359
Copyright (c) as_HyperSkinMain :#
** (Subbaiah) Subbu Addanki. All Rights Reserved. **
- 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].
- Flow Chart Description:
This flowchart illustrates the adjustCloseToObj function:
The function initializes and checks if shArgs are provided.
Based on the provided arguments, it prepares for either scaling or rotating the source object.
The action (scaling or rotating) is performed iteratively.
After each action, it checks the distance to the target.
If the distance is decreasing, the step value is updated and the action continues.
If the distance is not decreasing, the adjustment ends.
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')
ContainedNot ContainedScaleRotateContainedNot ContainedBelow Min ScaleAbove Min ScaleStartInitialize Function/ Check If Mesh Contains PointEnd Adjustment/ Perform ActionScale ObjectRotate Object/ Check Mesh Containment/ Check Min ScaleUpdate Step ValueEnd- Flow Chart Description:
This flowchart illustrates the adjustTillInsideMesh function:
The function initializes and checks if the source object is already inside the target mesh.
If not inside, it adjusts the object’s scale or rotation based on the action specified.
After each adjustment, it checks again for mesh containment.
The process repeats, adjusting the object until it is contained within the mesh or reaches the minimum scale limit.
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.
Hand Control ProvidedHand Control Not ProvidedAlign on X-axisAlign on Y-axisAlign on Z-axisStartInitialize Function/ Check Hand ControlUse Provided ControlUse Selected ControlGet Sibling Controls/ Align ControlsAlign XAlign YAlign ZEnd- Flow Chart Description:
This flowchart illustrates the alignHndCtrls function:
The function starts and checks if a hand control object is provided.
If provided, it uses the specified control; otherwise, it uses the currently selected control.
It then retrieves the sibling controls of the hand control.
Based on the specified axis, the function aligns the sibling controls to the position of the primary hand control.
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.
StartInitialize FunctionPrepare ReferencesPlace Spine JointsPlace Tail JointsPlace Neck JointsPlace Jaw JointsPlace Wing JointsFinal AdjustmentsEnd- Flow Chart Description:
This flowchart illustrates the as_PlaceAllJoints function:
The function begins by initializing and preparing various reference points and nodes.
It then proceeds to place spine, tail, neck, jaw, and wing joints based on the model’s geometry and predefined logic.
The function makes several adjustments to the positions and orientations of these joints to ensure proper alignment.
The process involves complex conditional checks and spatial calculations to achieve precise joint placement.
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'.
vtxList providedvtxList not providedStartInitialize Function/ Check Vertex ListUse Provided ListUse Current SelectionGrow Polygon Selection RegionDeselect Original VerticesGet Connected VerticesEnd- Flow Chart Description:
This flowchart illustrates the getConnectedVertices function:
The function starts and checks if a vertex list is provided.
If a vertex list is provided, it uses that list; otherwise, it uses the currently selected vertices.
It then grows the selection region to include connected vertices.
The original vertices in the list are deselected, leaving only the connected vertices selected.
The connected vertices are then retrieved and returned.
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.
Source ExistsLongestClosestStartInitialize Function/ Check Source LocationPrepare DirectionCalculate Position/ Determine Longest/ClosestGet Longest PositionGet Closest PositionFinalizeLocatorEnd- Flow Chart Description:
This flowchart illustrates the getDirLoc_fromInsideMesh function:
The function begins by initializing and validating the source location.
It then prepares the direction vector based on the specified parameters.
The position for the locator is calculated in the specified direction from the source location.
Based on whether the longest or closest position is required, it either finds the farthest or nearest point in the specified direction.
The function then finalizes the locator or position, depending on the ‘getLoc’ parameter.
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'.
Biped SetupStandard SetupAll Child ControlsLast Hand ControlStartInitialize Function/ Check Biped SetupGet Parent's ChildrenGet Children/ Determine What to ReturnReturn All Child ControlsReturn Last Hand ControlEnd- Flow Chart Description:
This flowchart illustrates the getEndHndCtrl function:
The function starts by initializing and identifying the main hand control.
It checks if the rig setup is biped or standard, which determines the method of finding child controls.
Based on the setup, it either retrieves children from the parent control or directly from the main control.
The function then determines whether to return all child controls or just the last hand control, based on the ‘getAllChdCtrls’ parameter.
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.
Locators ProvidedNo Locators ProvidedOffset AppliedNo OffsetStartInitialize Function/ Check LocatorsArrange LocatorsSelect LocatorsFinalize Position ListCreate Curve/ Apply OffsetOffset CurveFinalize CurveEnd- Flow Chart Description:
This flowchart illustrates the getLapCurv function:
The function begins by initializing and checking the provided locators or selecting locators if none are provided.
It arranges the locators in order and finalizes the position list for the curve.
Based on the finalized positions, it creates the curve.
The function then checks if an offset is to be applied and adjusts the curve accordingly.
It finalizes the curve with the applied settings and group level.
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'.
Valid InputsInvalid InputsStartInitialize Function/ Validate InputsPerform Rotation AnalysisEndDetermine Farthest PointFinalize Results- Flow Chart Description:
This flowchart illustrates the getLongestVtx_BySpinBall function:
The function starts by initializing and validating input parameters.
It then rotates the spinBall object around the specified axis within the given rotational range, aiming at the target point or object.
Throughout this rotation, the function evaluates the farthest point on the mesh body from the spinBall.
Once the rotation range is covered, it finalizes the results, selecting the farthest point as the key result.
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'.
Main Control FoundMain Control Not FoundStartInitialize FunctionParse Control Name/ Determine Main ControlReturn Main ControlHandle FailureEnd- Flow Chart Description:
This flowchart illustrates the getMainHndCtrl function:
The function begins by initializing and identifying the sub-hand control.
It then parses the control name based on the specified left and right side prefixes.
The function determines the main control name from the parsed sub-control name.
If the main control is found, it is returned; otherwise, the function handles the failure, optionally deleting an unwanted object.
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'.
Valid InputsReturn LocatorReturn PositionStartInitialize Function/ Validate InputsDetermine DirectionCalculate Center PositionFinalize ResultsReturn LocatorReturn PositionEnd- Flow Chart Description:
This flowchart illustrates the getMeshCenter_fromOuterPoint function:
The function starts by initializing and validating input parameters.
It then determines the direction for center calculation, using either the provided directional locator or axis.
The function calculates the center position of the mesh from the outer point based on the specified parameters.
Depending on the ‘getLoc’ parameter, it finalizes the results by either returning the locator at the center position or the position itself.
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'.
Valid InputsInvalid InputsStartInitialize Function/ Validate InputsPerform Rotation AnalysisEndLocate PointsOrganize ResultsFinalize Results- Flow Chart Description:
This flowchart illustrates the getMeshPnts_BySpinBall function:
The function starts by initializing and validating input parameters.
It then rotates the spinBall object around the specified axis, aiming at the target point or object.
During this rotation, the function locates points on the mesh body closest and farthest from the spinBall.
The located points are organized and prepared for return, optionally grouped if specified.
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'.
Valid InputsInvalid InputsStartInitialize Function/ Validate InputsPerform Rotation AnalysisEndLocate PointsOrganize ResultsFinalize Results- Flow Chart Description:
This flowchart illustrates the getNearestLoc_BySpinBall function:
The function starts by initializing and validating input parameters.
It then rotates the spinBall object around the specified axis within the given rotational range, aiming at the target point or object.
During this rotation, the function locates the nearest point on the mesh body to the spinBall.
The located points are organized and prepared for return, based on whether all points or only the nearest point are requested.
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'.
StartInitialize FunctionAnalyze Mesh VerticesDetermine Root ReferenceCalculate Root LocationCreate Root LocatorEnd- Flow Chart Description:
This flowchart illustrates the getRootLoc function:
The function begins by initializing and analyzing the vertices of the specified body mesh.
It determines a root reference point on the mesh based on the positions of the left and right eyes.
The root location is calculated based on this reference and additional parameters like center margin.
A locator is then created at the calculated root position on the body mesh.
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'.
Vertex InsideVertex OutsideSelection CompleteContinue GrowingStartInitialize Function/ Validate Vertex PositionGrow SelectionEvaluate VerticesUpdate Selection/ Check CompletionEnd- Flow Chart Description:
This flowchart illustrates the getVtxList_ByGrowInsideBall function:
The function begins by initializing and validating the position of the source vertex in relation to the ‘vtxBall’.
If the source vertex is inside the ‘vtxBall’, it grows the selection region of vertices.
The function evaluates the newly selected vertices to determine if they are within the ‘vtxBall’.
Based on this evaluation, the selection is updated, and the process repeats until all inside vertices are selected or no more can be added.
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.
StartGet Mesh PointsCreate LocatorsPosition Lap CurveSnap Bullet to Closest PositionCleanup Temporary ObjectsEnd- Flow Chart Description:
This flowchart illustrates the get_LapCurv function:
The function starts by calculating mesh points using the spinning ball algorithm.
Locators are created at these points to mark the positions on the mesh.
The lap curve is then positioned based on the locations of these locators.
The function adjusts the position of the ‘Bullet’ object to the closest position determined by the spinning ball algorithm.
Finally, the function cleans up any temporary objects created during the process.
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."
StartDisplay MessageEnd- Flow Chart Description:
This flowchart illustrates the message function:
The function starts and immediately displays the specified message in a dialog window.
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'.
Distance ImprovedNo ImprovementStartInitialize FunctionCalculate Initial DistanceAdjust ScaleEvaluate Distance/ Check ImprovementContinue ScalingStop ScalingEnd- Flow Chart Description:
This flowchart illustrates the setGlobalScale function:
The function begins by initializing and calculating the initial distance between the ‘Global_Curve’ and a reference point.
It adjusts the scale of ‘Global_Curve’ slightly and evaluates the new distance to the reference point.
The function checks if the scaling improved the proximity to the reference point.
If the scaling is effective (distance reduced), it continues to adjust the scale; otherwise, it stops scaling.
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.
StartInitialize FunctionDetermine Eye MidpointAnalyze Mesh VerticesCalculate Reference PointSet Neck AlignmentEnd- Flow Chart Description:
This flowchart illustrates the setNeckLine function:
The function begins by initializing and determining the midpoint between the character’s eyes.
It then analyzes the mesh vertices to identify key alignment points for the neck.
A reference point is calculated based on the mesh analysis and the eye midpoint.
The function aligns the neck setup with this reference point, ensuring proper neck alignment for the character.
The function concludes after setting the neck alignment based on the calculated reference point.