Browse Source

More adjustments and fixes

Another batch of fixes and slight UI adjustment per Hoikas.
pull/219/head
Patrick Dulebohn 4 years ago
parent
commit
891b8f3fca
  1. 4
      korman/exporter/animation.py
  2. 1
      korman/properties/modifiers/anim.py
  3. 7
      korman/ui/modifiers/anim.py

4
korman/exporter/animation.py

@ -90,14 +90,14 @@ class AnimationConverter:
if i is not None:
yield i.frame_range[index]
atcanim.name = "(Entire Animation)"
sdl_name = bo.plasma_modifiers.animation.obj_sdl_anim
sdl_name = anim_mod.obj_sdl_anim
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)))
if isinstance(atcanim, plAgeGlobalAnim):
atcanim.globalVarName = anim_mod.obj_sdl_anim
if isinstance(atcanim, plATCAnim):
# Marker points
if obj_action is not None and not anim_data.obj_sdl_anim:
if obj_action is not None:
for marker in obj_action.pose_markers:
atcanim.setMarker(marker.name, self._convert_frame_time(marker.frame))
# Fixme? Not sure if we really need to expose this...

1
korman/properties/modifiers/anim.py

@ -73,7 +73,6 @@ class PlasmaAnimationModifier(ActionModifier, PlasmaModifierProperties):
anim_mod = bo.plasma_modifiers.animation
atcanim = exporter.mgr.find_create_object(anim_mod.anim_type, so=so)
if not isinstance(atcanim, plAgeGlobalAnim):
atcanim = exporter.mgr.find_create_object(plATCAnim, so=so)
atcanim.autoStart = self.auto_start
atcanim.loop = self.loop

7
korman/ui/modifiers/anim.py

@ -32,7 +32,6 @@ def animation(modifier, layout, context):
return
split = layout.split()
col = layout.column()
col = split.column()
col.prop(modifier, "auto_start")
col = split.column()
@ -44,10 +43,8 @@ def animation(modifier, layout, context):
col.enabled = modifier.loop and not modifier.obj_sdl_anim
col.prop_search(modifier, "loop_start", action, "pose_markers", icon="PMARKER")
col.prop_search(modifier, "loop_end", action, "pose_markers", icon="PMARKER")
col = layout.column()
col.label("SDL Animation:")
col.prop(modifier, "obj_sdl_anim", text="")
layout.separator()
layout.prop(modifier, "obj_sdl_anim")
def animation_filter(modifier, layout, context):
split = layout.split()

Loading…
Cancel
Save