You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 666510e
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: tutorials/WritingAColladaFactoryWithPython.md
+42Lines changed: 42 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,48 @@ as you can see from the screenshot, the address of the UClass as well as its pyt
42
42
43
43
## Parse .dae files with pycollada
44
44
45
+
The collada format is based on XML, so we can easily parse it from python, but instead of doing the hard work by hand, we can use the amazing pycollada module (https://github.com/pycollada/pycollada). Just pip install it and update your class to import and use it:
46
+
47
+
```python
48
+
from unreal_engine.classes import PyFactory, StaticMesh, Object, Class
49
+
50
+
import unreal_engine as ue
51
+
52
+
from collada import Collada
53
+
54
+
classColladaFactory(PyFactory):
55
+
56
+
def__init__(self):
57
+
# inform the editor that this class is able to import assets
once you re-run the collada_factory.py script you will be able to click on 'Import' in the Countent Browser and now you the 'dae' extension will show in the list of supported ones. Select the duck file and just look at the python console:
0 commit comments