Skip to content

Commit

Permalink
Only dump a warning if root prim is not active #643 (#644)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienblor committed Jan 21, 2021
1 parent 778639e commit 244e5d7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion translator/reader/reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,18 @@ void UsdArnoldReader::ReadStage(UsdStageRefPtr stage, const std::string &path)
if (!path.empty()) {
SdfPath sdfPath(path);
rootPrim = _stage->GetPrimAtPath(sdfPath);
if ((!rootPrim) || (!rootPrim.IsActive())) {
if (!rootPrim) {
AiMsgError(
"[usd] %s : Object Path %s is not valid", (_procParent) ? AiNodeGetName(_procParent) : "",
path.c_str());
return;
}
if (!rootPrim.IsActive()) {
AiMsgWarning(
"[usd] %s : Object Path primitive %s is not active", (_procParent) ? AiNodeGetName(_procParent) : "",
path.c_str());
return;
}
rootPrimPtr = &rootPrim;
}

Expand Down

0 comments on commit 244e5d7

Please sign in to comment.