Fix morph target exporting on Unix-based systems
Also fixes some extra space issues since my editor auto-fixed them
This commit is contained in:
parent
f581e91ba9
commit
07f4bea206
|
@ -985,7 +985,7 @@ class ArmoryExporter:
|
|||
for _o in sel:
|
||||
_o.select_set(False)
|
||||
skelobj.select_set(True)
|
||||
bpy.ops.nla.bake(frame_start=action.frame_range[0], frame_end=action.frame_range[1], step=1, only_selected=False, visual_keying=True)
|
||||
bpy.ops.nla.bake(frame_start=int(action.frame_range[0]), frame_end=int(action.frame_range[1]), step=1, only_selected=False, visual_keying=True)
|
||||
action = skelobj.animation_data.action
|
||||
skelobj.select_set(False)
|
||||
for _o in sel:
|
||||
|
@ -1138,7 +1138,7 @@ class ArmoryExporter:
|
|||
# Max shape keys supported
|
||||
max_shape_keys = 32
|
||||
# Path to store shape key textures
|
||||
output_dir = bpy.path.abspath('//') + "MorphTargets\\"
|
||||
output_dir = bpy.path.abspath('//') + "MorphTargets"
|
||||
name = bobject.data.name
|
||||
vert_pos = []
|
||||
vert_nor = []
|
||||
|
@ -1259,7 +1259,8 @@ class ArmoryExporter:
|
|||
|
||||
image = bpy.data.images.new(name, width = img_size, height = img_size, is_data = True)
|
||||
image.pixels = pixel_list
|
||||
image.save_render(output_dir + name + ".png", scene= bpy.context.scene)
|
||||
output_path = os.path.join(output_dir, name + ".png")
|
||||
image.save_render(output_path, scene= bpy.context.scene)
|
||||
bpy.data.images.remove(image)
|
||||
|
||||
def get_best_image_size(self, size):
|
||||
|
|
Loading…
Reference in a new issue