Creating a script to import appearances into the Favorites Appearance library.

Creating a script to import appearances into the Favorites Appearance library.

saccade
Enthusiast Enthusiast
150 Views
1 Reply
Message 1 of 2

Creating a script to import appearances into the Favorites Appearance library.

saccade
Enthusiast
Enthusiast

I have a number of textures that I want to import into the favorites library. Rather than do this through the appearances editor, I'd prefer to write a script that I can do this in a batch mode. Is there any way to do this through the API?

0 Likes
Accepted solutions (1)
151 Views
1 Reply
Reply (1)
Message 2 of 2

BrianEkins
Mentor
Mentor
Accepted solution

You can add appearances to the Favorites list using the API. Here's a simple example. You can edit the library and appearance name to make it work for any appearance. The appearance has to have been downloaded. Currently, the API does not provide access to materials or appearances that have not been downloaded.

# Get the library.
appearanceLib = app.materialLibraries.itemByName('Fusion Appearance Library')

# Get the appearance.
appearance = appearanceLib.appearances.itemByName('Paint - Enamel Glossy (Red)')

# Add it to the favorites list.
app.favoriteAppearances.add(appearance)

 

 

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes