Skip to content

Commit

Permalink
replace assert with TF_AXIOM
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamed Sabri committed Jan 12, 2021
1 parent 43bf1b1 commit 8bac473
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/mayaUsd/ufe/UsdContextOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,17 +575,17 @@ Ufe::UndoableCommand::Ptr UsdContextOps::doOpCmd(const ItemPath& itemPath)
else if (itemPath[0] == kUSDToggleVisibilityItem) {
#if UFE_PREVIEW_VERSION_NUM < 2034
auto attributes = Ufe::Attributes::attributes(sceneItem());
assert(attributes);
TF_AXIOM(attributes);
auto visibility = std::dynamic_pointer_cast<Ufe::AttributeEnumString>(
attributes->attribute(UsdGeomTokens->visibility));
assert(visibility);
TF_AXIOM(visibility);
auto current = visibility->get();
return visibility->setCmd(
current == UsdGeomTokens->invisible ? UsdGeomTokens->inherited
: UsdGeomTokens->invisible);
#else
auto object3d = UsdObject3d::create(fItem);
assert(object3d);
TF_AXIOM(object3d);
auto current = object3d->visibility();
return object3d->setVisibleCmd(!current);
#endif
Expand Down

0 comments on commit 8bac473

Please sign in to comment.