diff --git a/hecl/blender/BlenderConnection.cpp b/hecl/blender/BlenderConnection.cpp index 623b0c958..93f74ebce 100644 --- a/hecl/blender/BlenderConnection.cpp +++ b/hecl/blender/BlenderConnection.cpp @@ -360,6 +360,17 @@ BlenderConnection::BlenderConnection(int verbosityLevel) } _writeLine("ACK"); + _readLine(lineBuf, 7); + if (!strcmp(lineBuf, "SLERP0")) + m_hasSlerp = false; + else if (!strcmp(lineBuf, "SLERP1")) + m_hasSlerp = true; + else + { + _closePipe(); + BlenderLog.report(logvisor::Fatal, "read '%s' from blender; expected 'SLERP(0|1)'", lineBuf); + } + break; } } diff --git a/hecl/blender/BlenderConnection.hpp b/hecl/blender/BlenderConnection.hpp index f77eb23f8..c958c1de7 100644 --- a/hecl/blender/BlenderConnection.hpp +++ b/hecl/blender/BlenderConnection.hpp @@ -56,6 +56,7 @@ private: #endif int m_readpipe[2]; int m_writepipe[2]; + bool m_hasSlerp; BlendType m_loadedType = BlendType::None; bool m_loadedRigged = false; ProjectPath m_loadedBlend; @@ -69,6 +70,8 @@ public: BlenderConnection(int verbosityLevel=1); ~BlenderConnection(); + bool hasSLERP() const {return m_hasSlerp;} + bool createBlend(const ProjectPath& path, BlendType type); BlendType getBlendType() const {return m_loadedType;} bool getRigged() const {return m_loadedRigged;} @@ -267,6 +270,7 @@ public: { return ANIMOutStream(m_parent); } + BlenderConnection& getConnection() {return *m_parent;} }; PyOutStream beginPythonOut(bool deleteOnError=false) { diff --git a/hecl/blender/hecl/sact/SACTAction.py b/hecl/blender/hecl/sact/SACTAction.py index 85a50c784..e05021043 100644 --- a/hecl/blender/hecl/sact/SACTAction.py +++ b/hecl/blender/hecl/sact/SACTAction.py @@ -167,13 +167,13 @@ class SACTAction_load(bpy.types.Operator): bpy.context.scene.render.fps = 60 bpy.context.scene.render.frame_map_old = action_obj.hecl_fps bpy.context.scene.render.frame_map_new = 60 - bpy.context.scene.frame_start = 2 + bpy.context.scene.frame_start = 0 bpy.context.scene.frame_end = action_obj.frame_range[1] * (60 / action_obj.hecl_fps) else: bpy.context.scene.render.fps = action_obj.hecl_fps bpy.context.scene.render.frame_map_old = action_obj.hecl_fps bpy.context.scene.render.frame_map_new = action_obj.hecl_fps - bpy.context.scene.frame_start = 1 + bpy.context.scene.frame_start = 0 bpy.context.scene.frame_end = action_obj.frame_range[1] # Events diff --git a/hecl/blender/hecl_blendershell.py b/hecl/blender/hecl_blendershell.py index dc5e4e891..bfd450553 100644 --- a/hecl/blender/hecl_blendershell.py +++ b/hecl/blender/hecl_blendershell.py @@ -66,6 +66,12 @@ ackbytes = readpipeline() if ackbytes != b'ACK': quitblender() +# slerp branch check +if b'quat-slerp' in bpy.app.build_branch: + writepipeline(b'SLERP1') +else: + writepipeline(b'SLERP0') + # Count brackets def count_brackets(linestr): bracket_count = 0