|
|
@ -22,7 +22,7 @@ import weakref |
|
|
|
|
|
|
|
|
|
|
|
from . import utils |
|
|
|
from . import utils |
|
|
|
|
|
|
|
|
|
|
|
class AnimationConverter: |
|
|
|
class AnimationConverter(plAGAnim): |
|
|
|
def __init__(self, exporter): |
|
|
|
def __init__(self, exporter): |
|
|
|
self._exporter = weakref.ref(exporter) |
|
|
|
self._exporter = weakref.ref(exporter) |
|
|
|
self._bl_fps = bpy.context.scene.render.fps |
|
|
|
self._bl_fps = bpy.context.scene.render.fps |
|
|
@ -75,7 +75,7 @@ class AnimationConverter: |
|
|
|
anim_data = bo.plasma_modifiers.animation |
|
|
|
anim_data = bo.plasma_modifiers.animation |
|
|
|
if anim_data.obj_sdl_anim: |
|
|
|
if anim_data.obj_sdl_anim: |
|
|
|
atcanim = self._mgr.find_create_object(plAgeGlobalAnim, so=so) |
|
|
|
atcanim = self._mgr.find_create_object(plAgeGlobalAnim, so=so) |
|
|
|
else: |
|
|
|
elif anim_data.obj_sdl_anim is None: |
|
|
|
atcanim = self._mgr.find_create_object(plATCAnim, so=so) |
|
|
|
atcanim = self._mgr.find_create_object(plATCAnim, so=so) |
|
|
|
|
|
|
|
|
|
|
|
# Add the animation data to the ATC |
|
|
|
# Add the animation data to the ATC |
|
|
@ -96,7 +96,7 @@ class AnimationConverter: |
|
|
|
if anim_data.obj_sdl_anim: |
|
|
|
if anim_data.obj_sdl_anim: |
|
|
|
atcanim.start = self._convert_frame_time(min(get_ranges(obj_action, index=0))) |
|
|
|
atcanim.start = self._convert_frame_time(min(get_ranges(obj_action, index=0))) |
|
|
|
atcanim.end = self._convert_frame_time(max(get_ranges(obj_action, index=1))) |
|
|
|
atcanim.end = self._convert_frame_time(max(get_ranges(obj_action, index=1))) |
|
|
|
else: |
|
|
|
elif anim_data.obj_sdl_anim is None: |
|
|
|
atcanim.start = self._convert_frame_time(min(get_ranges(obj_action, data_action, index=0))) |
|
|
|
atcanim.start = self._convert_frame_time(min(get_ranges(obj_action, data_action, index=0))) |
|
|
|
atcanim.end = self._convert_frame_time(max(get_ranges(obj_action, data_action, index=1))) |
|
|
|
atcanim.end = self._convert_frame_time(max(get_ranges(obj_action, data_action, index=1))) |
|
|
|
|
|
|
|
|
|
|
@ -105,11 +105,10 @@ class AnimationConverter: |
|
|
|
for marker in obj_action.pose_markers: |
|
|
|
for marker in obj_action.pose_markers: |
|
|
|
atcanim.setMarker(marker.name, self._convert_frame_time(marker.frame)) |
|
|
|
atcanim.setMarker(marker.name, self._convert_frame_time(marker.frame)) |
|
|
|
|
|
|
|
|
|
|
|
def set_anim_params(plAGAnim): |
|
|
|
|
|
|
|
sdl_name = bo.plasma_modifiers.animation.obj_sdl_anim |
|
|
|
sdl_name = bo.plasma_modifiers.animation.obj_sdl_anim |
|
|
|
if sdl_name: |
|
|
|
if sdl_name: |
|
|
|
atcanim.globalVarName = sdl_name |
|
|
|
atcanim.globalVarName = sdl_name |
|
|
|
else: |
|
|
|
elif sdl_name is None: |
|
|
|
# Fixme? Not sure if we really need to expose this... |
|
|
|
# Fixme? Not sure if we really need to expose this... |
|
|
|
atcanim.easeInMin = 1.0 |
|
|
|
atcanim.easeInMin = 1.0 |
|
|
|
atcanim.easeInMax = 1.0 |
|
|
|
atcanim.easeInMax = 1.0 |
|
|
|