CustomSkeleton ​
Inherits: ModularSkeleton < GeneralSkeleton < Skeleton3D
CustomSkeleton - The "Hardware" skeleton with material references and customization application Contains the actual ShaderMaterials used in the scene and handles applying customization data This is the scene-level component that holds technical data (shaders/materials)
Properties ​
ShaderMaterial | skin_material | null |
ShaderMaterial | hair_material | null |
ShaderMaterial | eye_material | null |
String | skin_color_param | "skin_color" |
String | hair_color_param | "hair_color" |
String | eye_color_param | "eye_color" |
bool | auto_apply_skin_material | true |
bool | auto_apply_hair_material | true |
bool | auto_apply_eye_material | true |
Methods ​
void | apply_customization( data: CustomCharacterDefinition ) |
void | set_material_color( param_name: String, color: Color ) |
Color | get_skin_color() |
Color | get_hair_color() |
Color | get_eye_color() |
void | set_skin_color( color: Color ) |
void | set_hair_color( color: Color ) |
void | set_eye_color( color: Color ) |
void | set_blend_shape_weight( shape_name: String, weight: float ) |
float | get_blend_shape_weight( shape_name: String ) |
Array[String] | get_available_blend_shapes() |
void | set_blend_shapes_batch( blend_shape_dict: Dictionary ) |
void | reset_all_blend_shapes() |
Dictionary | get_all_blend_shape_weights() |
CustomCharacterDefinition | get_current_customization() |
CustomCharacterDefinition | export_customization() |
void | clear_customization() |
void | refresh_materials() |
String | get_skeleton_type() |
Signals ​
customization_applied( data: CustomCharacterDefinition ) ​
Emitted when customization is applied
material_color_updated( material_type: String, param_name: String, color: Color ) ​
Emitted when a material color is updated
blend_shape_updated( shape_name: String, weight: float ) ​
Emitted when a blend shape is updated
Property descriptions ​
Character Materials
ShaderMaterial skin_material = null ​
The skin material used for skin surfaces Should be a ShaderMaterial with color parameters for customization
ShaderMaterial hair_material = null ​
The hair material used for hair surfaces Should be a ShaderMaterial with color parameters for customization
ShaderMaterial eye_material = null ​
The eye material used for eye surfaces Should be a ShaderMaterial with color parameters for customization
Shader Parameters
String skin_color_param = "skin_color" ​
Parameter name for skin color in skin_material
String hair_color_param = "hair_color" ​
Parameter name for hair color in hair_material
String eye_color_param = "eye_color" ​
Parameter name for eye color in eye_material
Auto-Apply Settings
bool auto_apply_skin_material = true ​
Automatically apply skin_material to surfaces containing "Skin" in their name
bool auto_apply_hair_material = true ​
Automatically apply hair_material to surfaces containing "Hair" in their name
bool auto_apply_eye_material = true ​
Automatically apply eye_material to surfaces containing "Eye" in their name
Method descriptions ​
void apply_customization( data: CustomCharacterDefinition ) ​
Apply a CustomCharacterDefinition to this skeleton This is the main entry point for applying all customization data
void set_material_color( param_name: String, color: Color ) ​
Set a color on the appropriate material based on parameter name
Color get_skin_color() ​
Get current skin color
Color get_hair_color() ​
Get current hair color
Color get_eye_color() ​
Get current eye color
void set_skin_color( color: Color ) ​
Set skin color directly
void set_hair_color( color: Color ) ​
Set hair color directly
void set_eye_color( color: Color ) ​
Set eye color directly
void set_blend_shape_weight( shape_name: String, weight: float ) ​
Set blend shape weight by partial shape name Matches blend shapes ending with the provided name (e.g., "TORSBlends.defaultBuff") This allows you to pass short names like "TORSBlends.defaultBuff" and match full names like "blend_shapes/TORSBlends.defaultBuff"
float get_blend_shape_weight( shape_name: String ) ​
Get blend shape weight by partial name (from first mesh that has it)
Array[String] get_available_blend_shapes() ​
Get all available blend shape names across all meshes Returns unique blend shape names (short format without prefix)
void set_blend_shapes_batch( blend_shape_dict: Dictionary ) ​
Set multiple blend shapes at once blend_shape_dict: Dictionary[String, float] - shape names to weights
void reset_all_blend_shapes() ​
Reset all blend shapes to 0.0
Dictionary get_all_blend_shape_weights() ​
Get all current blend shape values Returns Dictionary[String, float]
CustomCharacterDefinition get_current_customization() ​
Get current customization as a CustomCharacterDefinition
CustomCharacterDefinition export_customization() ​
Create a new CustomCharacterDefinition from current state
void clear_customization() ​
Clear all customization
void refresh_materials() ​
Force refresh materials on all meshes
String get_skeleton_type() ​
Get skeleton type identifier