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

Unauthored attrs changes #2414

Merged
merged 27 commits into from
Jun 17, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
724267c
LOOKDEVX-642 | Initial commit for unauthored attribute support.
feldstj Apr 1, 2022
41df474
LOOKDEVX-642 | Some more unauthored attribute changes.
feldstj Apr 8, 2022
addab49
LOOKDEVX-642 | Some more unauthored attribute changes.
feldstj Apr 20, 2022
8ec8d8d
LOOKDEVX-642 | Fixed build issue.
feldstj Apr 25, 2022
dbfd087
LOOKDEVX-642 | Some more unauthored attribute changes.
feldstj Apr 28, 2022
5204830
LOOKDEVX-642 | Some unauthored attribute test related changes.
feldstj May 6, 2022
0337f7f
LOOKDEVX-642 | Merged attribute handle classes.
feldstj May 11, 2022
e6fb201
Merge branch 'dev' into feldstj/unauthored_attrs
feldstj May 11, 2022
cb23500
LOOKDEVX-642 | Unauthored attribute changes.
feldstj May 17, 2022
42a95ea
LOOKDEVX-642 | Some minor cleanup.
feldstj May 17, 2022
ff2994e
LOOKDEVX-642 | Some more code cleanup.
feldstj May 18, 2022
b787491
LOOKDEVX-642 | Axed the AttrHandle class and moved the relevent members
feldstj May 20, 2022
b5d0a3f
LOOKDEVX-642 | Applied code review feedback.
feldstj May 27, 2022
452125f
LOOKDEVX-642 | Merge branch 'dev' into unauthored_attrs_changes
feldstj May 31, 2022
ace6d19
LOOKDEVX-642 | Applied code review feedback and fixed some tests.
feldstj Jun 1, 2022
d6754e9
LOOKDEVX-642 | Applied code review feedback.
feldstj Jun 9, 2022
99f545f
LOOKDEVX-642 | Applied code review feedback.
feldstj Jun 9, 2022
f21a718
Merge branch 'dev' into unauthored_attrs_changes
feldstj Jun 13, 2022
d8c3833
LOOKDEVX-642 | Attempt to fix preflight.
feldstj Jun 13, 2022
2207c28
LOOKDEVX-642 | Second attempt at fixing preflight.
feldstj Jun 13, 2022
89d6159
LOOKDEVX-642 | Third attempt at fixing preflight.
feldstj Jun 14, 2022
0ad7dd2
LOOKDEVX-642 | Forth attempt at fixing preflight.
feldstj Jun 14, 2022
3c42920
LOOKDEVX-642 | Applied code review feedback.
feldstj Jun 15, 2022
1297807
Fix macOS build
hodoulp Jun 14, 2022
ae7a0f3
LOOKDEVX-642 | Clang-format fix.
feldstj Jun 15, 2022
5bb12a8
LOOKDEVX-642 | Fifth attempt at fixing preflight.
feldstj Jun 15, 2022
ba0000c
LOOKDEVX-642 | Minor cleanup.
feldstj Jun 15, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 23 additions & 19 deletions lib/mayaUsd/ufe/UsdAttribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,11 +400,11 @@ std::string UsdAttribute::defaultValue() const

bool UsdAttribute::get(PXR_NS::VtValue& value, PXR_NS::UsdTimeCode time) const
{
if (isAuthored()
#ifdef UFE_V4_FEATURES_AVAILABLE
|| !fAttrDef
if (isAuthored() || !fAttrDef) {
#else
if (isValid()) {
#endif
) {
return fUsdAttr.Get(&value, time);
} else {
#ifdef UFE_V4_FEATURES_AVAILABLE
Expand Down Expand Up @@ -432,15 +432,17 @@ bool UsdAttribute::set(const PXR_NS::VtValue& value, PXR_NS::UsdTimeCode time)
if (fAttrDef && fPrim) {
UsdShadeShader shader(fPrim);
if (fAttrDef->ioType() == Ufe::AttributeDef::OUTPUT_ATTR) {
fUsdAttr = shader
.CreateOutput(PXR_NS::TfToken(
fAttrDef->name(), ufeTypeToUsd(fAttrDef->type())))
.GetAttr();
fUsdAttr
= shader
.CreateOutput(
PXR_NS::TfToken(fAttrDef->name()), ufeTypeToUsd(fAttrDef->type()))
.GetAttr();
} else {
fUsdAttr = shader
.CreateInput(PXR_NS::TfToken(
fAttrDef->name(), ufeTypeToUsd(fAttrDef->type())))
.GetAttr();
fUsdAttr
= shader
.CreateInput(
PXR_NS::TfToken(fAttrDef->name()), ufeTypeToUsd(fAttrDef->type()))
.GetAttr();
}
} else {
#endif
Expand Down Expand Up @@ -549,15 +551,17 @@ bool UsdAttribute::setMetadata(const std::string& key, const Ufe::Value& value)
if (fAttrDef && fPrim) {
UsdShadeShader shader(fPrim);
if (fAttrDef->ioType() == Ufe::AttributeDef::OUTPUT_ATTR) {
fUsdAttr = shader
.CreateOutput(PXR_NS::TfToken(
fAttrDef->name(), ufeTypeToUsd(fAttrDef->type())))
.GetAttr();
fUsdAttr
= shader
.CreateOutput(
PXR_NS::TfToken(fAttrDef->name()), ufeTypeToUsd(fAttrDef->type()))
.GetAttr();
} else {
fUsdAttr = shader
.CreateInput(PXR_NS::TfToken(
fAttrDef->name(), ufeTypeToUsd(fAttrDef->type())))
.GetAttr();
fUsdAttr
= shader
.CreateInput(
PXR_NS::TfToken(fAttrDef->name()), ufeTypeToUsd(fAttrDef->type()))
.GetAttr();
}
const PXR_NS::TfToken attrName(PXR_NS::UsdShadeUtils::GetFullName(
PXR_NS::TfToken(fAttrDef->name()),
Expand Down
1 change: 1 addition & 0 deletions test/lib/ufe/testAttribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ def testAttributeEnumString(self):
# Use our engine method to run the bulk of the test (all the stuff from
# the Attribute base class). We use the visibility attribute which is
# an EnumString type.
import pdb ; pdb.set_trace()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Debugging code, please remove.

ufeAttr, usdAttr = self.runTestAttribute(
path='/Room_set/Props/Ball_35',
attrName=UsdGeom.Tokens.visibility,
Expand Down