Fixed issue where asset creation was failing if it tried to extract a help string from a parm that doesn't support it.
@@ -152,8 +152,6 @@ public:
HAPI_Result hapiResult;
HAPI_ParmInfo parmInfo;
- MString helpString = "";
-
GET_COMMAND_ASSET_OR_RETURN_FAIL();
int nodeId = asset->getNodeInfo().id;
@@ -161,18 +159,15 @@ public:
hapiResult = HAPI_GetParmInfoFromName(Util::theHAPISession.get(), nodeId,
myParmName.asChar(), &parmInfo);
- if (HAPI_FAIL(hapiResult))
+ if (!HAPI_FAIL(hapiResult))
{
- DISPLAY_ERROR("Could not get info of parm name \"^1s\"", myParmName);
- DISPLAY_ERROR_HAPI_STATUS_CALL();
-
- return MStatus::kFailure;
- }
+ MString helpString = "";
if (parmInfo.helpSH != 0)
helpString = Util::HAPIString(parmInfo.helpSH);
MPxCommand::setResult(helpString);
+ }
return MStatus::kSuccess;
}
