mirror of https://github.com/AxioDL/metaforce.git
addon updates
This commit is contained in:
parent
3341e6c4f3
commit
247e80fc1a
|
@ -51,8 +51,8 @@ def draw(layout, context):
|
|||
if linked_action is None:
|
||||
layout.label("Source action not set", icon='ERROR')
|
||||
else:
|
||||
layout.prop(linked_action, 'hecl_index', text="Index")
|
||||
layout.prop(linked_action, 'hecl_anim_props', text="Props")
|
||||
#layout.prop(linked_action, 'hecl_index', text="Index")
|
||||
#layout.prop(linked_action, 'hecl_anim_props', text="Props")
|
||||
layout.prop(linked_action, 'hecl_fps', text="Frame Rate")
|
||||
layout.prop(context.scene, 'hecl_auto_remap', text="60-fps Remap")
|
||||
|
||||
|
@ -134,9 +134,9 @@ class SACTAction_load(bpy.types.Operator):
|
|||
subtype = actor_data.subtypes[actor_data.active_subtype]
|
||||
|
||||
# Refresh event markers
|
||||
actor_event.clear_event_markers(actor_data, context)
|
||||
actor_event.update_action_events(None)
|
||||
actor_event.active_event_update(None, context)
|
||||
#SACTEvent.clear_event_markers(actor_data, context)
|
||||
#SACTEvent.update_action_events(None)
|
||||
#SACTEvent.active_event_update(None, context)
|
||||
|
||||
# Clear animation data for all subtypes
|
||||
for s in range(len(actor_data.subtypes)):
|
||||
|
@ -170,8 +170,8 @@ class SACTAction_load(bpy.types.Operator):
|
|||
bpy.context.scene.frame_end = action_obj.frame_range[1]
|
||||
|
||||
# Events
|
||||
#actor_event.clear_action_events(self, context, actor_data)
|
||||
#actor_event.load_action_events(self, context, action_obj, 0)
|
||||
#SACTEvent.clear_action_events(self, context, actor_data)
|
||||
#SACTEvent.load_action_events(self, context, action_obj, 0)
|
||||
|
||||
return {'FINISHED'}
|
||||
|
||||
|
@ -190,9 +190,9 @@ class SACTAction_load(bpy.types.Operator):
|
|||
# Registration
|
||||
def register():
|
||||
bpy.types.Action.hecl_fps = bpy.props.IntProperty(name="HECL Actor Sub-action Frame-rate",
|
||||
description="Frame-rate at which action is authored; to be interpolated at 60-fps by runtime",
|
||||
min=1, max=60, default=30,
|
||||
update=active_action_update)
|
||||
description="Frame-rate at which action is authored; to be interpolated at 60-fps by runtime",
|
||||
min=1, max=60, default=30,
|
||||
update=active_action_update)
|
||||
bpy.utils.register_class(SACTAction)
|
||||
bpy.utils.register_class(SACTAction_add)
|
||||
bpy.utils.register_class(SACTAction_load)
|
||||
|
|
|
@ -400,16 +400,14 @@ def active_event_update(self, context):
|
|||
actor_data = context.scene.hecl_sact_data
|
||||
if actor_data.active_action in range(len(actor_data.actions)):
|
||||
action_data = actor_data.actions[actor_data.active_action]
|
||||
if action_data.active_subaction in range(len(action_data.subactions)):
|
||||
subaction_data = action_data.subactions[action_data.active_subaction]
|
||||
for marker in context.scene.timeline_markers:
|
||||
if marker.name.startswith('hecl_'):
|
||||
blend_action = bpy.data.actions[subaction_data.name]
|
||||
event_name = blend_action.hecl_events[blend_action.hecl_active_event].name
|
||||
if marker.name == 'hecl_' + str(blend_action.hecl_index) + '_' + str(blend_action.hecl_active_event) + '_' + event_name:
|
||||
marker.select = True
|
||||
else:
|
||||
marker.select = False
|
||||
for marker in context.scene.timeline_markers:
|
||||
if marker.name.startswith('hecl_'):
|
||||
blend_action = bpy.data.actions[action_data.name]
|
||||
event_name = blend_action.hecl_events[blend_action.hecl_active_event].name
|
||||
if marker.name == 'hecl_' + str(blend_action.hecl_index) + '_' + str(blend_action.hecl_active_event) + '_' + event_name:
|
||||
marker.select = True
|
||||
else:
|
||||
marker.select = False
|
||||
|
||||
# Registration
|
||||
def register():
|
||||
|
@ -423,7 +421,7 @@ def register():
|
|||
bpy.utils.register_class(hecl_actor_subaction_event_move_down)
|
||||
bpy.utils.register_class(hecl_actor_subaction_event_move_up)
|
||||
bpy.types.Action.hecl_events = bpy.props.CollectionProperty(name="HECL action event",
|
||||
type=hecl_actor_event)
|
||||
type=hecl_actor_event)
|
||||
bpy.types.Action.hecl_active_event = bpy.props.IntProperty(name="HECL active action event",
|
||||
default=0,
|
||||
update=active_event_update)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from . import SACTSubtype, SACTAction, SACTEvent, ANIM
|
||||
from . import SACTSubtype, SACTAction, ANIM
|
||||
from .. import hmdl
|
||||
|
||||
import bpy
|
||||
|
@ -25,8 +25,8 @@ class SACTData(bpy.types.PropertyGroup):
|
|||
show_actions =\
|
||||
bpy.props.BoolProperty()
|
||||
|
||||
show_events =\
|
||||
bpy.props.BoolProperty()
|
||||
#show_events =\
|
||||
#bpy.props.BoolProperty()
|
||||
|
||||
# A Routine to resolve HECL DAG-relative paths while ensuring database path-constraints
|
||||
def resolve_local_path(blend_path, rel_path):
|
||||
|
@ -235,20 +235,29 @@ def cook(writebuffunc, platform, endianchar):
|
|||
def draw(layout, context):
|
||||
SACTSubtype.draw(layout.box(), context)
|
||||
SACTAction.draw(layout.box(), context)
|
||||
SACTEvent.draw(layout.box(), context)
|
||||
#SACTEvent.draw(layout.box(), context)
|
||||
|
||||
|
||||
# Time-remap option update
|
||||
def time_remap_update(self, context):
|
||||
if context.scene.hecl_type == 'ACTOR':
|
||||
SACTAction.active_action_update(self, context)
|
||||
|
||||
|
||||
# Registration
|
||||
def register():
|
||||
SACTSubtype.register()
|
||||
SACTEvent.register()
|
||||
#SACTEvent.register()
|
||||
SACTAction.register()
|
||||
bpy.utils.register_class(SACTData)
|
||||
bpy.types.Scene.hecl_sact_data = bpy.props.PointerProperty(type=SACTData)
|
||||
bpy.types.Action.hecl_fps = bpy.props.IntProperty(name='HECL Acion FPS', default=30)
|
||||
bpy.types.Scene.hecl_auto_remap = bpy.props.BoolProperty(name="Auto Remap",
|
||||
description="Enables automatic 60-fps time-remapping for playback-validation purposes",
|
||||
default=True, update=time_remap_update)
|
||||
|
||||
def unregister():
|
||||
bpy.utils.unregister_class(SACTData)
|
||||
SACTSubtype.unregister()
|
||||
SACTAction.unregister()
|
||||
SACTEvent.unregister()
|
||||
#SACTEvent.unregister()
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit d0577ae3040aa19861009b95bf28ea05f12b8c53
|
||||
Subproject commit 5b38596595a0b457ce617b36e1c7fa23620303fc
|
Loading…
Reference in New Issue