mirror of https://github.com/AxioDL/metaforce.git
Add 'looping' flag to actions
This commit is contained in:
parent
e960496a87
commit
aa2d9d5631
|
@ -1047,6 +1047,7 @@ BlenderConnection::DataStream::Actor::Action::Action(BlenderConnection& conn)
|
||||||
|
|
||||||
conn._readBuf(&interval, 4);
|
conn._readBuf(&interval, 4);
|
||||||
conn._readBuf(&additive, 1);
|
conn._readBuf(&additive, 1);
|
||||||
|
conn._readBuf(&looping, 1);
|
||||||
|
|
||||||
uint32_t frameCount;
|
uint32_t frameCount;
|
||||||
conn._readBuf(&frameCount, 4);
|
conn._readBuf(&frameCount, 4);
|
||||||
|
|
|
@ -685,6 +685,7 @@ public:
|
||||||
std::string name;
|
std::string name;
|
||||||
float interval;
|
float interval;
|
||||||
bool additive;
|
bool additive;
|
||||||
|
bool looping;
|
||||||
std::vector<int32_t> frames;
|
std::vector<int32_t> frames;
|
||||||
struct Channel
|
struct Channel
|
||||||
{
|
{
|
||||||
|
|
|
@ -56,6 +56,7 @@ def draw(layout, context):
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.prop(context.scene, 'hecl_auto_remap', text="60-fps Remap")
|
row.prop(context.scene, 'hecl_auto_remap', text="60-fps Remap")
|
||||||
row.prop(linked_action, 'hecl_additive', text="Additive")
|
row.prop(linked_action, 'hecl_additive', text="Additive")
|
||||||
|
#row.prop(linked_action, 'hecl_looping', text="Looping")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -290,6 +290,7 @@ def cook(writebuf):
|
||||||
|
|
||||||
writebuf(struct.pack('f', 1.0 / bact.hecl_fps))
|
writebuf(struct.pack('f', 1.0 / bact.hecl_fps))
|
||||||
writebuf(struct.pack('b', int(bact.hecl_additive)))
|
writebuf(struct.pack('b', int(bact.hecl_additive)))
|
||||||
|
writebuf(struct.pack('b', int(bact.hecl_looping)))
|
||||||
|
|
||||||
write_action_channels(writebuf, bact)
|
write_action_channels(writebuf, bact)
|
||||||
writebuf(struct.pack('I', len(sact_data.subtypes)))
|
writebuf(struct.pack('I', len(sact_data.subtypes)))
|
||||||
|
@ -351,6 +352,7 @@ def register():
|
||||||
bpy.types.Scene.hecl_sact_data = bpy.props.PointerProperty(type=SACTData)
|
bpy.types.Scene.hecl_sact_data = bpy.props.PointerProperty(type=SACTData)
|
||||||
bpy.types.Action.hecl_fps = bpy.props.IntProperty(name='HECL Action FPS', default=30)
|
bpy.types.Action.hecl_fps = bpy.props.IntProperty(name='HECL Action FPS', default=30)
|
||||||
bpy.types.Action.hecl_additive = bpy.props.BoolProperty(name='HECL Additive Action', default=False)
|
bpy.types.Action.hecl_additive = bpy.props.BoolProperty(name='HECL Additive Action', default=False)
|
||||||
|
bpy.types.Action.hecl_looping = bpy.props.BoolProperty(name='HECL Looping Action', default=False)
|
||||||
bpy.types.Scene.hecl_auto_remap = bpy.props.BoolProperty(name="Auto Remap",
|
bpy.types.Scene.hecl_auto_remap = bpy.props.BoolProperty(name="Auto Remap",
|
||||||
description="Enables automatic 60-fps time-remapping for playback-validation purposes",
|
description="Enables automatic 60-fps time-remapping for playback-validation purposes",
|
||||||
default=True, update=time_remap_update)
|
default=True, update=time_remap_update)
|
||||||
|
|
Loading…
Reference in New Issue