Exporter Fix

This commit is contained in:
antc13
2016-01-27 09:37:01 +01:00
parent aa115befa9
commit c5b1afb0d4
2 changed files with 15 additions and 4 deletions
+14 -3
View File
@@ -47,13 +47,24 @@ bool Export::Meshes(std::string pathName, bool selectedOnly)
for (unsigned int i = 0; i < connections.length(); i++) {
if (connections[i].node().apiType() == MFn::kSkinClusterFilter) {
MGlobal::select(shape.parent(i), MGlobal::kReplaceList);
MGlobal::displayInfo(MString() + "Moving " + thisNode.name() + " to bindPose.");
shape.parent(0, &status);
if (status != MS::kSuccess) {
MGlobal::displayError(MString() + "shape.parent(0, &status) failed with: " + status.errorString());
}
status = MGlobal::select(shape.parent(0), MGlobal::kReplaceList);
if (status != MS::kSuccess) {
MGlobal::displayError(MString() + "Parent to " + thisNode.name() + " failed");
}
MFnDependencyNode tmp(shape.parent(0));
MGlobal::displayInfo(MString() + "Moving " + tmp.name() + " to bindPose.");
status = MGlobal::executeCommand("GoToBindPose;");
if (status != MS::kSuccess) {
MGlobal::displayError(MString() + "GoToBindPose: " + status.errorString());
}
MGlobal::displayInfo(MString() + "Has moved " + thisNode.name() + " to bindPose.");
MGlobal::displayInfo(MString() + "Has moved " + tmp.name() + " to bindPose.");
}
}
}