bool HasBodyGroups { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The HasBodyGroups property of the ModelRenderer class indicates whether the model has body groups available. Body groups are used to manage different parts of a model that can be shown or hidden independently, allowing for more dynamic and customizable models.

Usage

Use the HasBodyGroups property to check if the model associated with the ModelRenderer instance supports body groups. This can be useful before attempting to set or get body group values to ensure that the operations are valid.

Example

// Example of checking if a model has body groups
ModelRenderer modelRenderer = new ModelRenderer();

if (modelRenderer.HasBodyGroups)
{
    // The model has body groups, proceed with operations
    modelRenderer.SetBodyGroup("head", 1);
}
else
{
    // Handle the case where the model does not have body groups
    // Perhaps log a message or take alternative action
}