Add 'looping' flag to actions

This commit is contained in:
Jack Andersen 2016-09-05 19:51:11 -10:00
parent e960496a87
commit aa2d9d5631
4 changed files with 5 additions and 0 deletions

View File

@ -1047,6 +1047,7 @@ BlenderConnection::DataStream::Actor::Action::Action(BlenderConnection& conn)
conn._readBuf(&interval, 4);
conn._readBuf(&additive, 1);
conn._readBuf(&looping, 1);
uint32_t frameCount;
conn._readBuf(&frameCount, 4);

View File

@ -685,6 +685,7 @@ public:
std::string name;
float interval;
bool additive;
bool looping;
std::vector<int32_t> frames;
struct Channel
{

View File

@ -56,6 +56,7 @@ def draw(layout, context):
row = layout.row()
row.prop(context.scene, 'hecl_auto_remap', text="60-fps Remap")
row.prop(linked_action, 'hecl_additive', text="Additive")
#row.prop(linked_action, 'hecl_looping', text="Looping")

View File

@ -290,6 +290,7 @@ def cook(writebuf):
writebuf(struct.pack('f', 1.0 / bact.hecl_fps))
writebuf(struct.pack('b', int(bact.hecl_additive)))
writebuf(struct.pack('b', int(bact.hecl_looping)))
write_action_channels(writebuf, bact)
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.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_looping = bpy.props.BoolProperty(name='HECL Looping Action', default=False)
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)