BRepBody.appearance Property

Parent Object: BRepBody
Defined in namespace "adsk::fusion" and the header file is <Fusion/BRep/BRepBody.h>

Description

Read-write property that gets and sets the current appearance of the body. Setting this property will result in applying an override appearance to the body and the AppearanceSourceType property will return OverrideAppearanceSource. Setting this property to null will remove any override.

This property is only valid if the IsTransient property is false.

Syntax

"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.appearance

# Set the value of the property.
bRepBody_var.appearance = propertyValue
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
Ptr<Appearance> propertyValue = bRepBody_var->appearance();

// Set the value of the property, where value_var is an Appearance.
bool returnValue = bRepBody_var->appearance(value_var);

Property Value

This is a read/write property whose value is an Appearance.

Samples

Name Description
Material API Sample

Demonstrates using materials and appearance using the API.

To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. The sample also used an external appearance library which you can get here. Copy that to any location on your computer and edit the path in the script. When running the script, have a design open that contains a body in the root component.

Version

Introduced in version August 2014