mirror of
https://github.com/mcneel/opennurbs.git
synced 2026-03-25 11:51:08 +08:00
Sync changes from upstream repository
Co-authored-by: Andrew Le Bihan <andy@mcneel.com> Co-authored-by: Dale Fugier <dale@mcneel.com> Co-authored-by: Dale Lear <dalelear@mcneel.com> Co-authored-by: David Eränen <deranen@gmail.com> Co-authored-by: Greg Arden <greg@mcneel.com> Co-authored-by: Jussi Aaltonen <jussi@mcneel.com> Co-authored-by: Lowell <lowell@mcneel.com> Co-authored-by: Mikko Oksanen <mikko@mcneel.com> Co-authored-by: Pierre Cuvilliers <pierre@mcneel.com> Co-authored-by: Steve Baer <steve@mcneel.com> Co-authored-by: chuck <chuck@mcneel.com> Co-authored-by: piac <giulio@mcneel.com> Co-authored-by: wfcook <wfcook@mcneel.com>
This commit is contained in:
@@ -375,6 +375,16 @@ bool ON_Layer::Read(
|
||||
if ( rc ) rc = file.ReadInt( &obsolete_value1 );
|
||||
if ( rc ) rc = file.ReadColor( m_color );
|
||||
|
||||
// 25 Aug 2021 S. Baer (RH-65410)
|
||||
// Pre-V7 files ignored alpha on layer colors and in some cases
|
||||
// alpha was being set to completely transparent. In this case,
|
||||
// make the color opaque. Even V7 files with completely transparent
|
||||
// color is strange, but it can be intentionally set for some reason
|
||||
if (rc && m_color.Alpha() == 255 && m_color != ON_Color::UnsetColor && file.Archive3dmVersion() < 70)
|
||||
{
|
||||
m_color.SetAlpha(0);
|
||||
}
|
||||
|
||||
{
|
||||
// OBSOLETE line style was never used - read and discard the next 20 bytes
|
||||
short s;
|
||||
|
||||
Reference in New Issue
Block a user