mirror of https://github.com/AxioDL/metaforce.git
Support for SLERP blender fork
This commit is contained in:
parent
e6cf759477
commit
f581ed3127
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue