Skip to content

Commit 4ba97ec

Browse files
author
Roberto De Ioris
authored
Update WritingAColladaFactoryWithPython.md
1 parent e11e0d3 commit 4ba97ec

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

‎tutorials/WritingAColladaFactoryWithPython.md‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,25 @@ def open_collada_wizard(self):
338338

339339
```
340340

341+
add the method to the ColladaFactory and modify the PyFactoryCreateFile function like this:
342+
343+
```python
344+
def PyFactoryCreateFile(self, uclass: Class, parent: Object, name: str, filename: str) -> Object:
345+
# load the collada file
346+
dae = Collada(filename)
347+
ue.log_warning(dae)
348+
349+
self.do_import = False
350+
self.force_rotation = FRotator()
351+
self.open_collada_wizard()
352+
353+
# if the user click on 'Cancel', return !
354+
if not self.do_import:
355+
return None
356+
....
357+
```
358+
359+
![Slate demo](https://github.com/20tab/UnrealEnginePython/blob/master/tutorials/WritingAColladaFactoryWithPython_Assets/slate_demo.png)
341360

342361

343362
## Persistent importer options: more subclassing

0 commit comments

Comments
 (0)