Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ void msblenMaterialsExportHelper::handleSocketValue(bNodeSocket* socket,
}

if (setColorHandler) {
mu::float4 colorValue;
mu::float4 colorValue = { 0,0,0,0 };

switch (socket->type)
{
Expand Down
4 changes: 2 additions & 2 deletions Plugins~/Src/MeshSyncClientBlender/msblenModifiers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,13 +310,13 @@ void msblenModifiers::importProperties(std::vector<ms::PropertyInfo> props) {
// Apply returned properties:
for (auto& receivedProp : props) {
if (receivedProp.type == ms::PropertyInfo::Type::Int)
debug_log(Format("importing: %s: %d %d", receivedProp.name.c_str(), receivedProp.get<int>(), receivedProp.sourceType));
debug_log(mu::Format("importing: %s: %d %d", receivedProp.name.c_str(), receivedProp.get<int>(), receivedProp.sourceType));

auto obj = msblenUtils::get_object_from_path(receivedProp.path);

// Should never happen but just in case:
if (!obj) {
debug_log(Format("cannot find object: %s", receivedProp.path.c_str()));
debug_log(mu::Format("cannot find object: %s", receivedProp.path.c_str()));
continue;
}

Expand Down
7 changes: 3 additions & 4 deletions Plugins~/Src/MeshSyncClientBlender/msblenUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "msblenUtils.h"

#include "BlenderPyObjects/BlenderPyScene.h"
#include "MeshUtils/muLog.h"

namespace bl = blender;
namespace msblenUtils {
Expand Down Expand Up @@ -181,14 +182,14 @@ bool is_mesh(const Object *obj) { return obj->type == OB_MESH; }
bool is_camera(const Object *obj) { return obj->type == OB_CAMERA; }
bool is_light(const Object *obj) { return obj->type == OB_LAMP; }
bool is_armature(const Object *obj) { return obj->type == OB_ARMATURE; }

}

#ifdef BLENDER_DEBUG_LOGS
void debug_log(std::string message) {
try {
py::gil_scoped_acquire acquire;

auto statement = Format("print('%s')", message.c_str());
auto statement = mu::Format("print('%s')", message.c_str());

py::eval<py::eval_mode::eval_statements>(
statement.c_str());
Expand All @@ -200,5 +201,3 @@ void debug_log(std::string message) {
}
}
#endif

}