Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add feature - export particle objects as multimeshinstance to godot #354

Merged
merged 16 commits into from
Nov 13, 2020
Prev Previous commit
Next Next commit
pep8 indent
  • Loading branch information
U-TTE\celpec committed Oct 27, 2020
commit 9459fe38a19f68ba9061d1a507e4dafe60659f37
6 changes: 3 additions & 3 deletions io_scene_godot/converters/multimesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def export_multimesh(self, escn_file, export_settings, particle_name):
self.instance_mesh_id)
self.mesh_resource['transform_array'] = (
'PoolVector3Array({})'.format(
converter.to_multimesh())
converter.to_multimesh())
)

multimesh_id = escn_file.add_internal_resource(
Expand Down Expand Up @@ -158,10 +158,10 @@ def to_multimesh(self):
mat_sca_z = mathutils.Matrix.Scale(scl, 4, (0.0, 0.0, 1.0))

mat_rot = rot.to_matrix()
mat_trans = mathutils.Matrix.Translation(loc)
mat_trs = mathutils.Matrix.Translation(loc)

mat = (
mat_trans @ mat_rot.to_4x4() @ mat_sca_x @ mat_sca_y @ mat_sca_z
mat_trs @ mat_rot.to_4x4() @ mat_sca_x @ mat_sca_y @ mat_sca_z
)

mat4 = mat.to_4x4()
Expand Down