Skip to content
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

MAYA-105743 Use the correct type when creating a new group #672

Merged
merged 1 commit into from
Jul 25, 2020

Conversation

fowlertADSK
Copy link
Contributor

Made a typo in my group command change. Problem was that I used the variable for the name of the new object when defining the prim type. Fixed that and added to the group test to make sure it's correct.

_primToken = (type.empty() || type == "Def") ? TfToken() : TfToken(name);
_primToken = (type.empty() || type == "Def") ? TfToken() : TfToken(type);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea how this got left as "name" seeing as this problem was the first thing I discovered when implementing the new command.

Comment on lines +95 to +99
# Make sure the new group item has the correct Usd type
newGroupItem = ufe.Hierarchy.createItem(newGroupPath)
newGroupPrim = usdUtils.getPrimFromSceneItem(newGroupItem)
newGroupType = newGroupPrim.GetTypeName()
self.assertEqual(newGroupType, 'Xform')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure the new group is an Xform. Our new group command always uses the Xform type, the context op's code in the Outliner is the one that can pass a number of different types.

@kxl-adsk kxl-adsk merged commit 7ec68a8 into dev Jul 25, 2020
@kxl-adsk kxl-adsk deleted the fowlert/MAYA-105743/add_correct_type branch July 25, 2020 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants