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 d7c3f7d
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: tutorials/WritingAColladaFactoryWithPython.md
+30-23Lines changed: 30 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,8 @@ Note that whenever you re-run the scripts, the internal Unreal Engine reflection
40
40
41
41
as you can see from the screenshot, the address of the UClass as well as its python UObject counterpart remains the same, while the `__init__` call is updated. Remember that whenever you create a new UClass from python, the `__init__` method is automatically called by the ClassDefaultObject (this information is useful only if you are into unreal engine internals, otherwise you can simply ignore it ;).
42
42
43
+
Remember: only functions starting with an uppercase letter will be exposed to unreal, the others will be usable only from python.
44
+
43
45
## Parse .dae files with pycollada
44
46
45
47
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:
@@ -120,6 +122,26 @@ class ColladaFactory(PyFactory):
120
122
self.Formats = ['dae;Collada']
121
123
# set the UClass this UFactory will generate
122
124
self.SupportedClass = StaticMesh
125
+
ue.log(dir(self))
126
+
127
+
defFixMeshData(self):
128
+
# move from collada system (y on top) to ue4 one (z on top, forward decreases over viewer)
0 commit comments