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

Work around gcc 6.3.1 bug, and re-enable test. #1060

Merged
merged 1 commit into from
Jan 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 7 additions & 1 deletion lib/mayaUsd/ufe/UsdTransform3dMayaXformStack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ Ufe::SetVector3dUndoableCommand::Ptr UsdTransform3dMayaXformStack::setVector3dCm
const TfToken& opSuffix)
{
auto attr = prim().GetAttribute(attrName);
auto setXformOpOrderFn = getXformOpOrderFn();
OpFunc f = attr
? OpFunc([attrName](const BaseUndoableCommand& cmd) {
auto usdSceneItem = std::dynamic_pointer_cast<UsdSceneItem>(cmd.sceneItem());
Expand All @@ -577,7 +578,12 @@ Ufe::SetVector3dUndoableCommand::Ptr UsdTransform3dMayaXformStack::setVector3dCm
return UsdGeomXformOp(attr);
})
: OpFunc(
[opSuffix, setXformOpOrderFn = getXformOpOrderFn(), v](const BaseUndoableCommand& cmd) {
// MAYA-108612: generalized lambda capture below is incorrect with
// gcc 6.3.1 on Linux. Call to getXformOpOrderFn() is non-virtual;
// work around by calling in function body. PPT, 11-Jan-2021.
// [opSuffix, setXformOpOrderFn = getXformOpOrderFn(), v](const BaseUndoableCommand&
// cmd) {
[opSuffix, setXformOpOrderFn, v](const BaseUndoableCommand& cmd) {
InTransform3dChange guard(cmd.path());
auto usdSceneItem = std::dynamic_pointer_cast<UsdSceneItem>(cmd.sceneItem());
TF_AXIOM(usdSceneItem);
Expand Down
6 changes: 2 additions & 4 deletions test/lib/ufe/testComboCmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

import unittest
import os
import platform

from functools import partial

Expand Down Expand Up @@ -615,9 +614,8 @@ def testFallbackCases(self):

# Name test such that it runs last. Otherwise, it runs before
# testRotateScalePivotCompensation(), and causes it to fail. To be
# investigated --- MAYA-108067. Fails on Linux, both Python 2 and 3
# --- MAYA-108612.
@unittest.skipIf(mayaUtils.previewReleaseVersion() < 121 or platform.system() == 'Linux', 'Fallback transform op handling only available in Maya Preview Release 121 or later.')
# investigated --- MAYA-108067.
@unittest.skipIf(mayaUtils.previewReleaseVersion() < 121, 'Fallback transform op handling only available in Maya Preview Release 121 or later.')
def testZFallback(self):
'''Transformable not handled by standard Transform3d handlers must be
handled by fallback handler.'''
Expand Down