This functionality is provided as a preview
of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the
Fusion API and Scripts forum.
Because this is a preview of future functionality, there is the possibility that it will change, which will possibly
break any existing programs that use this functionality. Because of that, you should never deliver any programs that use
any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.
Defined in namespace "adsk::core" and the header file is <Core/Materials/Appearances.h>
Description
Creates a new Appearance in the Design with neutral defaults. The `surfaceType` parameter selects the surface category; the default (`OpaqueAppearanceSurface`) is appropriate for plastics, paints, ceramics, rubber, and most other non-metallic, non-transparent materials. Configure the result via the Appearance's `color`, `roughness`, `colorTexture`, `normalTexture`, and `roughnessTexture` properties, or via `appearanceProperties` for finer control.
This method only applies to the Appearances collection on a Design.
Returns the newly created Appearance, or null if the collection is not from a Design (e.g. on a Library). Raises an error if `name` is empty or already in use.
Parameters
Name
Type
Description
name
string
The name to apply to the new Appearance. Must be non-empty and unique within the document's appearance collection.