Skip to content

Commit

Permalink
Mac c4dpy compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbui78 committed Nov 25, 2024
1 parent b8d45a4 commit ba11ada
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Cinema 4D/appdir_common/plugins/DazToC4D/DazToC4D.pyp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
DZBRIDGE_VERSION_MAJOR = 2024
DZBRIDGE_VERSION_MINOR = 2
DZBRIDGE_VERSION_REVISION = 30
DZBRIDGE_VERSION_BUILD = 65
DZBRIDGE_VERSION_REVISION = 31
DZBRIDGE_VERSION_BUILD = 67
DZBRIDGE_VERSION_STRING = "v%s.%s.%s.%s" % (DZBRIDGE_VERSION_MAJOR, DZBRIDGE_VERSION_MINOR, DZBRIDGE_VERSION_REVISION, DZBRIDGE_VERSION_BUILD)
##
## DazToC4D
Expand Down
20 changes: 15 additions & 5 deletions DazStudioPlugin/DzC4DAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,19 @@ bool GenerateExporterBatchFile(QString batchFilePath, QString sExecutablePath, Q
QDir().mkdir(sBatchFileFolder);

// 4. Generate manual batch file to launch exporter scripts


#ifdef WIN32
QString sBatchString = QString("\
chcp 65001\n\n\
cd /d \"%1\"\n\n\
\"%2\"\
").arg(sCWD).arg(sExecutablePath);
#else defined(__APPLE__)
QString sBatchString = QString("\
cd \"%1\"\n\n\
\"%2\"\
").arg(sCWD).arg(sExecutablePath);
#endif
foreach(QString arg, sCommandArgs.split(";"))
{
if (arg.contains(" "))
Expand Down Expand Up @@ -161,15 +168,18 @@ DzError DzC4DExporter::write(const QString& filename, const DzFileIOSettings* op

//////////////////////////////////////////////////////////////////////////////////////////

//QString sC4DLogPath = sIntermediatePath + "/" + "create_c4d_file.log";
//QString sScriptPath = sIntermediateScriptsPath + "/" + "create_c4d_file.py";
//QString sCommandArgs = QString("%1;%2").arg(sScriptPath).arg(pC4DAction->m_sDestinationFBX);
#ifdef WIN32
QString sC4DLogPath = QString(".") + "/" + "create_c4d_file.log";
QString sScriptPath = QString("./Scripts") + "/" + "create_c4d_file.py";
#else defined(__APPLE__)
QString sC4DLogPath = sIntermediatePath + "/" + "create_c4d_file.log";
QString sScriptPath = sIntermediateScriptsPath + "/" + "create_c4d_file.py";
#endif
QString sCommandArgs = QString("%1;%2").arg(sScriptPath).arg(pC4DAction->m_sDestinationFBX);
#if WIN32
#ifdef WIN32
QString batchFilePath = sIntermediatePath + "/" + "create_c4d_file.bat";
#else
#else defined(__APPLE__)
QString batchFilePath = sIntermediatePath + "/" + "create_c4d_file.sh";
#endif
QString sC4DPyExecutable = FindC4DPyExe(pC4DAction->m_sC4DExecutablePath);
Expand Down
Binary file modified DazStudioPlugin/Resources/c4dplugin.zip
Binary file not shown.
6 changes: 3 additions & 3 deletions DazStudioPlugin/real_version.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#pragma once

#define PRODUCT_VERSION_STRING "2024 version 2.30"
#define PRODUCT_VERSION_STRING "2024 version 2.31"
#define VER_MAJOR 2024
#define VER_MINOR 2
#define VER_REV 30
#define VER_BUILD 65
#define VER_REV 31
#define VER_BUILD 67

#define TOSTRING(x) #x
#define VERSION_STRING TOSTRING(VER_MAJOR) "." TOSTRING(VER_MINOR) "." TOSTRING(VER_REV) "." TOSTRING(VER_BUILD)

0 comments on commit ba11ada

Please sign in to comment.