Skip to content
Snippets Groups Projects
Commit a863bfff authored by paul szajner's avatar paul szajner Committed by Jacques Lucke
Browse files

Update 'Nuke Animation Format' to Blender 2.8

Differential Revision: https://developer.blender.org/D4844
parent 73284d0a
No related branches found
No related tags found
No related merge requests found
...@@ -22,7 +22,7 @@ bl_info = { ...@@ -22,7 +22,7 @@ bl_info = {
"name": "Nuke Animation Format (.chan)", "name": "Nuke Animation Format (.chan)",
"author": "Michael Krupa", "author": "Michael Krupa",
"version": (1, 0), "version": (1, 0),
"blender": (2, 61, 0), "blender": (2, 80, 0),
"location": "File > Import/Export > Nuke (.chan)", "location": "File > Import/Export > Nuke (.chan)",
"description": "Import/Export object's animation with nuke", "description": "Import/Export object's animation with nuke",
"warning": "", "warning": "",
......
...@@ -55,7 +55,7 @@ def save_chan(context, filepath, y_up, rot_ord): ...@@ -55,7 +55,7 @@ def save_chan(context, filepath, y_up, rot_ord):
# if the setting is proper use the rotation matrix # if the setting is proper use the rotation matrix
# to flip the Z and Y axis # to flip the Z and Y axis
if y_up: if y_up:
mat = rot_mat * mat mat = rot_mat @ mat
# create the first component of a new line, the frame number # create the first component of a new line, the frame number
fw("%i\t" % frame) fw("%i\t" % frame)
......
...@@ -72,12 +72,12 @@ def read_chan(context, filepath, z_up, rot_ord, sensor_width, sensor_height): ...@@ -72,12 +72,12 @@ def read_chan(context, filepath, z_up, rot_ord, sensor_width, sensor_height):
mrot_mat.resize_4x4() mrot_mat.resize_4x4()
# merge the rotation and translation # merge the rotation and translation
m_trans_mat = translation_mat * mrot_mat m_trans_mat = translation_mat @ mrot_mat
# correct the world space # correct the world space
# (nuke's and blenders scene spaces are different) # (nuke's and blenders scene spaces are different)
if z_up: if z_up:
m_trans_mat = rot_mat * m_trans_mat m_trans_mat = rot_mat @ m_trans_mat
# break the matrix into a set of the coordinates # break the matrix into a set of the coordinates
trns = m_trans_mat.decompose() trns = m_trans_mat.decompose()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment