mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-06-06 14:33:27 +00:00
Connection: Amend clang-format discrepancies
This commit is contained in:
parent
ac4858b857
commit
d00cb36fc2
@ -339,8 +339,8 @@ Connection::Connection(int verbosityLevel) {
|
||||
}
|
||||
}
|
||||
|
||||
std::wstring cmdLine = fmt::format(fmt(L" --background -P \"{}\" -- {} {} {} \"{}\""),
|
||||
blenderShellPath, uintptr_t(writehandle), uintptr_t(readhandle), verbosityLevel, blenderAddonPath);
|
||||
std::wstring cmdLine = fmt::format(fmt(L" --background -P \"{}\" -- {} {} {} \"{}\""), blenderShellPath,
|
||||
uintptr_t(writehandle), uintptr_t(readhandle), verbosityLevel, blenderAddonPath);
|
||||
|
||||
STARTUPINFO sinfo = {sizeof(STARTUPINFO)};
|
||||
HANDLE nulHandle = CreateFileW(L"nul", GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, &sattrs, OPEN_EXISTING,
|
||||
@ -355,8 +355,8 @@ Connection::Connection(int verbosityLevel) {
|
||||
sinfo.hStdOutput = consoleOutWrite;
|
||||
}
|
||||
|
||||
if (!CreateProcessW(blenderBin, const_cast<wchar_t*>(cmdLine.c_str()), NULL, NULL, TRUE,
|
||||
NORMAL_PRIORITY_CLASS, NULL, NULL, &sinfo, &m_pinfo)) {
|
||||
if (!CreateProcessW(blenderBin, const_cast<wchar_t*>(cmdLine.c_str()), NULL, NULL, TRUE, NORMAL_PRIORITY_CLASS,
|
||||
NULL, NULL, &sinfo, &m_pinfo)) {
|
||||
LPWSTR messageBuffer = nullptr;
|
||||
FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL,
|
||||
GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPWSTR)&messageBuffer, 0, NULL);
|
||||
@ -420,8 +420,8 @@ Connection::Connection(int verbosityLevel) {
|
||||
|
||||
/* Try user-specified blender first */
|
||||
if (blenderBin) {
|
||||
execlp(blenderBin, blenderBin, "--background", "-P", blenderShellPath.c_str(), "--",
|
||||
readfds.c_str(), writefds.c_str(), vLevel.c_str(), blenderAddonPath.c_str(), NULL);
|
||||
execlp(blenderBin, blenderBin, "--background", "-P", blenderShellPath.c_str(), "--", readfds.c_str(),
|
||||
writefds.c_str(), vLevel.c_str(), blenderAddonPath.c_str(), NULL);
|
||||
if (errno != ENOENT) {
|
||||
errbuf = fmt::format(fmt("NOLAUNCH {}"), strerror(errno));
|
||||
_writeStr(errbuf.c_str(), errbuf.size(), m_readpipe[1]);
|
||||
@ -438,8 +438,8 @@ Connection::Connection(int verbosityLevel) {
|
||||
steamBlender += "/blender";
|
||||
#endif
|
||||
blenderBin = steamBlender.c_str();
|
||||
execlp(blenderBin, blenderBin, "--background", "-P", blenderShellPath.c_str(), "--",
|
||||
readfds.c_str(), writefds.c_str(), vLevel.c_str(), blenderAddonPath.c_str(), NULL);
|
||||
execlp(blenderBin, blenderBin, "--background", "-P", blenderShellPath.c_str(), "--", readfds.c_str(),
|
||||
writefds.c_str(), vLevel.c_str(), blenderAddonPath.c_str(), NULL);
|
||||
if (errno != ENOENT) {
|
||||
errbuf = fmt::format(fmt("NOLAUNCH {}"), strerror(errno));
|
||||
_writeStr(errbuf.c_str(), errbuf.size(), m_readpipe[1]);
|
||||
@ -470,8 +470,8 @@ Connection::Connection(int verbosityLevel) {
|
||||
m_errPath = hecl::SystemString(TMPDIR) +
|
||||
fmt::format(fmt(_SYS_STR("/hecl_{:016X}.derp")), (unsigned long long)m_pinfo.dwProcessId);
|
||||
#else
|
||||
m_errPath =
|
||||
hecl::SystemString(TMPDIR) + fmt::format(fmt(_SYS_STR("/hecl_{:016X}.derp")), (unsigned long long)m_blenderProc);
|
||||
m_errPath = hecl::SystemString(TMPDIR) +
|
||||
fmt::format(fmt(_SYS_STR("/hecl_{:016X}.derp")), (unsigned long long)m_blenderProc);
|
||||
#endif
|
||||
hecl::Unlink(m_errPath.c_str());
|
||||
|
||||
@ -652,8 +652,7 @@ void PyOutStream::close() {
|
||||
}
|
||||
|
||||
void PyOutStream::linkBlend(const char* target, const char* objName, bool link) {
|
||||
format(fmt(
|
||||
"if '{}' not in bpy.data.scenes:\n"
|
||||
format(fmt("if '{}' not in bpy.data.scenes:\n"
|
||||
" with bpy.data.libraries.load('''{}''', link={}, relative=True) as (data_from, data_to):\n"
|
||||
" data_to.scenes = data_from.scenes\n"
|
||||
" obj_scene = None\n"
|
||||
@ -675,8 +674,7 @@ void PyOutStream::linkBlend(const char* target, const char* objName, bool link)
|
||||
|
||||
void PyOutStream::linkBackground(const char* target, const char* sceneName) {
|
||||
if (!sceneName) {
|
||||
format(fmt(
|
||||
"with bpy.data.libraries.load('''{}''', link=True, relative=True) as (data_from, data_to):\n"
|
||||
format(fmt("with bpy.data.libraries.load('''{}''', link=True, relative=True) as (data_from, data_to):\n"
|
||||
" data_to.scenes = data_from.scenes\n"
|
||||
"obj_scene = None\n"
|
||||
"for scene in data_to.scenes:\n"
|
||||
@ -688,8 +686,7 @@ void PyOutStream::linkBackground(const char* target, const char* sceneName) {
|
||||
"bpy.context.scene.background_set = obj_scene\n"),
|
||||
target, target);
|
||||
} else {
|
||||
format(fmt(
|
||||
"if '{}' not in bpy.data.scenes:\n"
|
||||
format(fmt("if '{}' not in bpy.data.scenes:\n"
|
||||
" with bpy.data.libraries.load('''{}''', link=True, relative=True) as (data_from, data_to):\n"
|
||||
" data_to.scenes = data_from.scenes\n"
|
||||
" obj_scene = None\n"
|
||||
@ -708,8 +705,7 @@ void PyOutStream::linkBackground(const char* target, const char* sceneName) {
|
||||
void PyOutStream::AABBToBMesh(const atVec3f& min, const atVec3f& max) {
|
||||
athena::simd_floats minf(min.simd);
|
||||
athena::simd_floats maxf(max.simd);
|
||||
format(fmt(
|
||||
"bm = bmesh.new()\n"
|
||||
format(fmt("bm = bmesh.new()\n"
|
||||
"bm.verts.new(({},{},{}))\n"
|
||||
"bm.verts.new(({},{},{}))\n"
|
||||
"bm.verts.new(({},{},{}))\n"
|
||||
@ -1459,8 +1455,9 @@ Action::Action(Connection& conn) {
|
||||
subtypeAABBs.back().first.read(conn);
|
||||
subtypeAABBs.back().second.read(conn);
|
||||
// printf("AABB %s %d (%f %f %f) (%f %f %f)\n", name.c_str(), i,
|
||||
// float(subtypeAABBs.back().first.val.simd[0]), float(subtypeAABBs.back().first.val.simd[1]), float(subtypeAABBs.back().first.val.simd[2]),
|
||||
// float(subtypeAABBs.back().second.val.simd[0]), float(subtypeAABBs.back().second.val.simd[1]), float(subtypeAABBs.back().second.val.simd[2]));
|
||||
// float(subtypeAABBs.back().first.val.simd[0]), float(subtypeAABBs.back().first.val.simd[1]),
|
||||
// float(subtypeAABBs.back().first.val.simd[2]), float(subtypeAABBs.back().second.val.simd[0]),
|
||||
// float(subtypeAABBs.back().second.val.simd[1]), float(subtypeAABBs.back().second.val.simd[2]));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user