Better names for 3D material properties rendering modes.
(Also restores the legacy behaviour of ignoring transparency in diffuse mode.) Fixes https://gitlab.com/kicad/code/kicad/issues/8437
This commit is contained in:
parent
a64ac820db
commit
5d9c1dd75a
|
@ -431,10 +431,14 @@ void MODEL_3D::Draw( bool aTransparent, float aOpacity, bool aUseSelectedMateria
|
|||
glTexEnvfv( GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, (const float*)¶m.x );
|
||||
|
||||
// BeginDrawMulti();
|
||||
for( auto& mat : m_materials )
|
||||
for( const MODEL_3D::MATERIAL& mat : m_materials )
|
||||
{
|
||||
if( ( mat.IsTransparent() != aTransparent ) && ( aOpacity >= 1.0f ) )
|
||||
if( ( mat.IsTransparent() != aTransparent )
|
||||
&& ( aOpacity >= 1.0f )
|
||||
&& m_materialMode != MATERIAL_MODE::DIFFUSE_ONLY )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
switch( m_materialMode )
|
||||
{
|
||||
|
|
|
@ -98,7 +98,7 @@ PANEL_3D_DISPLAY_OPTIONS_BASE::PANEL_3D_DISPLAY_OPTIONS_BASE( wxWindow* parent,
|
|||
m_materialPropertiesLabel->Wrap( -1 );
|
||||
bSizerMaterials->Add( m_materialPropertiesLabel, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
wxString m_materialPropertiesChoices[] = { _("Use all properties"), _("Diffuse properties only"), _("CAD color style") };
|
||||
wxString m_materialPropertiesChoices[] = { _("Realistic"), _("Solid colors"), _("CAD colors") };
|
||||
int m_materialPropertiesNChoices = sizeof( m_materialPropertiesChoices ) / sizeof( wxString );
|
||||
m_materialProperties = new wxChoice( sbRenderOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_materialPropertiesNChoices, m_materialPropertiesChoices, 0 );
|
||||
m_materialProperties->SetSelection( 0 );
|
||||
|
|
|
@ -1177,7 +1177,7 @@
|
|||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="choices">"Use all properties" "Diffuse properties only" "CAD color style"</property>
|
||||
<property name="choices">"Realistic" "Solid colors" "CAD colors"</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
|
|
|
@ -184,19 +184,22 @@ TOOL_ACTION EDA_3D_ACTIONS::show1mmGrid( "3DViewer.Control.show1mmGrid",
|
|||
TOOL_ACTION EDA_3D_ACTIONS::materialNormal( "3DViewer.Control.materialNormal",
|
||||
AS_ACTIVE,
|
||||
0, "",
|
||||
_( "Use All Properties" ), _( "Use all material properties from each 3D model file" ),
|
||||
_( "Render Realistic Materials" ),
|
||||
_( "Use all material properties from each 3D model file" ),
|
||||
BITMAPS::INVALID_BITMAP, AF_NONE, (void*) MATERIAL_MODE::NORMAL );
|
||||
|
||||
TOOL_ACTION EDA_3D_ACTIONS::materialDiffuse( "3DViewer.Control.materialDiffuse",
|
||||
AS_ACTIVE,
|
||||
0, "",
|
||||
_( "Use Diffuse Only" ), _( "Use only the diffuse color property from model 3D model file" ),
|
||||
_( "Render Solid Colors" ),
|
||||
_( "Use only the diffuse color property from model 3D model file" ),
|
||||
BITMAPS::INVALID_BITMAP, AF_NONE, (void*) MATERIAL_MODE::DIFFUSE_ONLY );
|
||||
|
||||
TOOL_ACTION EDA_3D_ACTIONS::materialCAD( "3DViewer.Control.materialCAD",
|
||||
AS_ACTIVE,
|
||||
0, "",
|
||||
_( "CAD Color Style" ),_( "Use a CAD color style based on the diffuse color of the material" ),
|
||||
_( "Render CAD Colors" ),
|
||||
_( "Use a CAD color style based on the diffuse color of the material" ),
|
||||
BITMAPS::INVALID_BITMAP, AF_NONE, (void*) MATERIAL_MODE::CAD_MODE );
|
||||
|
||||
TOOL_ACTION EDA_3D_ACTIONS::rotate45axisZ( "3DViewer.Control.rotate45axisZ",
|
||||
|
@ -207,7 +210,7 @@ TOOL_ACTION EDA_3D_ACTIONS::rotate45axisZ( "3DViewer.Control.rotate45axisZ",
|
|||
TOOL_ACTION EDA_3D_ACTIONS::attributesTHT( "3DViewer.Control.attributesTHT",
|
||||
AS_ACTIVE,
|
||||
'T', "",
|
||||
_( "Toggle Through Hole 3D models" ), _( "Toggle 3D models with 'Through hole' attribute" ),
|
||||
_( "Toggle Through Hole 3D models" ), _( "Toggle 3D models with 'Through hole' attribute" ),
|
||||
BITMAPS::INVALID_BITMAP, AF_NONE, (void*) FL_FP_ATTRIBUTES_NORMAL );
|
||||
|
||||
TOOL_ACTION EDA_3D_ACTIONS::attributesSMD( "3DViewer.Control.attributesSMD",
|
||||
|
|
Loading…
Reference in New Issue