Skip to content

Commit

Permalink
C++ Maya Helper - Do not spam the terminal
Browse files Browse the repository at this point in the history
We do not need to know if the given attribute fails or not - the
plug.isNull() already gets this information.
  • Loading branch information
david-cattermole committed Oct 17, 2024
1 parent d4b286d commit ebf5790
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/mmSolver/mayahelper/maya_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,10 @@ bool hasAttrName(MFnDependencyNode &dependFn, const MString &attrName) {
MStatus status = MStatus::kSuccess;
auto network_plug = true;
MPlug plug = dependFn.findPlug(attrName, network_plug, &status);
CHECK_MSTATUS(status);
// There is no need to check the 'status' because we check the
// plug status anyway. Calling 'CHECK_MSTATUS(status);' would only
// spam the terminal output, because this function is called a lot
// and it is intended to return directly.
return !plug.isNull();
}

Expand Down

0 comments on commit ebf5790

Please sign in to comment.