Browse Source

Eliminate matrix_basis (outside animations)

pull/290/head
Jrius 3 years ago
parent
commit
a88d49ba63
  1. 2
      korman/exporter/convert.py
  2. 2
      korman/exporter/utils.py

2
korman/exporter/convert.py

@ -245,7 +245,7 @@ class Exporter:
ci = self.mgr.add_object(ci_cls, bl=bl, so=so)
# Now we have the "fun" work of filling in the CI
ci.localToWorld = utils.matrix44(bl.matrix_basis)
ci.localToWorld = utils.matrix44(bl.matrix_world)
ci.worldToLocal = ci.localToWorld.inverse()
ci.localToParent = utils.matrix44(bl.matrix_local)
ci.parentToLocal = ci.localToParent.inverse()

2
korman/exporter/utils.py

@ -102,8 +102,8 @@ def temporary_mesh_object(source : bpy.types.Object) -> bpy.types.Object:
obj = bpy.data.objects.new(source.name, source.to_mesh(bpy.context.scene, True, "RENDER"))
obj.draw_type = "WIRE"
obj.matrix_basis, obj.matrix_world = source.matrix_basis, source.matrix_world
obj.parent = source.parent
obj.matrix_local, obj.matrix_world = source.matrix_local, source.matrix_world
bpy.context.scene.objects.link(obj)
try:

Loading…
Cancel
Save