-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revise some of the renaming restrictions rules #639
Revise some of the renaming restrictions rules #639
Conversation
throw std::runtime_error(err.c_str()); | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MAYA-105175: Removed renaming restriction around external references.
@@ -30,6 +30,8 @@ class UsdAttribute; | |||
class UsdPrim; | |||
class UsdGeomCamera; | |||
class UsdLuxDistantLight; | |||
class UsdPrimCompositionQuery; | |||
class UsdPrimCompositionQueryArc; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forward declare UsdPrimCompositionQuery. UsdPrimCompositionQueryArc classes.
They are useful for interrogating of prims for composition arcs.
} | ||
} | ||
|
||
return found; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MAYA-103973: Renaming certain prims crashes Maya
@ppt-adsk The logic here checks to see if a node has really any specs to contribute to the final composite prim. I am not sure 100% if this is the correct way of handling this case but that's the only way I found for now.
Please see my post on usd-interest around this:
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/usd-interest/vweEUkTr6NY/MTYURcHfAgAJ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ppt-adsk all existing rename tests cases should pass with this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't say I have any further experience... Logic sounds reasonable to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, as far as I can tell. I would have liked to see a test demonstrating the impact of this fix, i.e. before your fix the test would fail, and after your fix it would pass.
@@ -60,6 +60,14 @@ UsdUndoRenameCommand::UsdUndoRenameCommand(const UsdSceneItem::Ptr& srcItem, con | |||
{ | |||
const UsdPrim& prim = _stage->GetPrimAtPath(_ufeSrcItem->prim().GetPath()); | |||
|
|||
// eraly check to see if a particular node has any specs to contribute |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"eraly" --> "Early"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -60,6 +60,14 @@ UsdUndoRenameCommand::UsdUndoRenameCommand(const UsdSceneItem::Ptr& srcItem, con | |||
{ | |||
const UsdPrim& prim = _stage->GetPrimAtPath(_ufeSrcItem->prim().GetPath()); | |||
|
|||
// eraly check to see if a particular node has any specs to contribute | |||
// to the final composed prim. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to mention how that can happen (e.g. reference).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed in 7fafef6
lib/usd/utils/util.cpp
Outdated
|
||
UsdPrimCompositionQuery query(prim); | ||
|
||
for (const auto& compQuaryArc : query.GetCompositionArcs()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"compQuaryArc" --> "compQueryArc"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed in 7fafef6
} | ||
} | ||
|
||
return found; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't say I have any further experience... Logic sounds reasonable to me.
test/lib/ufe/testRename.py
Outdated
@@ -275,6 +275,7 @@ def testRenameRestrictionOtherLayerOpinions(self): | |||
newName = 'Ball_35_Renamed' | |||
cmds.rename(newName) | |||
|
|||
@unittest.skip("Restriction around renaming external references has been removed.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should remove this test, if it's no longer useful. If we ever need to go back to it, it'll be in git.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed in 7fafef6
No description provided.