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-125835 - Temporarily disable support for display layers in EditAsMaya workflows to avoid the crash #2667

Merged
merged 1 commit into from
Oct 20, 2022
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
16 changes: 12 additions & 4 deletions lib/mayaUsd/ufe/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,9 @@ void ReplicateExtrasFromUSD::initRecursive(Ufe::SceneItem::Ptr ufeItem) const
initRecursive(child);
}

#ifdef MAYA_HAS_DISPLAY_LAYER_API
// temporarily disable the feature to avoid the crash described in MAYA-125835
#if false
//#ifdef MAYA_HAS_DISPLAY_LAYER_API
// Prepare _displayLayerMap
MFnDisplayLayerManager displayLayerManager(
MFnDisplayLayerManager::currentDisplayLayerManager());
Expand All @@ -930,7 +932,9 @@ void ReplicateExtrasFromUSD::initRecursive(Ufe::SceneItem::Ptr ufeItem) const

void ReplicateExtrasFromUSD::processItem(const Ufe::Path& path, const MObject& mayaObject) const
{
#ifdef MAYA_HAS_DISPLAY_LAYER_API
// temporarily disable the feature to avoid the crash described in MAYA-125835
#if false
//#ifdef MAYA_HAS_DISPLAY_LAYER_API
// Replicate display layer membership
auto it = _displayLayerMap.find(path);
if (it != _displayLayerMap.end() && it->second.hasFn(MFn::kDisplayLayer)) {
Expand All @@ -950,7 +954,9 @@ void ReplicateExtrasFromUSD::processItem(const Ufe::Path& path, const MObject& m

void ReplicateExtrasToUSD::processItem(const MDagPath& dagPath, const SdfPath& usdPath) const
{
#ifdef MAYA_HAS_DISPLAY_LAYER_API
// temporarily disable the feature to avoid the crash described in MAYA-125835
#if false
//#ifdef MAYA_HAS_DISPLAY_LAYER_API
// Populate display layer membership map

// Since multiple dag paths may lead to a single USD path (like transform and node),
Expand All @@ -972,7 +978,9 @@ void ReplicateExtrasToUSD::processItem(const MDagPath& dagPath, const SdfPath& u

void ReplicateExtrasToUSD::finalize(const Ufe::Path& stagePath, const std::string* renameRoot) const
{
#ifdef MAYA_HAS_DISPLAY_LAYER_API
// temporarily disable the feature to avoid the crash described in MAYA-125835
#if false
//#ifdef MAYA_HAS_DISPLAY_LAYER_API
// Replicate display layer membership
for (const auto& entry : _primToLayerMap) {
if (entry.second.hasFn(MFn::kDisplayLayer)) {
Expand Down
1 change: 1 addition & 0 deletions test/lib/ufe/testDisplayLayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ def testDisplayLayerClear(self):
self.assertFalse(layer1.contains(self.CUBE1))
self.assertFalse(layer1.contains(self.INVALID_PRIM))

@unittest.skip("The feature was temporarily disabled so disable the autotest too")
def testDisplayLayerEditAsMaya(self):
'''Display layer membership in Edit As Maya workflow.'''

Expand Down