Class BoneNamingConventions
Single source of truth for the chest/spine bone-naming convention procedural rigging relies on to auto-detect and rank candidate bones on an arbitrary humanoid-ish skeleton. Pure string logic — engine-agnostic — so it is the one place a future non-Unity port needs to reimplement, instead of the convention being duplicated (and able to drift) across the prefab applier and the scaffold generator. Two related but distinct queries are covered:
- IsKnownBoneName(string) / ChestBoneNames / SpineBoneNames: exact (case-insensitive) name matching, used to recognize bones while walking a live transform hierarchy.
- SelectBestPrimaryBone(List<string>): priority ranking over an already-known list of bone ids (substring match), used to pick the single best bone to drive an oscillation layer.
Inherited Members
Namespace: Serenity.ProceduralExpression.Application.Validation
Assembly: Serenity.ProceduralExpression.Application.dll
Syntax
public static class BoneNamingConventions
Fields
ChestBoneNames
Candidate exact names for a "chest" bone (case-insensitive), ordered by preference.
Declaration
public static readonly string[] ChestBoneNames
Field Value
| Type | Description |
|---|---|
| string[] |
SpineBoneNames
Candidate exact names for a "spine" bone (case-insensitive), ordered by preference.
Declaration
public static readonly string[] SpineBoneNames
Field Value
| Type | Description |
|---|---|
| string[] |
Methods
IsKnownBoneName(string)
True when name exactly matches (case-insensitive) a known chest or spine bone name.
Declaration
public static bool IsKnownBoneName(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name |
Returns
| Type | Description |
|---|---|
| bool |
SelectBestPrimaryBone(List<string>)
Selects the best primary bone from a list of bone IDs for periodic oscillation. Priority: chest bones (substring "chest"/"upperchest") > upper-spine bones (substring "spine2"/"spine_02") > spine bones (substring "spine") > first bone > "Chest" fallback.
Declaration
public static string SelectBestPrimaryBone(List<string> boneIds)
Parameters
| Type | Name | Description |
|---|---|---|
| List<string> | boneIds | List of bone IDs to choose from. |
Returns
| Type | Description |
|---|---|
| string | The best bone ID for periodic oscillation. |