From fee4fd7289b9a2ff9fb9aae90b1fb60ca6042267 Mon Sep 17 00:00:00 2001 From: Andrew Kaufman Date: Mon, 30 Mar 2015 10:42:12 -0700 Subject: [PATCH] SceneShapeUI::select returns false when polygons aren't being displayed in the viewport. Apparently selectInfo.selectable() still returns true when meshes are not displayed by the M3dView, so we are also testing the objectDisplay status. This was last confirmed in Maya 2014, and is presumably a Maya bug. --- src/IECoreMaya/SceneShapeUI.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/IECoreMaya/SceneShapeUI.cpp b/src/IECoreMaya/SceneShapeUI.cpp index 24d716ac28..ed6653b981 100644 --- a/src/IECoreMaya/SceneShapeUI.cpp +++ b/src/IECoreMaya/SceneShapeUI.cpp @@ -1,6 +1,6 @@ ////////////////////////////////////////////////////////////////////////// // -// Copyright (c) 2007-2013, Image Engine Design Inc. All rights reserved. +// Copyright (c) 2007-2015, Image Engine Design Inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -559,7 +559,10 @@ bool SceneShapeUI::select( MSelectInfo &selectInfo, MSelectionList &selectionLis if( selectInfo.displayStatus() != M3dView::kHilite ) { MSelectionMask meshMask( MSelectionMask::kSelectMeshes ); - if( !selectInfo.selectable( meshMask ) ) + // Apparently selectInfo.selectable() still returns true when meshes are not + // displayed by the M3dView, so we are also testing the objectDisplay status. + // This was last confirmed in Maya 2014, and is presumably a Maya bug. + if( !selectInfo.selectable( meshMask ) || !selectInfo.objectDisplayStatus( M3dView::kDisplayMeshes ) ) { return false; }