Skip to content

Commit 8a7fffb

Browse files
author
Roberto De Ioris
authored
Update ManagingAssets.md
1 parent 8005df7 commit 8a7fffb

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

docs/ManagingAssets.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,27 @@ if asset002.asset_can_reimport():
154154
asset002.asset_reimport()
155155
```
156156

157+
The signature of asset_reimport() is the following:
158+
159+
```python
160+
success = asset_reimport(open_file_dialog, report_dialog, filename_to_import)
161+
```
162+
163+
open_file_dialog will trigger an open file widget for selecting the file to import if the object has no file mapped to it.
164+
165+
report_dialog will show the notify widget reporting the status of the operation
166+
167+
filename_to_import allows you to specify which file to import for the asset
168+
169+
The function returns a boolean value
170+
171+
You can programmatically change the filename assigned to an asset in this way:
172+
173+
```python
174+
mesh.asset_import_data_set_sources('D:/sword.fbx')
175+
```
176+
177+
157178
Creating Assets
158179
-
159180

0 commit comments

Comments
 (0)