Pull 3D preferences into KiCad preferences architecture.
Fixes https://gitlab.com/kicad/code/kicad/issues/5187
This commit is contained in:
parent
5492fafdf4
commit
44086ff2b2
|
@ -104,92 +104,20 @@ void EDA_3D_VIEWER::CreateMenuBar()
|
|||
//
|
||||
ACTION_MENU* prefsMenu = new ACTION_MENU( false, tool );
|
||||
|
||||
prefsMenu->Add( _( "Display Options" ), "",
|
||||
ID_TOOL_SET_VISIBLE_ITEMS,
|
||||
BITMAPS::config );
|
||||
|
||||
prefsMenu->Add( _( "Raytracing" ), "",
|
||||
ID_RENDER_CURRENT_VIEW,
|
||||
BITMAPS::tools,
|
||||
ACTION_MENU::CHECK );
|
||||
|
||||
// Render options submenu
|
||||
ACTION_MENU* optsSubmenu = new ACTION_MENU( false, tool );
|
||||
optsSubmenu->SetTitle( _( "Render Options" ) );
|
||||
optsSubmenu->SetIcon( BITMAPS::options_3drender );
|
||||
prefsMenu->Add( _( "Preferences..." ) + "\tCtrl+,",
|
||||
_( "Show preferences for all open tools" ),
|
||||
wxID_PREFERENCES,
|
||||
BITMAPS::preference );
|
||||
|
||||
// Material properties submenu
|
||||
ACTION_MENU* propsSubmenu = new ACTION_MENU( false, tool );
|
||||
propsSubmenu->SetTitle( _( "Material Properties" ) );
|
||||
|
||||
propsSubmenu->Add( EDA_3D_ACTIONS::materialNormal, ACTION_MENU::CHECK );
|
||||
propsSubmenu->Add( EDA_3D_ACTIONS::materialDiffuse, ACTION_MENU::CHECK );
|
||||
propsSubmenu->Add( EDA_3D_ACTIONS::materialCAD, ACTION_MENU::CHECK );
|
||||
|
||||
optsSubmenu->Add( propsSubmenu );
|
||||
|
||||
optsSubmenu->Add( EDA_3D_ACTIONS::showBoundingBoxes, ACTION_MENU::CHECK );
|
||||
|
||||
// Raytracing submenu
|
||||
ACTION_MENU* raySubmenu = new ACTION_MENU( false, tool );
|
||||
raySubmenu->SetTitle( _( "Raytracing Options" ) );
|
||||
|
||||
raySubmenu->Add( EDA_3D_ACTIONS::renderShadows, ACTION_MENU::CHECK );
|
||||
raySubmenu->Add( EDA_3D_ACTIONS::proceduralTextures, ACTION_MENU::CHECK );
|
||||
raySubmenu->Add( EDA_3D_ACTIONS::addFloor, ACTION_MENU::CHECK );
|
||||
raySubmenu->Add( EDA_3D_ACTIONS::showRefractions, ACTION_MENU::CHECK );
|
||||
raySubmenu->Add( EDA_3D_ACTIONS::showReflections, ACTION_MENU::CHECK );
|
||||
raySubmenu->Add( EDA_3D_ACTIONS::antiAliasing, ACTION_MENU::CHECK );
|
||||
raySubmenu->Add( EDA_3D_ACTIONS::postProcessing, ACTION_MENU::CHECK );
|
||||
|
||||
optsSubmenu->Add( raySubmenu );
|
||||
prefsMenu->Add( optsSubmenu );
|
||||
prefsMenu->Add( _( "Reset to Default Settings" ), ID_MENU3D_RESET_DEFAULTS, BITMAPS::tools );
|
||||
|
||||
prefsMenu->AppendSeparator();
|
||||
|
||||
// Color submenu
|
||||
ACTION_MENU* colorSubmenu = new ACTION_MENU( false, tool );
|
||||
colorSubmenu->SetTitle( _( "Choose Colors" ) );
|
||||
colorSubmenu->SetIcon( BITMAPS::color_materials );
|
||||
|
||||
colorSubmenu->Add( _( "Background Top Color..." ),
|
||||
ID_MENU3D_BGCOLOR_TOP,
|
||||
BITMAPS::INVALID_BITMAP );
|
||||
|
||||
colorSubmenu->Add( _( "Background Bottom Color..." ),
|
||||
ID_MENU3D_BGCOLOR_BOTTOM,
|
||||
BITMAPS::INVALID_BITMAP );
|
||||
|
||||
colorSubmenu->Add( _( "Silkscreen Color..." ),
|
||||
ID_MENU3D_SILKSCREEN_COLOR,
|
||||
BITMAPS::INVALID_BITMAP );
|
||||
|
||||
colorSubmenu->Add( _( "Solder Mask Color..." ),
|
||||
ID_MENU3D_SOLDERMASK_COLOR,
|
||||
BITMAPS::INVALID_BITMAP );
|
||||
|
||||
colorSubmenu->Add( _( "Solder Paste Color..." ),
|
||||
ID_MENU3D_SOLDERPASTE_COLOR,
|
||||
BITMAPS::INVALID_BITMAP );
|
||||
|
||||
colorSubmenu->Add( _( "Copper/Surface Finish Color..." ),
|
||||
ID_MENU3D_COPPER_COLOR,
|
||||
BITMAPS::INVALID_BITMAP );
|
||||
|
||||
colorSubmenu->Add( _( "Board Body Color..." ),
|
||||
ID_MENU3D_PCB_BODY_COLOR,
|
||||
BITMAPS::INVALID_BITMAP );
|
||||
|
||||
// Only allow the stackup to be used in the PCB editor, since it isn't editable in the other frames
|
||||
if( Parent()->IsType( FRAME_PCB_EDITOR ) )
|
||||
{
|
||||
colorSubmenu->Add( _( "Get colors from physical stackup" ),
|
||||
ID_MENU3D_STACKUP_COLORS,
|
||||
BITMAPS::INVALID_BITMAP );
|
||||
}
|
||||
|
||||
prefsMenu->Add( colorSubmenu );
|
||||
|
||||
prefsMenu->Add( EDA_3D_ACTIONS::showAxis, ACTION_MENU::CHECK );
|
||||
|
||||
// Grid submenu
|
||||
|
@ -205,16 +133,6 @@ void EDA_3D_VIEWER::CreateMenuBar()
|
|||
|
||||
prefsMenu->Add( gridSubmenu );
|
||||
|
||||
prefsMenu->AppendSeparator();
|
||||
prefsMenu->Add( _( "Reset to Default Settings" ), ID_MENU3D_RESET_DEFAULTS, BITMAPS::tools );
|
||||
|
||||
#ifdef __APPLE__ // Note: will get moved to Apple menu by wxWidgets
|
||||
prefsMenu->Add( _( "Preferences..." ) + "\tCtrl+,",
|
||||
_( "Show preferences for all open tools" ),
|
||||
wxID_PREFERENCES,
|
||||
BITMAPS::preference );
|
||||
#endif
|
||||
|
||||
//-- Menubar -------------------------------------------------------------
|
||||
//
|
||||
menuBar->Append( fileMenu, _( "&File" ) );
|
||||
|
|
|
@ -59,11 +59,6 @@ void EDA_3D_VIEWER::ReCreateMainToolbar()
|
|||
KiScaledBitmap( BITMAPS::copy, this ),
|
||||
_( "Copy 3D image to clipboard" ) );
|
||||
|
||||
m_mainToolBar->AddScaledSeparator( this );
|
||||
m_mainToolBar->AddTool( ID_TOOL_SET_VISIBLE_ITEMS, wxEmptyString,
|
||||
KiScaledBitmap( BITMAPS::config, this ),
|
||||
_( "Set display options, and some layers visibility" ) );
|
||||
|
||||
m_mainToolBar->AddScaledSeparator( this );
|
||||
m_mainToolBar->AddTool( ID_RENDER_CURRENT_VIEW, wxEmptyString,
|
||||
KiScaledBitmap( BITMAPS::render_mode, this ),
|
||||
|
|
|
@ -1,627 +0,0 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "dialog_3D_view_option_base.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DIALOG_3D_VIEW_OPTIONS_BASE::DIALOG_3D_VIEW_OPTIONS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
||||
{
|
||||
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
||||
|
||||
wxBoxSizer* bSizerMain;
|
||||
bSizerMain = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_panelDspOpt = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizerDisplayOptions;
|
||||
bSizerDisplayOptions = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
wxBoxSizer* bSizeLeft;
|
||||
bSizeLeft = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxStaticBoxSizer* sbModelVisibility;
|
||||
sbModelVisibility = new wxStaticBoxSizer( new wxStaticBox( m_panelDspOpt, wxID_ANY, _("3D Model Visibility") ), wxVERTICAL );
|
||||
|
||||
m_checkBox3DshapesTH = new wxCheckBox( sbModelVisibility->GetStaticBox(), wxID_ANY, _("Show 3D through hole models"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbModelVisibility->Add( m_checkBox3DshapesTH, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_checkBox3DshapesSMD = new wxCheckBox( sbModelVisibility->GetStaticBox(), wxID_ANY, _("Show 3D SMD models"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbModelVisibility->Add( m_checkBox3DshapesSMD, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_checkBox3DshapesVirtual = new wxCheckBox( sbModelVisibility->GetStaticBox(), wxID_ANY, _("Show 3D virtual models"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbModelVisibility->Add( m_checkBox3DshapesVirtual, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
bSizeLeft->Add( sbModelVisibility, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbBoardLayers;
|
||||
sbBoardLayers = new wxStaticBoxSizer( new wxStaticBox( m_panelDspOpt, wxID_ANY, _("Board Layers") ), wxVERTICAL );
|
||||
|
||||
m_checkBoxSilkscreen = new wxCheckBox( sbBoardLayers->GetStaticBox(), wxID_ANY, _("Show silkscreen layers"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbBoardLayers->Add( m_checkBoxSilkscreen, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_checkBoxSolderMask = new wxCheckBox( sbBoardLayers->GetStaticBox(), wxID_ANY, _("Show solder mask layers"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbBoardLayers->Add( m_checkBoxSolderMask, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_checkBoxSolderpaste = new wxCheckBox( sbBoardLayers->GetStaticBox(), wxID_ANY, _("Show solder paste layers"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbBoardLayers->Add( m_checkBoxSolderpaste, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_checkBoxAdhesive = new wxCheckBox( sbBoardLayers->GetStaticBox(), wxID_ANY, _("Show adhesive layers"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbBoardLayers->Add( m_checkBoxAdhesive, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
bSizeLeft->Add( sbBoardLayers, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbUserLayers;
|
||||
sbUserLayers = new wxStaticBoxSizer( new wxStaticBox( m_panelDspOpt, wxID_ANY, _("User Layers (not shown in realistic mode)") ), wxVERTICAL );
|
||||
|
||||
m_checkBoxComments = new wxCheckBox( sbUserLayers->GetStaticBox(), wxID_ANY, _("Show comments and drawings layers"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbUserLayers->Add( m_checkBoxComments, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_checkBoxECO = new wxCheckBox( sbUserLayers->GetStaticBox(), wxID_ANY, _("Show ECO layers"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbUserLayers->Add( m_checkBoxECO, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
bSizeLeft->Add( sbUserLayers, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerDisplayOptions->Add( bSizeLeft, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxBoxSizer* bSizerRight;
|
||||
bSizerRight = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxStaticBoxSizer* sbRenderOptions;
|
||||
sbRenderOptions = new wxStaticBoxSizer( new wxStaticBox( m_panelDspOpt, wxID_ANY, _("Render Options") ), wxVERTICAL );
|
||||
|
||||
m_checkBoxRealisticMode = new wxCheckBox( sbRenderOptions->GetStaticBox(), wxID_ANY, _("Realistic mode"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbRenderOptions->Add( m_checkBoxRealisticMode, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_checkBoxBoardBody = new wxCheckBox( sbRenderOptions->GetStaticBox(), wxID_ANY, _("Show board body"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbRenderOptions->Add( m_checkBoxBoardBody, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_checkBoxAreas = new wxCheckBox( sbRenderOptions->GetStaticBox(), wxID_ANY, _("Show filled areas in zones"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbRenderOptions->Add( m_checkBoxAreas, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_checkBoxSubtractMaskFromSilk = new wxCheckBox( sbRenderOptions->GetStaticBox(), wxID_ANY, _("Subtract soldermask from silkscreen"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbRenderOptions->Add( m_checkBoxSubtractMaskFromSilk, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_checkBoxClipSilkOnViaAnnulus = new wxCheckBox( sbRenderOptions->GetStaticBox(), wxID_ANY, _("Clip silkscreen at via annulus"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbRenderOptions->Add( m_checkBoxClipSilkOnViaAnnulus, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_checkBoxRenderPlatedPadsAsPlated = new wxCheckBox( sbRenderOptions->GetStaticBox(), wxID_ANY, _("Use bare copper color for unplated copper"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkBoxRenderPlatedPadsAsPlated->SetToolTip( _("Use different colors for plated and unplated copper. (Slow)") );
|
||||
|
||||
sbRenderOptions->Add( m_checkBoxRenderPlatedPadsAsPlated, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
bSizerRight->Add( sbRenderOptions, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbCameraOptions;
|
||||
sbCameraOptions = new wxStaticBoxSizer( new wxStaticBox( m_panelDspOpt, wxID_ANY, _("Camera Options") ), wxVERTICAL );
|
||||
|
||||
wxBoxSizer* bSizerRotAngle;
|
||||
bSizerRotAngle = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_staticTextRotAngle = new wxStaticText( sbCameraOptions->GetStaticBox(), wxID_ANY, _("Rotation Increment:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextRotAngle->Wrap( -1 );
|
||||
bSizerRotAngle->Add( m_staticTextRotAngle, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_spinCtrlRotationAngle = new wxSpinCtrlDouble( sbCameraOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 359, 10, 1 );
|
||||
m_spinCtrlRotationAngle->SetDigits( 0 );
|
||||
bSizerRotAngle->Add( m_spinCtrlRotationAngle, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_staticTextRotAngleUnits = new wxStaticText( sbCameraOptions->GetStaticBox(), wxID_ANY, _("deg"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextRotAngleUnits->Wrap( -1 );
|
||||
bSizerRotAngle->Add( m_staticTextRotAngleUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
sbCameraOptions->Add( bSizerRotAngle, 0, wxEXPAND|wxBOTTOM, 5 );
|
||||
|
||||
m_staticline3 = new wxStaticLine( sbCameraOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
sbCameraOptions->Add( m_staticline3, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
|
||||
m_checkBoxEnableAnimation = new wxCheckBox( sbCameraOptions->GetStaticBox(), wxID_ANY, _("Enable animation"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkBoxEnableAnimation->SetValue(true);
|
||||
sbCameraOptions->Add( m_checkBoxEnableAnimation, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxBoxSizer* bSizerSlider;
|
||||
bSizerSlider = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_staticAnimationSpeed = new wxStaticText( sbCameraOptions->GetStaticBox(), wxID_ANY, _("Animation speed:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticAnimationSpeed->Wrap( -1 );
|
||||
bSizerSlider->Add( m_staticAnimationSpeed, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_sliderAnimationSpeed = new wxSlider( sbCameraOptions->GetStaticBox(), wxID_ANY, 3, 1, 5, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS );
|
||||
m_sliderAnimationSpeed->SetMinSize( wxSize( 100,-1 ) );
|
||||
|
||||
bSizerSlider->Add( m_sliderAnimationSpeed, 1, wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
sbCameraOptions->Add( bSizerSlider, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
|
||||
|
||||
bSizerRight->Add( sbCameraOptions, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerDisplayOptions->Add( bSizerRight, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_panelDspOpt->SetSizer( bSizerDisplayOptions );
|
||||
m_panelDspOpt->Layout();
|
||||
bSizerDisplayOptions->Fit( m_panelDspOpt );
|
||||
m_notebook->AddPage( m_panelDspOpt, _("Display Options"), true );
|
||||
m_panelOpenGL = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizerOpenGL;
|
||||
bSizerOpenGL = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxStaticBoxSizer* sbSizerOpenGLRenderoptions;
|
||||
sbSizerOpenGLRenderoptions = new wxStaticBoxSizer( new wxStaticBox( m_panelOpenGL, wxID_ANY, _("OpenGL Render Options") ), wxVERTICAL );
|
||||
|
||||
m_checkBoxBoundingBoxes = new wxCheckBox( sbSizerOpenGLRenderoptions->GetStaticBox(), wxID_ANY, _("Show model bounding boxes"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizerOpenGLRenderoptions->Add( m_checkBoxBoundingBoxes, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_checkBoxCuThickness = new wxCheckBox( sbSizerOpenGLRenderoptions->GetStaticBox(), wxID_ANY, _("Show copper thickness"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizerOpenGLRenderoptions->Add( m_checkBoxCuThickness, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_checkBoxHighlightOnRollOver = new wxCheckBox( sbSizerOpenGLRenderoptions->GetStaticBox(), wxID_ANY, _("Highlight items on rollover"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizerOpenGLRenderoptions->Add( m_checkBoxHighlightOnRollOver, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizerOpenGL->Add( sbSizerOpenGLRenderoptions, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbSizerOtherOptions;
|
||||
sbSizerOtherOptions = new wxStaticBoxSizer( new wxStaticBox( m_panelOpenGL, wxID_ANY, _("Other Options") ), wxVERTICAL );
|
||||
|
||||
wxFlexGridSizer* fgSizer7;
|
||||
fgSizer7 = new wxFlexGridSizer( 2, 2, 0, 0 );
|
||||
fgSizer7->SetFlexibleDirection( wxBOTH );
|
||||
fgSizer7->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
m_staticText221 = new wxStaticText( sbSizerOtherOptions->GetStaticBox(), wxID_ANY, _("Anti-aliasing:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText221->Wrap( -1 );
|
||||
fgSizer7->Add( m_staticText221, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
wxString m_choiceAntiAliasingChoices[] = { _("Disabled"), _("2x"), _("4x"), _("8x") };
|
||||
int m_choiceAntiAliasingNChoices = sizeof( m_choiceAntiAliasingChoices ) / sizeof( wxString );
|
||||
m_choiceAntiAliasing = new wxChoice( sbSizerOtherOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceAntiAliasingNChoices, m_choiceAntiAliasingChoices, 0 );
|
||||
m_choiceAntiAliasing->SetSelection( 0 );
|
||||
m_choiceAntiAliasing->SetToolTip( _("3D-Viewer must be closed and re-opened to apply this setting") );
|
||||
|
||||
fgSizer7->Add( m_choiceAntiAliasing, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_staticText231 = new wxStaticText( sbSizerOtherOptions->GetStaticBox(), wxID_ANY, _("Selection color:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText231->Wrap( -1 );
|
||||
fgSizer7->Add( m_staticText231, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_colourPickerSelection = new wxColourPickerCtrl( sbSizerOtherOptions->GetStaticBox(), wxID_ANY, *wxBLACK, wxDefaultPosition, wxDefaultSize, wxCLRP_DEFAULT_STYLE );
|
||||
fgSizer7->Add( m_colourPickerSelection, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
sbSizerOtherOptions->Add( fgSizer7, 1, wxEXPAND|wxRIGHT, 5 );
|
||||
|
||||
|
||||
bSizerOpenGL->Add( sbSizerOtherOptions, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbSizerWhileMoving;
|
||||
sbSizerWhileMoving = new wxStaticBoxSizer( new wxStaticBox( m_panelOpenGL, wxID_ANY, _("While Moving") ), wxVERTICAL );
|
||||
|
||||
m_checkBoxDisableAAMove = new wxCheckBox( sbSizerWhileMoving->GetStaticBox(), wxID_ANY, _("Disable anti-aliasing"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizerWhileMoving->Add( m_checkBoxDisableAAMove, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_checkBoxDisableMoveThickness = new wxCheckBox( sbSizerWhileMoving->GetStaticBox(), wxID_ANY, _("Disable thickness"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizerWhileMoving->Add( m_checkBoxDisableMoveThickness, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_checkBoxDisableMoveVias = new wxCheckBox( sbSizerWhileMoving->GetStaticBox(), wxID_ANY, _("Disable vias"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizerWhileMoving->Add( m_checkBoxDisableMoveVias, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_checkBoxDisableMoveHoles = new wxCheckBox( sbSizerWhileMoving->GetStaticBox(), wxID_ANY, _("Disable holes"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizerWhileMoving->Add( m_checkBoxDisableMoveHoles, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizerOpenGL->Add( sbSizerWhileMoving, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_panelOpenGL->SetSizer( bSizerOpenGL );
|
||||
m_panelOpenGL->Layout();
|
||||
bSizerOpenGL->Fit( m_panelOpenGL );
|
||||
m_notebook->AddPage( m_panelOpenGL, _("OpenGL"), false );
|
||||
m_panelRaytracing = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizer14;
|
||||
bSizer14 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_notebook2 = new wxNotebook( m_panelRaytracing, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_panelRaytracingCfg = new wxPanel( m_notebook2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizerRaytracing;
|
||||
bSizerRaytracing = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxStaticBoxSizer* sbSizerRaytracingRenderOptions;
|
||||
sbSizerRaytracingRenderOptions = new wxStaticBoxSizer( new wxStaticBox( m_panelRaytracingCfg, wxID_ANY, _("Raytracing Render Options") ), wxVERTICAL );
|
||||
|
||||
sbSizerRaytracingRenderOptions->SetMinSize( wxSize( -1,32 ) );
|
||||
wxBoxSizer* bSizer16;
|
||||
bSizer16 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_checkBoxRaytracing_proceduralTextures = new wxCheckBox( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, _("Procedural textures"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkBoxRaytracing_proceduralTextures->SetValue(true);
|
||||
bSizer16->Add( m_checkBoxRaytracing_proceduralTextures, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_checkBoxRaytracing_addFloor = new wxCheckBox( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, _("Add floor"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkBoxRaytracing_addFloor->SetValue(true);
|
||||
bSizer16->Add( m_checkBoxRaytracing_addFloor, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_checkBoxRaytracing_antiAliasing = new wxCheckBox( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, _("Anti-aliasing"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkBoxRaytracing_antiAliasing->SetValue(true);
|
||||
bSizer16->Add( m_checkBoxRaytracing_antiAliasing, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_checkBoxRaytracing_postProcessing = new wxCheckBox( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, _("Post-processing"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkBoxRaytracing_postProcessing->SetValue(true);
|
||||
bSizer16->Add( m_checkBoxRaytracing_postProcessing, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
sbSizerRaytracingRenderOptions->Add( bSizer16, 0, wxEXPAND|wxBOTTOM, 5 );
|
||||
|
||||
wxFlexGridSizer* fgSizer111;
|
||||
fgSizer111 = new wxFlexGridSizer( 0, 4, 6, 8 );
|
||||
fgSizer111->SetFlexibleDirection( wxBOTH );
|
||||
fgSizer111->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
|
||||
fgSizer111->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
m_staticText19 = new wxStaticText( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, _("Number of Samples"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText19->Wrap( -1 );
|
||||
fgSizer111->Add( m_staticText19, 0, wxLEFT|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_staticText201 = new wxStaticText( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, _("Spread Factor %"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText201->Wrap( -1 );
|
||||
fgSizer111->Add( m_staticText201, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_staticText211 = new wxStaticText( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, _("Recursion Level"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText211->Wrap( -1 );
|
||||
fgSizer111->Add( m_staticText211, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_checkBoxRaytracing_renderShadows = new wxCheckBox( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, _("Shadows:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkBoxRaytracing_renderShadows->SetValue(true);
|
||||
fgSizer111->Add( m_checkBoxRaytracing_renderShadows, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_spinCtrl_NrSamples_Shadows = new wxSpinCtrl( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, 1, 64, 0 );
|
||||
m_spinCtrl_NrSamples_Shadows->SetToolTip( _("Number of rays that will be cast, into light direction, to evaluate a shadow point") );
|
||||
|
||||
fgSizer111->Add( m_spinCtrl_NrSamples_Shadows, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_spinCtrlDouble_SpreadFactor_Shadows = new wxSpinCtrlDouble( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, 0.1, 25, 0, 1 );
|
||||
m_spinCtrlDouble_SpreadFactor_Shadows->SetDigits( 1 );
|
||||
m_spinCtrlDouble_SpreadFactor_Shadows->SetToolTip( _("Random direction factor of the cast rays") );
|
||||
|
||||
fgSizer111->Add( m_spinCtrlDouble_SpreadFactor_Shadows, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
fgSizer111->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
m_checkBoxRaytracing_showReflections = new wxCheckBox( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, _("Reflections:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkBoxRaytracing_showReflections->SetValue(true);
|
||||
fgSizer111->Add( m_checkBoxRaytracing_showReflections, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_spinCtrl_NrSamples_Reflections = new wxSpinCtrl( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, 1, 32, 0 );
|
||||
m_spinCtrl_NrSamples_Reflections->SetToolTip( _("Number of rays that will be cast to evaluate a reflection point") );
|
||||
|
||||
fgSizer111->Add( m_spinCtrl_NrSamples_Reflections, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spinCtrlDouble_SpreadFactor_Reflections = new wxSpinCtrlDouble( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, 0.1, 25, 0, 1 );
|
||||
m_spinCtrlDouble_SpreadFactor_Reflections->SetDigits( 1 );
|
||||
m_spinCtrlDouble_SpreadFactor_Reflections->SetToolTip( _("Random direction factor of the cast rays") );
|
||||
|
||||
fgSizer111->Add( m_spinCtrlDouble_SpreadFactor_Reflections, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_spinCtrlRecursiveLevel_Reflections = new wxSpinCtrl( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, 1, 5, 0 );
|
||||
m_spinCtrlRecursiveLevel_Reflections->SetToolTip( _("Interactions number that a ray can travel through objects. (higher number of levels improve results, specially on very transparent boards)") );
|
||||
|
||||
fgSizer111->Add( m_spinCtrlRecursiveLevel_Reflections, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_checkBoxRaytracing_showRefractions = new wxCheckBox( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, _("Refractions:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkBoxRaytracing_showRefractions->SetValue(true);
|
||||
fgSizer111->Add( m_checkBoxRaytracing_showRefractions, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_spinCtrl_NrSamples_Refractions = new wxSpinCtrl( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, 1, 5, 0 );
|
||||
m_spinCtrl_NrSamples_Refractions->SetToolTip( _("Number of rays that will be cast to evaluate a refraction point") );
|
||||
|
||||
fgSizer111->Add( m_spinCtrl_NrSamples_Refractions, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_spinCtrlDouble_SpreadFactor_Refractions = new wxSpinCtrlDouble( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, 0.1, 25, 0, 1 );
|
||||
m_spinCtrlDouble_SpreadFactor_Refractions->SetDigits( 1 );
|
||||
m_spinCtrlDouble_SpreadFactor_Refractions->SetToolTip( _("Random direction factor of the cast rays") );
|
||||
|
||||
fgSizer111->Add( m_spinCtrlDouble_SpreadFactor_Refractions, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_spinCtrlRecursiveLevel_Refractions = new wxSpinCtrl( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, 1, 7, 0 );
|
||||
m_spinCtrlRecursiveLevel_Refractions->SetToolTip( _("Number of bounces that a ray can hit reflective objects") );
|
||||
|
||||
fgSizer111->Add( m_spinCtrlRecursiveLevel_Refractions, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
sbSizerRaytracingRenderOptions->Add( fgSizer111, 0, wxTOP|wxBOTTOM|wxRIGHT|wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerRaytracing->Add( sbSizerRaytracingRenderOptions, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_panelRaytracingCfg->SetSizer( bSizerRaytracing );
|
||||
m_panelRaytracingCfg->Layout();
|
||||
bSizerRaytracing->Fit( m_panelRaytracingCfg );
|
||||
m_notebook2->AddPage( m_panelRaytracingCfg, _("Render Options"), true );
|
||||
m_panelLightsConfig = new wxPanel( m_notebook2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizer17;
|
||||
bSizer17 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxStaticBoxSizer* sbSizerRaytracingLightConfiguration;
|
||||
sbSizerRaytracingLightConfiguration = new wxStaticBoxSizer( new wxStaticBox( m_panelLightsConfig, wxID_ANY, _("Lights Configuration") ), wxVERTICAL );
|
||||
|
||||
wxBoxSizer* bSizer11;
|
||||
bSizer11 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
|
||||
bSizer11->Add( 0, 0, 1, 0, 5 );
|
||||
|
||||
m_staticText17 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("Ambient camera light:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText17->Wrap( -1 );
|
||||
bSizer11->Add( m_staticText17, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_colourPickerCameraLight = new wxColourPickerCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxColour( 51, 51, 51 ), wxDefaultPosition, wxSize( 72,-1 ), wxCLRP_DEFAULT_STYLE );
|
||||
bSizer11->Add( m_colourPickerCameraLight, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
bSizer11->Add( 0, 0, 1, 0, 5 );
|
||||
|
||||
|
||||
sbSizerRaytracingLightConfiguration->Add( bSizer11, 0, wxBOTTOM|wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bSizer13;
|
||||
bSizer13 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
|
||||
bSizer13->Add( 0, 0, 1, 0, 5 );
|
||||
|
||||
m_staticText5 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("Top light:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText5->Wrap( -1 );
|
||||
bSizer13->Add( m_staticText5, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_colourPickerTopLight = new wxColourPickerCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxColour( 63, 63, 63 ), wxDefaultPosition, wxSize( 72,-1 ), wxCLRP_DEFAULT_STYLE );
|
||||
bSizer13->Add( m_colourPickerTopLight, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
bSizer13->Add( 0, 0, 1, 0, 5 );
|
||||
|
||||
m_staticText6 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("Bottom light:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText6->Wrap( -1 );
|
||||
bSizer13->Add( m_staticText6, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_colourPickerBottomLight = new wxColourPickerCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxColour( 63, 63, 63 ), wxDefaultPosition, wxSize( 72,-1 ), wxCLRP_DEFAULT_STYLE );
|
||||
bSizer13->Add( m_colourPickerBottomLight, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
bSizer13->Add( 0, 0, 1, 0, 5 );
|
||||
|
||||
|
||||
sbSizerRaytracingLightConfiguration->Add( bSizer13, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
|
||||
wxFlexGridSizer* fgSizer11;
|
||||
fgSizer11 = new wxFlexGridSizer( 0, 9, 0, 0 );
|
||||
fgSizer11->AddGrowableCol( 4 );
|
||||
fgSizer11->SetFlexibleDirection( wxHORIZONTAL );
|
||||
fgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
|
||||
fgSizer11->Add( 0, 0, 0, 0, 5 );
|
||||
|
||||
|
||||
fgSizer11->Add( 0, 0, 0, 0, 5 );
|
||||
|
||||
m_staticText20 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("Elevation (degrees)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText20->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticText20, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_staticText18 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("Azimuth (degrees)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText18->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticText18, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
fgSizer11->Add( 0, 0, 0, 0, 5 );
|
||||
|
||||
|
||||
fgSizer11->Add( 0, 0, 0, 0, 5 );
|
||||
|
||||
|
||||
fgSizer11->Add( 0, 0, 0, 0, 5 );
|
||||
|
||||
m_staticText27 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("Elevation (degrees)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText27->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticText27, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_staticText28 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("Azimuth (degrees)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText28->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticText28, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_staticText21 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("1:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText21->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticText21, 0, wxALIGN_CENTER|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_colourPickerLight1 = new wxColourPickerCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, *wxBLACK, wxDefaultPosition, wxSize( 72,-1 ), wxCLRP_DEFAULT_STYLE );
|
||||
fgSizer11->Add( m_colourPickerLight1, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spinCtrlLightElevation1 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, -90, 90, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightElevation1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
m_spinCtrlLightAzimuth1 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 359, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightAzimuth1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
|
||||
fgSizer11->Add( 10, 0, 0, 0, 5 );
|
||||
|
||||
m_staticText22 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("5:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText22->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticText22, 0, wxALIGN_CENTER|wxLEFT, 5 );
|
||||
|
||||
m_colourPickerLight5 = new wxColourPickerCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, *wxBLACK, wxDefaultPosition, wxSize( 72,-1 ), wxCLRP_DEFAULT_STYLE );
|
||||
fgSizer11->Add( m_colourPickerLight5, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spinCtrlLightElevation5 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, -90, 90, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightElevation5, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
m_spinCtrlLightAzimuth5 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 359, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightAzimuth5, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
m_staticText23 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("2:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText23->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticText23, 0, wxALIGN_CENTER, 5 );
|
||||
|
||||
m_colourPickerLight2 = new wxColourPickerCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, *wxBLACK, wxDefaultPosition, wxSize( 72,-1 ), wxCLRP_DEFAULT_STYLE );
|
||||
fgSizer11->Add( m_colourPickerLight2, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spinCtrlLightElevation2 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, -90, 90, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightElevation2, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
m_spinCtrlLightAzimuth2 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 359, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightAzimuth2, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
|
||||
fgSizer11->Add( 0, 0, 0, 0, 5 );
|
||||
|
||||
m_staticText24 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("6:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText24->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticText24, 0, wxALIGN_CENTER|wxLEFT, 5 );
|
||||
|
||||
m_colourPickerLight6 = new wxColourPickerCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, *wxBLACK, wxDefaultPosition, wxSize( 72,-1 ), wxCLRP_DEFAULT_STYLE );
|
||||
fgSizer11->Add( m_colourPickerLight6, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spinCtrlLightElevation6 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, -90, 90, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightElevation6, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
m_spinCtrlLightAzimuth6 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 359, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightAzimuth6, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
m_staticText25 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("3:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText25->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticText25, 0, wxALIGN_CENTER, 5 );
|
||||
|
||||
m_colourPickerLight3 = new wxColourPickerCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, *wxBLACK, wxDefaultPosition, wxSize( 72,-1 ), wxCLRP_DEFAULT_STYLE );
|
||||
fgSizer11->Add( m_colourPickerLight3, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spinCtrlLightElevation3 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, -90, 90, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightElevation3, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
m_spinCtrlLightAzimuth3 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 359, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightAzimuth3, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
|
||||
fgSizer11->Add( 0, 0, 0, 0, 5 );
|
||||
|
||||
m_staticText26 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("7:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText26->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticText26, 0, wxALIGN_CENTER|wxLEFT, 5 );
|
||||
|
||||
m_colourPickerLight7 = new wxColourPickerCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, *wxBLACK, wxDefaultPosition, wxSize( 72,-1 ), wxCLRP_DEFAULT_STYLE );
|
||||
fgSizer11->Add( m_colourPickerLight7, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spinCtrlLightElevation7 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, -90, 90, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightElevation7, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
m_spinCtrlLightAzimuth7 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 359, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightAzimuth7, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
m_staticText171 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("4:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText171->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticText171, 0, wxALIGN_CENTER, 5 );
|
||||
|
||||
m_colourPickerLight4 = new wxColourPickerCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, *wxBLACK, wxDefaultPosition, wxSize( 72,-1 ), wxCLRP_DEFAULT_STYLE );
|
||||
fgSizer11->Add( m_colourPickerLight4, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spinCtrlLightElevation4 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, -90, 90, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightElevation4, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
m_spinCtrlLightAzimuth4 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 359, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightAzimuth4, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
|
||||
fgSizer11->Add( 0, 0, 0, 0, 5 );
|
||||
|
||||
m_staticText181 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("8:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText181->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticText181, 0, wxALIGN_CENTER|wxLEFT, 5 );
|
||||
|
||||
m_colourPickerLight8 = new wxColourPickerCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, *wxBLACK, wxDefaultPosition, wxSize( 72,-1 ), wxCLRP_DEFAULT_STYLE );
|
||||
fgSizer11->Add( m_colourPickerLight8, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spinCtrlLightElevation8 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, -90, 90, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightElevation8, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
m_spinCtrlLightAzimuth8 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 359, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightAzimuth8, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
|
||||
sbSizerRaytracingLightConfiguration->Add( fgSizer11, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
wxBoxSizer* bSizer19;
|
||||
bSizer19 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
bSizer19->Add( 0, 0, 0, wxEXPAND, 5 );
|
||||
|
||||
m_buttonLightsResetToDefaults = new wxButton( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("Reset to defaults"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizer19->Add( m_buttonLightsResetToDefaults, 0, wxALL, 5 );
|
||||
|
||||
|
||||
sbSizerRaytracingLightConfiguration->Add( bSizer19, 0, wxALL, 5 );
|
||||
|
||||
|
||||
bSizer17->Add( sbSizerRaytracingLightConfiguration, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
|
||||
m_panelLightsConfig->SetSizer( bSizer17 );
|
||||
m_panelLightsConfig->Layout();
|
||||
bSizer17->Fit( m_panelLightsConfig );
|
||||
m_notebook2->AddPage( m_panelLightsConfig, _("Lights Configuration"), false );
|
||||
|
||||
bSizer14->Add( m_notebook2, 0, wxEXPAND | wxALL, 5 );
|
||||
|
||||
|
||||
m_panelRaytracing->SetSizer( bSizer14 );
|
||||
m_panelRaytracing->Layout();
|
||||
bSizer14->Fit( m_panelRaytracing );
|
||||
m_notebook->AddPage( m_panelRaytracing, _("Raytracing"), false );
|
||||
|
||||
bSizerMain->Add( m_notebook, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_sdbSizer = new wxStdDialogButtonSizer();
|
||||
m_sdbSizerOK = new wxButton( this, wxID_OK );
|
||||
m_sdbSizer->AddButton( m_sdbSizerOK );
|
||||
m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
|
||||
m_sdbSizer->AddButton( m_sdbSizerCancel );
|
||||
m_sdbSizer->Realize();
|
||||
|
||||
bSizerMain->Add( m_sdbSizer, 0, wxALIGN_RIGHT|wxALL, 5 );
|
||||
|
||||
|
||||
this->SetSizer( bSizerMain );
|
||||
this->Layout();
|
||||
|
||||
this->Centre( wxBOTH );
|
||||
|
||||
// Connect Events
|
||||
m_checkBoxRealisticMode->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_3D_VIEW_OPTIONS_BASE::OnCheckRealisticMode ), NULL, this );
|
||||
m_checkBoxEnableAnimation->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_3D_VIEW_OPTIONS_BASE::OnCheckEnableAnimation ), NULL, this );
|
||||
m_buttonLightsResetToDefaults->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_3D_VIEW_OPTIONS_BASE::OnLightsResetToDefaults ), NULL, this );
|
||||
}
|
||||
|
||||
DIALOG_3D_VIEW_OPTIONS_BASE::~DIALOG_3D_VIEW_OPTIONS_BASE()
|
||||
{
|
||||
// Disconnect Events
|
||||
m_checkBoxRealisticMode->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_3D_VIEW_OPTIONS_BASE::OnCheckRealisticMode ), NULL, this );
|
||||
m_checkBoxEnableAnimation->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_3D_VIEW_OPTIONS_BASE::OnCheckEnableAnimation ), NULL, this );
|
||||
m_buttonLightsResetToDefaults->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_3D_VIEW_OPTIONS_BASE::OnLightsResetToDefaults ), NULL, this );
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,213 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, you may find one here:
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||
* or you may write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "panel_3D_colors.h"
|
||||
#include <widgets/color_swatch.h>
|
||||
#include <3d_canvas/board_adapter.h>
|
||||
#include <3d_viewer/eda_3d_viewer.h>
|
||||
#include <board_stackup_manager/stackup_predefined_prms.h>
|
||||
#include <board_stackup_manager/board_stackup.h>
|
||||
#include <board_design_settings.h>
|
||||
|
||||
PANEL_3D_COLORS::PANEL_3D_COLORS( EDA_3D_VIEWER* aFrame, wxWindow* aParent ) :
|
||||
PANEL_3D_COLORS_BASE( aParent ),
|
||||
m_settings( aFrame->GetAdapter() )
|
||||
{
|
||||
#define ADD_COLOR( list, r, g, b, a, name ) \
|
||||
list.push_back( CUSTOM_COLOR_ITEM( r/255.0, g/255.0, b/255.0, a, name ) )
|
||||
|
||||
m_backgroundTop->SetDefaultColor( COLOR4D( 0.8, 0.8, 0.9, 1.0 ) );
|
||||
m_backgroundBottom->SetDefaultColor( COLOR4D( 0.4, 0.4, 0.5, 1.0 ) );
|
||||
|
||||
m_silkscreenTop->SetDefaultColor( COLOR4D( 0.9, 0.9, 0.9, 1.0 ) );
|
||||
m_silkscreenBottom->SetDefaultColor( COLOR4D( 0.9, 0.9, 0.9, 1.0 ) );
|
||||
|
||||
ADD_COLOR( m_silkscreenColors, 241, 241, 241, 1.0, "White" );
|
||||
ADD_COLOR( m_silkscreenColors, 4, 18, 21, 1.0, "Dark" );
|
||||
m_silkscreenTop->SetUserColors( &m_silkscreenColors );
|
||||
m_silkscreenBottom->SetUserColors( &m_silkscreenColors );
|
||||
|
||||
m_solderMaskTop->SetDefaultColor( COLOR4D( 0.1, 0.2, 0.1, 0.83 ) );
|
||||
m_solderMaskBottom->SetDefaultColor( COLOR4D( 0.1, 0.2, 0.1, 0.83 ) );
|
||||
|
||||
ADD_COLOR( m_maskColors, 20, 51, 36, 0.83, "Green" );
|
||||
ADD_COLOR( m_maskColors, 91, 168, 12, 0.83, "Light Green" );
|
||||
ADD_COLOR( m_maskColors, 13, 104, 11, 0.83, "Saturated Green" );
|
||||
ADD_COLOR( m_maskColors, 181, 19, 21, 0.83, "Red" );
|
||||
ADD_COLOR( m_maskColors, 239, 53, 41, 0.83, "Red Light Orange" );
|
||||
ADD_COLOR( m_maskColors, 210, 40, 14, 0.83, "Red 2" );
|
||||
ADD_COLOR( m_maskColors, 2, 59, 162, 0.83, "Blue" );
|
||||
ADD_COLOR( m_maskColors, 54, 79, 116, 0.83, "Light blue 1" );
|
||||
ADD_COLOR( m_maskColors, 61, 85, 130, 0.83, "Light blue 2" );
|
||||
ADD_COLOR( m_maskColors, 21, 70, 80, 0.83, "Green blue (dark)" );
|
||||
ADD_COLOR( m_maskColors, 11, 11, 11, 0.83, "Black" );
|
||||
ADD_COLOR( m_maskColors, 245, 245, 245, 0.83, "White" );
|
||||
ADD_COLOR( m_maskColors, 119, 31, 91, 0.83, "Purple" );
|
||||
ADD_COLOR( m_maskColors, 32, 2, 53, 0.83, "Purple Dark" );
|
||||
m_solderMaskTop->SetUserColors( &m_maskColors );
|
||||
m_solderMaskBottom->SetUserColors( &m_maskColors );
|
||||
|
||||
m_solderPaste->SetDefaultColor( COLOR4D( 0.4, 0.4, 0.4, 1.0 ) );
|
||||
|
||||
ADD_COLOR( m_pasteColors, 128, 128, 128, 1.0, "grey" );
|
||||
ADD_COLOR( m_pasteColors, 213, 213, 213, 1.0, "Silver" );
|
||||
ADD_COLOR( m_pasteColors, 90, 90, 90, 1.0, "grey 2" );
|
||||
m_solderPaste->SetUserColors( &m_pasteColors );
|
||||
|
||||
m_surfaceFinish->SetDefaultColor( COLOR4D( 0.75, 0.61, 0.23, 1.0 ) );
|
||||
|
||||
ADD_COLOR( m_finishColors, 184, 115, 50, 1.0, "Copper" );
|
||||
ADD_COLOR( m_finishColors, 178, 156, 0, 1.0, "Gold" );
|
||||
ADD_COLOR( m_finishColors, 213, 213, 213, 1.0, "Silver" );
|
||||
ADD_COLOR( m_finishColors, 160, 160, 160, 1.0, "Tin" );
|
||||
m_surfaceFinish->SetUserColors( &m_finishColors );
|
||||
|
||||
m_boardBody->SetDefaultColor( COLOR4D( 0.4, 0.4, 0.5, 0.9 ) );
|
||||
|
||||
ADD_COLOR( m_boardColors, 51, 43, 22, 0.9, "FR4 natural, dark" );
|
||||
ADD_COLOR( m_boardColors, 109, 116, 75, 0.9, "FR4 natural" );
|
||||
ADD_COLOR( m_boardColors, 78, 14, 5, 0.9, "brown/red" );
|
||||
ADD_COLOR( m_boardColors, 146, 99, 47, 0.9, "brown 1" );
|
||||
ADD_COLOR( m_boardColors, 160, 123, 54, 0.9, "brown 2" );
|
||||
ADD_COLOR( m_boardColors, 146, 99, 47, 0.9, "brown 3" );
|
||||
ADD_COLOR( m_boardColors, 63, 126, 71, 0.9, "green 1" );
|
||||
ADD_COLOR( m_boardColors, 117, 122, 90, 0.9, "green 2" );
|
||||
m_boardBody->SetUserColors( &m_boardColors );
|
||||
|
||||
// Only allow the stackup to be used in the PCB editor, since it isn't editable in the other
|
||||
// frames
|
||||
m_loadStackup->Show( aFrame->Parent()->IsType( FRAME_PCB_EDITOR ) );
|
||||
|
||||
#undef ADD_COLOR
|
||||
}
|
||||
|
||||
|
||||
bool PANEL_3D_COLORS::TransferDataToWindow()
|
||||
{
|
||||
auto to_COLOR4D = []( const SFVEC4F& src )
|
||||
{
|
||||
return COLOR4D( src.r, src.g, src.b, src.a );
|
||||
};
|
||||
|
||||
m_backgroundTop->SetSwatchColor( to_COLOR4D( m_settings.m_BgColorTop ), false );
|
||||
m_backgroundBottom->SetSwatchColor( to_COLOR4D( m_settings.m_BgColorBot ), false );
|
||||
m_silkscreenTop->SetSwatchColor( to_COLOR4D( m_settings.m_SilkScreenColorTop ), false );
|
||||
m_silkscreenBottom->SetSwatchColor( to_COLOR4D( m_settings.m_SilkScreenColorBot ), false );
|
||||
m_solderMaskTop->SetSwatchColor( to_COLOR4D( m_settings.m_SolderMaskColorTop ), false );
|
||||
m_solderMaskBottom->SetSwatchColor( to_COLOR4D( m_settings.m_SolderMaskColorBot ), false );
|
||||
m_solderPaste->SetSwatchColor( to_COLOR4D( m_settings.m_SolderPasteColor ), false );
|
||||
m_surfaceFinish->SetSwatchColor( to_COLOR4D( m_settings.m_CopperColor ), false );
|
||||
m_boardBody->SetSwatchColor( to_COLOR4D( m_settings.m_BoardBodyColor ), false );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool PANEL_3D_COLORS::TransferDataFromWindow()
|
||||
{
|
||||
auto to_SFVEC4F = []( const COLOR4D& src )
|
||||
{
|
||||
return SFVEC4F( src.r, src.g, src.b, src.a );
|
||||
};
|
||||
|
||||
m_settings.m_BgColorTop = to_SFVEC4F( m_backgroundTop->GetSwatchColor() );
|
||||
m_settings.m_BgColorBot = to_SFVEC4F( m_backgroundBottom->GetSwatchColor() );
|
||||
m_settings.m_SilkScreenColorTop = to_SFVEC4F( m_silkscreenTop->GetSwatchColor() );
|
||||
m_settings.m_SilkScreenColorBot = to_SFVEC4F( m_silkscreenBottom->GetSwatchColor() );
|
||||
m_settings.m_SolderMaskColorTop = to_SFVEC4F( m_solderMaskTop->GetSwatchColor() );
|
||||
m_settings.m_SolderMaskColorBot = to_SFVEC4F( m_solderMaskBottom->GetSwatchColor() );
|
||||
m_settings.m_SolderPasteColor = to_SFVEC4F( m_solderPaste->GetSwatchColor() );
|
||||
m_settings.m_CopperColor = to_SFVEC4F( m_surfaceFinish->GetSwatchColor() );
|
||||
m_settings.m_BoardBodyColor = to_SFVEC4F( m_boardBody->GetSwatchColor() );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void PANEL_3D_COLORS::OnLoadColorsFromBoardStackup( wxCommandEvent& event )
|
||||
{
|
||||
const BOARD* brd = m_settings.GetBoard();
|
||||
const FAB_LAYER_COLOR* stdColors = GetColorStandardList();
|
||||
wxColour color;
|
||||
|
||||
if( brd )
|
||||
{
|
||||
const BOARD_STACKUP& stckp = brd->GetDesignSettings().GetStackupDescriptor();
|
||||
|
||||
for( const BOARD_STACKUP_ITEM* stckpItem : stckp.GetList() )
|
||||
{
|
||||
wxString colorName = stckpItem->GetColor();
|
||||
|
||||
if( colorName.StartsWith( "#" ) ) // This is a user defined color.
|
||||
{
|
||||
color.Set( colorName );
|
||||
}
|
||||
else
|
||||
{
|
||||
for( int i = 0; i < GetColorStandardListCount(); i++ )
|
||||
{
|
||||
if( stdColors[i].m_ColorName == colorName )
|
||||
{
|
||||
color = stdColors[i].m_Color;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( color.IsOk() )
|
||||
{
|
||||
switch( stckpItem->GetBrdLayerId() )
|
||||
{
|
||||
case F_SilkS:
|
||||
m_settings.m_SilkScreenColorTop.r = color.Red() / 255.0;
|
||||
m_settings.m_SilkScreenColorTop.g = color.Green() / 255.0;
|
||||
m_settings.m_SilkScreenColorTop.b = color.Blue() / 255.0;
|
||||
break;
|
||||
case B_SilkS:
|
||||
m_settings.m_SilkScreenColorBot.r = color.Red() / 255.0;
|
||||
m_settings.m_SilkScreenColorBot.g = color.Green() / 255.0;
|
||||
m_settings.m_SilkScreenColorBot.b = color.Blue() / 255.0;
|
||||
break;
|
||||
case F_Mask:
|
||||
m_settings.m_SolderMaskColorTop.r = color.Red() / 255.0;
|
||||
m_settings.m_SolderMaskColorTop.g = color.Green() / 255.0;
|
||||
m_settings.m_SolderMaskColorTop.b = color.Blue() / 255.0;
|
||||
// Keep the previous alpha value
|
||||
//m_boardAdapter.m_SolderMaskColorTop.a = color.Alpha() / 255.0;
|
||||
break;
|
||||
case B_Mask:
|
||||
m_settings.m_SolderMaskColorBot.r = color.Red() / 255.0;
|
||||
m_settings.m_SolderMaskColorBot.g = color.Green() / 255.0;
|
||||
m_settings.m_SolderMaskColorBot.b = color.Blue() / 255.0;
|
||||
// Keep the previous alpha value
|
||||
//m_boardAdapter.m_SolderMaskColorBot.a = color.Alpha() / 255.0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TransferDataToWindow();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, you may find one here:
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||
* or you may write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef PANEL_3D_COLORS_H
|
||||
#define PANEL_3D_COLORS_H
|
||||
|
||||
#include "panel_3D_colors_base.h"
|
||||
#include <3d_viewer/eda_3d_viewer.h>
|
||||
|
||||
class PANEL_3D_COLORS : public PANEL_3D_COLORS_BASE
|
||||
{
|
||||
public:
|
||||
explicit PANEL_3D_COLORS( EDA_3D_VIEWER* aFrame, wxWindow* aParent );
|
||||
|
||||
/// Automatically called when clicking on the OK button
|
||||
bool TransferDataFromWindow() override;
|
||||
|
||||
/// Automatically called after creating the dialog
|
||||
bool TransferDataToWindow() override;
|
||||
|
||||
void OnLoadColorsFromBoardStackup( wxCommandEvent& event ) override;
|
||||
|
||||
private:
|
||||
BOARD_ADAPTER& m_settings;
|
||||
|
||||
CUSTOM_COLORS_LIST m_silkscreenColors;
|
||||
CUSTOM_COLORS_LIST m_maskColors;
|
||||
CUSTOM_COLORS_LIST m_pasteColors;
|
||||
CUSTOM_COLORS_LIST m_finishColors;
|
||||
CUSTOM_COLORS_LIST m_boardColors;
|
||||
};
|
||||
|
||||
|
||||
#endif // PANEL_3D_COLORS_H
|
|
@ -0,0 +1,146 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "widgets/color_swatch.h"
|
||||
|
||||
#include "panel_3D_colors_base.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
PANEL_3D_COLORS_BASE::PANEL_3D_COLORS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
|
||||
{
|
||||
wxBoxSizer* bSizerMain;
|
||||
bSizerMain = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxBoxSizer* bSizerMargins;
|
||||
bSizerMargins = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
wxFlexGridSizer* fgSizer1;
|
||||
fgSizer1 = new wxFlexGridSizer( 0, 2, 5, 0 );
|
||||
fgSizer1->SetFlexibleDirection( wxBOTH );
|
||||
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
backgroundTopLabel = new wxStaticText( this, wxID_ANY, _("Background top:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
backgroundTopLabel->Wrap( -1 );
|
||||
fgSizer1->Add( backgroundTopLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_backgroundTop = new COLOR_SWATCH( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer1->Add( m_backgroundTop, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
backgroundBotLabel = new wxStaticText( this, wxID_ANY, _("Background bottom:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
backgroundBotLabel->Wrap( -1 );
|
||||
fgSizer1->Add( backgroundBotLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_backgroundBottom = new COLOR_SWATCH( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer1->Add( m_backgroundBottom, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
fgSizer1->Add( 0, 10, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
silkscreenTopLabel = new wxStaticText( this, wxID_ANY, _("Silkscreen top:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
silkscreenTopLabel->Wrap( -1 );
|
||||
fgSizer1->Add( silkscreenTopLabel, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_silkscreenTop = new COLOR_SWATCH( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer1->Add( m_silkscreenTop, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
silkscreenBottomLabel = new wxStaticText( this, wxID_ANY, _("Silkscreen bottom:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
silkscreenBottomLabel->Wrap( -1 );
|
||||
fgSizer1->Add( silkscreenBottomLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_silkscreenBottom = new COLOR_SWATCH( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer1->Add( m_silkscreenBottom, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
fgSizer1->Add( 0, 10, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
solderMaskTopLabel = new wxStaticText( this, wxID_ANY, _("Solder mask top:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
solderMaskTopLabel->Wrap( -1 );
|
||||
fgSizer1->Add( solderMaskTopLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_solderMaskTop = new COLOR_SWATCH( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer1->Add( m_solderMaskTop, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
solderMaskBottomLabel = new wxStaticText( this, wxID_ANY, _("Solder mask bottom:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
solderMaskBottomLabel->Wrap( -1 );
|
||||
fgSizer1->Add( solderMaskBottomLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_solderMaskBottom = new COLOR_SWATCH( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer1->Add( m_solderMaskBottom, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
fgSizer1->Add( 0, 10, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
solderPasteLabel = new wxStaticText( this, wxID_ANY, _("Solder paste:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
solderPasteLabel->Wrap( -1 );
|
||||
fgSizer1->Add( solderPasteLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_solderPaste = new COLOR_SWATCH( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer1->Add( m_solderPaste, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
fgSizer1->Add( 0, 10, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
surfaceFinishLabel = new wxStaticText( this, wxID_ANY, _("Copper/surface finish:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
surfaceFinishLabel->Wrap( -1 );
|
||||
fgSizer1->Add( surfaceFinishLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_surfaceFinish = new COLOR_SWATCH( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer1->Add( m_surfaceFinish, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
fgSizer1->Add( 0, 10, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
boardBodyLabel = new wxStaticText( this, wxID_ANY, _("Board body:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
boardBodyLabel->Wrap( -1 );
|
||||
fgSizer1->Add( boardBodyLabel, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_boardBody = new COLOR_SWATCH( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer1->Add( m_boardBody, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
bSizerMargins->Add( fgSizer1, 0, wxTOP, 5 );
|
||||
|
||||
|
||||
bSizerMargins->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
m_loadStackup = new wxButton( this, wxID_ANY, _("Load Colors from Board Stackup"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerMargins->Add( m_loadStackup, 0, wxALL, 5 );
|
||||
|
||||
|
||||
bSizerMain->Add( bSizerMargins, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
|
||||
this->SetSizer( bSizerMain );
|
||||
this->Layout();
|
||||
bSizerMain->Fit( this );
|
||||
|
||||
// Connect Events
|
||||
m_loadStackup->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_3D_COLORS_BASE::OnLoadColorsFromBoardStackup ), NULL, this );
|
||||
}
|
||||
|
||||
PANEL_3D_COLORS_BASE::~PANEL_3D_COLORS_BASE()
|
||||
{
|
||||
// Disconnect Events
|
||||
m_loadStackup->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_3D_COLORS_BASE::OnLoadColorsFromBoardStackup ), NULL, this );
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,69 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
#include <wx/intl.h>
|
||||
class COLOR_SWATCH;
|
||||
|
||||
#include <wx/string.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/icon.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/panel.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class PANEL_3D_COLORS_BASE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class PANEL_3D_COLORS_BASE : public wxPanel
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxStaticText* backgroundTopLabel;
|
||||
COLOR_SWATCH* m_backgroundTop;
|
||||
wxStaticText* backgroundBotLabel;
|
||||
COLOR_SWATCH* m_backgroundBottom;
|
||||
wxStaticText* silkscreenTopLabel;
|
||||
COLOR_SWATCH* m_silkscreenTop;
|
||||
wxStaticText* silkscreenBottomLabel;
|
||||
COLOR_SWATCH* m_silkscreenBottom;
|
||||
wxStaticText* solderMaskTopLabel;
|
||||
COLOR_SWATCH* m_solderMaskTop;
|
||||
wxStaticText* solderMaskBottomLabel;
|
||||
COLOR_SWATCH* m_solderMaskBottom;
|
||||
wxStaticText* solderPasteLabel;
|
||||
COLOR_SWATCH* m_solderPaste;
|
||||
wxStaticText* surfaceFinishLabel;
|
||||
COLOR_SWATCH* m_surfaceFinish;
|
||||
wxStaticText* boardBodyLabel;
|
||||
COLOR_SWATCH* m_boardBody;
|
||||
wxButton* m_loadStackup;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnLoadColorsFromBoardStackup( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
|
||||
PANEL_3D_COLORS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
||||
~PANEL_3D_COLORS_BASE();
|
||||
|
||||
};
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2014-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, you may find one here:
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||
* or you may write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "panel_3D_display_options.h"
|
||||
#include <3d_canvas/board_adapter.h>
|
||||
#include <3d_viewer/eda_3d_viewer.h>
|
||||
#include <3d_viewer/tools/3d_controller.h>
|
||||
#include <tool/tool_manager.h>
|
||||
|
||||
|
||||
PANEL_3D_DISPLAY_OPTIONS::PANEL_3D_DISPLAY_OPTIONS( EDA_3D_VIEWER* aFrame, wxWindow* aParent ) :
|
||||
PANEL_3D_DISPLAY_OPTIONS_BASE( aParent ),
|
||||
m_frame( aFrame ),
|
||||
m_settings( aFrame->GetAdapter() ),
|
||||
m_canvas( aFrame->GetCanvas() )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void PANEL_3D_DISPLAY_OPTIONS::OnCheckEnableAnimation( wxCommandEvent& event )
|
||||
{
|
||||
m_staticAnimationSpeed->Enable( m_checkBoxEnableAnimation->GetValue() );
|
||||
m_sliderAnimationSpeed->Enable( m_checkBoxEnableAnimation->GetValue() );
|
||||
}
|
||||
|
||||
|
||||
bool PANEL_3D_DISPLAY_OPTIONS::TransferDataToWindow()
|
||||
{
|
||||
// Check/uncheck checkboxes
|
||||
m_checkBoxRealisticMode->SetValue( m_settings.GetFlag( FL_USE_REALISTIC_MODE ) );
|
||||
m_checkBoxBoardBody->SetValue( m_settings.GetFlag( FL_SHOW_BOARD_BODY ) );
|
||||
m_checkBoxAreas->SetValue( m_settings.GetFlag( FL_ZONE ) );
|
||||
|
||||
m_checkBox3DshapesTH->SetValue( m_settings.GetFlag( FL_FP_ATTRIBUTES_NORMAL ) );
|
||||
m_checkBox3DshapesSMD->SetValue( m_settings.GetFlag( FL_FP_ATTRIBUTES_NORMAL_INSERT ) );
|
||||
m_checkBox3DshapesVirtual->SetValue( m_settings.GetFlag( FL_FP_ATTRIBUTES_VIRTUAL ) );
|
||||
|
||||
m_checkBoxSilkscreen->SetValue( m_settings.GetFlag( FL_SILKSCREEN ) );
|
||||
m_checkBoxSolderMask->SetValue( m_settings.GetFlag( FL_SOLDERMASK ) );
|
||||
m_checkBoxSolderpaste->SetValue( m_settings.GetFlag( FL_SOLDERPASTE ) );
|
||||
m_checkBoxAdhesive->SetValue( m_settings.GetFlag( FL_ADHESIVE ) );
|
||||
m_checkBoxComments->SetValue( m_settings.GetFlag( FL_COMMENTS ) );
|
||||
m_checkBoxECO->SetValue( m_settings.GetFlag( FL_ECO ) );
|
||||
m_checkBoxSubtractMaskFromSilk->SetValue( m_settings.GetFlag( FL_SUBTRACT_MASK_FROM_SILK ) );
|
||||
m_checkBoxClipSilkOnViaAnnulus->SetValue( m_settings.GetFlag( FL_CLIP_SILK_ON_VIA_ANNULUS ) );
|
||||
m_checkBoxRenderPlatedPadsAsPlated->SetValue(
|
||||
m_settings.GetFlag( FL_RENDER_PLATED_PADS_AS_PLATED ) );
|
||||
|
||||
switch( m_settings.GetMaterialMode() )
|
||||
{
|
||||
default:
|
||||
case MATERIAL_MODE::NORMAL: m_materialProperties->SetSelection( 0 ); break;
|
||||
case MATERIAL_MODE::DIFFUSE_ONLY: m_materialProperties->SetSelection( 1 ); break;
|
||||
case MATERIAL_MODE::CAD_MODE: m_materialProperties->SetSelection( 2 ); break;
|
||||
}
|
||||
|
||||
// Camera Options
|
||||
m_checkBoxEnableAnimation->SetValue( m_canvas->AnimationEnabledGet() );
|
||||
m_sliderAnimationSpeed->SetValue( m_canvas->MovingSpeedMultiplierGet() );
|
||||
m_staticAnimationSpeed->Enable( m_canvas->AnimationEnabledGet() );
|
||||
m_sliderAnimationSpeed->Enable( m_canvas->AnimationEnabledGet() );
|
||||
|
||||
EDA_3D_CONTROLLER* ctrlTool = m_frame->GetToolManager()->GetTool<EDA_3D_CONTROLLER>();
|
||||
m_spinCtrlRotationAngle->SetValue( ctrlTool->GetRotationIncrement() );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool PANEL_3D_DISPLAY_OPTIONS::TransferDataFromWindow()
|
||||
{
|
||||
// Set render mode
|
||||
m_settings.SetFlag( FL_USE_REALISTIC_MODE, m_checkBoxRealisticMode->GetValue() );
|
||||
|
||||
// Set visibility of items
|
||||
m_settings.SetFlag( FL_SHOW_BOARD_BODY, m_checkBoxBoardBody->GetValue() );
|
||||
m_settings.SetFlag( FL_ZONE, m_checkBoxAreas->GetValue() );
|
||||
m_settings.SetFlag( FL_SUBTRACT_MASK_FROM_SILK, m_checkBoxSubtractMaskFromSilk->GetValue() );
|
||||
m_settings.SetFlag( FL_CLIP_SILK_ON_VIA_ANNULUS, m_checkBoxClipSilkOnViaAnnulus->GetValue() );
|
||||
m_settings.SetFlag( FL_RENDER_PLATED_PADS_AS_PLATED,
|
||||
m_checkBoxRenderPlatedPadsAsPlated->GetValue() );
|
||||
|
||||
switch( m_materialProperties->GetSelection() )
|
||||
{
|
||||
default:
|
||||
case 0: m_settings.SetMaterialMode( MATERIAL_MODE::NORMAL ); break;
|
||||
case 1: m_settings.SetMaterialMode( MATERIAL_MODE::DIFFUSE_ONLY ); break;
|
||||
case 2: m_settings.SetMaterialMode( MATERIAL_MODE::CAD_MODE ); break;
|
||||
}
|
||||
|
||||
// Set 3D shapes visibility
|
||||
m_settings.SetFlag( FL_FP_ATTRIBUTES_NORMAL, m_checkBox3DshapesTH->GetValue() );
|
||||
m_settings.SetFlag( FL_FP_ATTRIBUTES_NORMAL_INSERT, m_checkBox3DshapesSMD->GetValue() );
|
||||
m_settings.SetFlag( FL_FP_ATTRIBUTES_VIRTUAL, m_checkBox3DshapesVirtual->GetValue() );
|
||||
|
||||
// Set Layer visibility
|
||||
m_settings.SetFlag( FL_SILKSCREEN, m_checkBoxSilkscreen->GetValue() );
|
||||
m_settings.SetFlag( FL_SOLDERMASK, m_checkBoxSolderMask->GetValue() );
|
||||
m_settings.SetFlag( FL_SOLDERPASTE, m_checkBoxSolderpaste->GetValue() );
|
||||
m_settings.SetFlag( FL_ADHESIVE, m_checkBoxAdhesive->GetValue() );
|
||||
m_settings.SetFlag( FL_COMMENTS, m_checkBoxComments->GetValue() );
|
||||
m_settings.SetFlag( FL_ECO, m_checkBoxECO->GetValue( ) );
|
||||
|
||||
// Camera Options
|
||||
m_canvas->AnimationEnabledSet( m_checkBoxEnableAnimation->GetValue() );
|
||||
m_canvas->MovingSpeedMultiplierSet( m_sliderAnimationSpeed->GetValue() );
|
||||
|
||||
EDA_3D_CONTROLLER* ctrlTool = m_frame->GetToolManager()->GetTool<EDA_3D_CONTROLLER>();
|
||||
ctrlTool->SetRotationIncrement( m_spinCtrlRotationAngle->GetValue() );
|
||||
|
||||
m_frame->NewDisplay();
|
||||
m_canvas->Request_refresh();
|
||||
|
||||
return true;
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2014-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, you may find one here:
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||
* or you may write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef PANEL_3D_DISPLAY_OPTIONS_H
|
||||
#define PANEL_3D_DISPLAY_OPTIONS_H
|
||||
|
||||
#include "panel_3D_display_options_base.h"
|
||||
#include <3d_viewer/eda_3d_viewer.h>
|
||||
|
||||
|
||||
class PANEL_3D_DISPLAY_OPTIONS : public PANEL_3D_DISPLAY_OPTIONS_BASE
|
||||
{
|
||||
public:
|
||||
explicit PANEL_3D_DISPLAY_OPTIONS( EDA_3D_VIEWER* aFrame, wxWindow* aParent );
|
||||
|
||||
void OnCheckEnableAnimation( wxCommandEvent& WXUNUSED( event ) ) override;
|
||||
|
||||
/// Automatically called when clicking on the OK button
|
||||
bool TransferDataFromWindow() override;
|
||||
|
||||
/// Automatically called after creating the dialog
|
||||
bool TransferDataToWindow() override;
|
||||
|
||||
void TransferColorDataToWindow();
|
||||
|
||||
private:
|
||||
EDA_3D_VIEWER* m_frame;
|
||||
BOARD_ADAPTER& m_settings;
|
||||
EDA_3D_CANVAS* m_canvas;
|
||||
};
|
||||
|
||||
|
||||
#endif // PANEL_3D_DISPLAY_OPTIONS_H
|
|
@ -0,0 +1,178 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "panel_3D_display_options_base.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
PANEL_3D_DISPLAY_OPTIONS_BASE::PANEL_3D_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
|
||||
{
|
||||
wxBoxSizer* bSizerMain;
|
||||
bSizerMain = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
wxBoxSizer* bSizeLeft;
|
||||
bSizeLeft = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxStaticBoxSizer* sbModelVisibility;
|
||||
sbModelVisibility = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("3D Model Visibility") ), wxVERTICAL );
|
||||
|
||||
m_checkBox3DshapesTH = new wxCheckBox( sbModelVisibility->GetStaticBox(), wxID_ANY, _("Show 3D through hole models"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbModelVisibility->Add( m_checkBox3DshapesTH, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_checkBox3DshapesSMD = new wxCheckBox( sbModelVisibility->GetStaticBox(), wxID_ANY, _("Show 3D SMD models"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbModelVisibility->Add( m_checkBox3DshapesSMD, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_checkBox3DshapesVirtual = new wxCheckBox( sbModelVisibility->GetStaticBox(), wxID_ANY, _("Show 3D virtual models"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbModelVisibility->Add( m_checkBox3DshapesVirtual, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
bSizeLeft->Add( sbModelVisibility, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbBoardLayers;
|
||||
sbBoardLayers = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Board Layers") ), wxVERTICAL );
|
||||
|
||||
m_checkBoxSilkscreen = new wxCheckBox( sbBoardLayers->GetStaticBox(), wxID_ANY, _("Show silkscreen layers"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbBoardLayers->Add( m_checkBoxSilkscreen, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_checkBoxSolderMask = new wxCheckBox( sbBoardLayers->GetStaticBox(), wxID_ANY, _("Show solder mask layers"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbBoardLayers->Add( m_checkBoxSolderMask, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_checkBoxSolderpaste = new wxCheckBox( sbBoardLayers->GetStaticBox(), wxID_ANY, _("Show solder paste layers"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbBoardLayers->Add( m_checkBoxSolderpaste, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_checkBoxAdhesive = new wxCheckBox( sbBoardLayers->GetStaticBox(), wxID_ANY, _("Show adhesive layers"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbBoardLayers->Add( m_checkBoxAdhesive, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
bSizeLeft->Add( sbBoardLayers, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbUserLayers;
|
||||
sbUserLayers = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("User Layers (not shown in realistic mode)") ), wxVERTICAL );
|
||||
|
||||
m_checkBoxComments = new wxCheckBox( sbUserLayers->GetStaticBox(), wxID_ANY, _("Show comments and drawings layers"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbUserLayers->Add( m_checkBoxComments, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_checkBoxECO = new wxCheckBox( sbUserLayers->GetStaticBox(), wxID_ANY, _("Show ECO layers"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbUserLayers->Add( m_checkBoxECO, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
bSizeLeft->Add( sbUserLayers, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
|
||||
bSizerMain->Add( bSizeLeft, 1, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 10 );
|
||||
|
||||
wxBoxSizer* bSizerRight;
|
||||
bSizerRight = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxStaticBoxSizer* sbRenderOptions;
|
||||
sbRenderOptions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Render Options") ), wxVERTICAL );
|
||||
|
||||
m_checkBoxRealisticMode = new wxCheckBox( sbRenderOptions->GetStaticBox(), wxID_ANY, _("Realistic mode"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbRenderOptions->Add( m_checkBoxRealisticMode, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_checkBoxBoardBody = new wxCheckBox( sbRenderOptions->GetStaticBox(), wxID_ANY, _("Show board body"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbRenderOptions->Add( m_checkBoxBoardBody, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_checkBoxAreas = new wxCheckBox( sbRenderOptions->GetStaticBox(), wxID_ANY, _("Show filled areas in zones"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbRenderOptions->Add( m_checkBoxAreas, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_checkBoxSubtractMaskFromSilk = new wxCheckBox( sbRenderOptions->GetStaticBox(), wxID_ANY, _("Subtract soldermask from silkscreen"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbRenderOptions->Add( m_checkBoxSubtractMaskFromSilk, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_checkBoxClipSilkOnViaAnnulus = new wxCheckBox( sbRenderOptions->GetStaticBox(), wxID_ANY, _("Clip silkscreen at via annuli"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbRenderOptions->Add( m_checkBoxClipSilkOnViaAnnulus, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_checkBoxRenderPlatedPadsAsPlated = new wxCheckBox( sbRenderOptions->GetStaticBox(), wxID_ANY, _("Use bare copper color for unplated copper"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkBoxRenderPlatedPadsAsPlated->SetToolTip( _("Use different colors for plated and unplated copper. (Slow)") );
|
||||
|
||||
sbRenderOptions->Add( m_checkBoxRenderPlatedPadsAsPlated, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
wxBoxSizer* bSizerMaterials;
|
||||
bSizerMaterials = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_materialPropertiesLabel = new wxStaticText( sbRenderOptions->GetStaticBox(), wxID_ANY, _("Material properties:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
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") };
|
||||
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 );
|
||||
bSizerMaterials->Add( m_materialProperties, 0, wxALL, 5 );
|
||||
|
||||
|
||||
sbRenderOptions->Add( bSizerMaterials, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerRight->Add( sbRenderOptions, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbCameraOptions;
|
||||
sbCameraOptions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Camera Options") ), wxVERTICAL );
|
||||
|
||||
wxBoxSizer* bSizerRotAngle;
|
||||
bSizerRotAngle = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_staticTextRotAngle = new wxStaticText( sbCameraOptions->GetStaticBox(), wxID_ANY, _("Rotation Increment:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextRotAngle->Wrap( -1 );
|
||||
bSizerRotAngle->Add( m_staticTextRotAngle, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_spinCtrlRotationAngle = new wxSpinCtrlDouble( sbCameraOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 359, 10, 1 );
|
||||
m_spinCtrlRotationAngle->SetDigits( 0 );
|
||||
bSizerRotAngle->Add( m_spinCtrlRotationAngle, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_staticTextRotAngleUnits = new wxStaticText( sbCameraOptions->GetStaticBox(), wxID_ANY, _("deg"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextRotAngleUnits->Wrap( -1 );
|
||||
bSizerRotAngle->Add( m_staticTextRotAngleUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||
|
||||
|
||||
sbCameraOptions->Add( bSizerRotAngle, 0, wxEXPAND|wxBOTTOM, 5 );
|
||||
|
||||
m_staticline3 = new wxStaticLine( sbCameraOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
sbCameraOptions->Add( m_staticline3, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
|
||||
m_checkBoxEnableAnimation = new wxCheckBox( sbCameraOptions->GetStaticBox(), wxID_ANY, _("Enable animation"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkBoxEnableAnimation->SetValue(true);
|
||||
sbCameraOptions->Add( m_checkBoxEnableAnimation, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxBoxSizer* bSizerSlider;
|
||||
bSizerSlider = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_staticAnimationSpeed = new wxStaticText( sbCameraOptions->GetStaticBox(), wxID_ANY, _("Animation speed:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticAnimationSpeed->Wrap( -1 );
|
||||
bSizerSlider->Add( m_staticAnimationSpeed, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_sliderAnimationSpeed = new wxSlider( sbCameraOptions->GetStaticBox(), wxID_ANY, 3, 1, 5, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS );
|
||||
m_sliderAnimationSpeed->SetMinSize( wxSize( 100,-1 ) );
|
||||
|
||||
bSizerSlider->Add( m_sliderAnimationSpeed, 1, wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
sbCameraOptions->Add( bSizerSlider, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
|
||||
|
||||
bSizerRight->Add( sbCameraOptions, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizerMain->Add( bSizerRight, 1, wxEXPAND|wxTOP|wxBOTTOM, 10 );
|
||||
|
||||
|
||||
this->SetSizer( bSizerMain );
|
||||
this->Layout();
|
||||
bSizerMain->Fit( this );
|
||||
|
||||
// Connect Events
|
||||
m_checkBoxRealisticMode->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_3D_DISPLAY_OPTIONS_BASE::OnCheckRealisticMode ), NULL, this );
|
||||
m_checkBoxEnableAnimation->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_3D_DISPLAY_OPTIONS_BASE::OnCheckEnableAnimation ), NULL, this );
|
||||
}
|
||||
|
||||
PANEL_3D_DISPLAY_OPTIONS_BASE::~PANEL_3D_DISPLAY_OPTIONS_BASE()
|
||||
{
|
||||
// Disconnect Events
|
||||
m_checkBoxRealisticMode->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_3D_DISPLAY_OPTIONS_BASE::OnCheckRealisticMode ), NULL, this );
|
||||
m_checkBoxEnableAnimation->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_3D_DISPLAY_OPTIONS_BASE::OnCheckEnableAnimation ), NULL, this );
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,75 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/spinctrl.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/slider.h>
|
||||
#include <wx/panel.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class PANEL_3D_DISPLAY_OPTIONS_BASE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class PANEL_3D_DISPLAY_OPTIONS_BASE : public wxPanel
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxCheckBox* m_checkBox3DshapesTH;
|
||||
wxCheckBox* m_checkBox3DshapesSMD;
|
||||
wxCheckBox* m_checkBox3DshapesVirtual;
|
||||
wxCheckBox* m_checkBoxSilkscreen;
|
||||
wxCheckBox* m_checkBoxSolderMask;
|
||||
wxCheckBox* m_checkBoxSolderpaste;
|
||||
wxCheckBox* m_checkBoxAdhesive;
|
||||
wxCheckBox* m_checkBoxComments;
|
||||
wxCheckBox* m_checkBoxECO;
|
||||
wxCheckBox* m_checkBoxRealisticMode;
|
||||
wxCheckBox* m_checkBoxBoardBody;
|
||||
wxCheckBox* m_checkBoxAreas;
|
||||
wxCheckBox* m_checkBoxSubtractMaskFromSilk;
|
||||
wxCheckBox* m_checkBoxClipSilkOnViaAnnulus;
|
||||
wxCheckBox* m_checkBoxRenderPlatedPadsAsPlated;
|
||||
wxStaticText* m_materialPropertiesLabel;
|
||||
wxChoice* m_materialProperties;
|
||||
wxStaticText* m_staticTextRotAngle;
|
||||
wxSpinCtrlDouble* m_spinCtrlRotationAngle;
|
||||
wxStaticText* m_staticTextRotAngleUnits;
|
||||
wxStaticLine* m_staticline3;
|
||||
wxCheckBox* m_checkBoxEnableAnimation;
|
||||
wxStaticText* m_staticAnimationSpeed;
|
||||
wxSlider* m_sliderAnimationSpeed;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnCheckRealisticMode( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnCheckEnableAnimation( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
|
||||
PANEL_3D_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
||||
~PANEL_3D_DISPLAY_OPTIONS_BASE();
|
||||
|
||||
};
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2014-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, you may find one here:
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||
* or you may write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "panel_3D_opengl_options.h"
|
||||
#include <widgets/color_swatch.h>
|
||||
#include <3d_canvas/board_adapter.h>
|
||||
#include <3d_viewer/eda_3d_viewer.h>
|
||||
#include <3d_viewer/tools/3d_controller.h>
|
||||
|
||||
PANEL_3D_OPENGL_OPTIONS::PANEL_3D_OPENGL_OPTIONS( EDA_3D_VIEWER* aFrame, wxWindow* aParent ) :
|
||||
PANEL_3D_OPENGL_OPTIONS_BASE( aParent ),
|
||||
m_settings( aFrame->GetAdapter() ),
|
||||
m_canvas( aFrame->GetCanvas() )
|
||||
{
|
||||
m_selectionColorSwatch->SetDefaultColor( COLOR4D( 0.0, 1.0, 0.0, 1.0 ) );
|
||||
m_selectionColorSwatch->SetSupportsOpacity( false );
|
||||
}
|
||||
|
||||
|
||||
bool PANEL_3D_OPENGL_OPTIONS::TransferDataToWindow()
|
||||
{
|
||||
m_checkBoxCuThickness->SetValue( m_settings.GetFlag( FL_RENDER_OPENGL_COPPER_THICKNESS ) );
|
||||
m_checkBoxBoundingBoxes->SetValue( m_settings.GetFlag( FL_RENDER_OPENGL_SHOW_MODEL_BBOX ) );
|
||||
m_checkBoxHighlightOnRollOver->SetValue( m_settings.GetFlag( FL_HIGHLIGHT_ROLLOVER_ITEM ) );
|
||||
|
||||
m_choiceAntiAliasing->SetSelection( static_cast<int>( m_settings.GetAntiAliasingMode() ) );
|
||||
m_selectionColorSwatch->SetSwatchColor( COLOR4D( m_settings.m_OpenGlSelectionColor.r,
|
||||
m_settings.m_OpenGlSelectionColor.g,
|
||||
m_settings.m_OpenGlSelectionColor.b,
|
||||
1.0 ),
|
||||
false );
|
||||
|
||||
m_checkBoxDisableAAMove->SetValue(
|
||||
m_settings.GetFlag( FL_RENDER_OPENGL_AA_DISABLE_ON_MOVE ) );
|
||||
m_checkBoxDisableMoveThickness->SetValue(
|
||||
m_settings.GetFlag( FL_RENDER_OPENGL_THICKNESS_DISABLE_ON_MOVE ) );
|
||||
m_checkBoxDisableMoveVias->SetValue(
|
||||
m_settings.GetFlag( FL_RENDER_OPENGL_VIAS_DISABLE_ON_MOVE ) );
|
||||
m_checkBoxDisableMoveHoles->SetValue(
|
||||
m_settings.GetFlag( FL_RENDER_OPENGL_HOLES_DISABLE_ON_MOVE ) );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool PANEL_3D_OPENGL_OPTIONS::TransferDataFromWindow()
|
||||
{
|
||||
m_settings.SetFlag( FL_RENDER_OPENGL_COPPER_THICKNESS, m_checkBoxCuThickness->GetValue() );
|
||||
m_settings.SetFlag( FL_RENDER_OPENGL_SHOW_MODEL_BBOX, m_checkBoxBoundingBoxes->GetValue() );
|
||||
m_settings.SetFlag( FL_HIGHLIGHT_ROLLOVER_ITEM, m_checkBoxHighlightOnRollOver->GetValue() );
|
||||
|
||||
m_settings.SetAntiAliasingMode(
|
||||
static_cast<ANTIALIASING_MODE>( m_choiceAntiAliasing->GetSelection() ) );
|
||||
m_settings.m_OpenGlSelectionColor = SFVEC3F( m_selectionColorSwatch->GetSwatchColor().r,
|
||||
m_selectionColorSwatch->GetSwatchColor().g,
|
||||
m_selectionColorSwatch->GetSwatchColor().b );
|
||||
|
||||
m_settings.SetFlag( FL_RENDER_OPENGL_AA_DISABLE_ON_MOVE,
|
||||
m_checkBoxDisableAAMove->GetValue() );
|
||||
m_settings.SetFlag( FL_RENDER_OPENGL_THICKNESS_DISABLE_ON_MOVE,
|
||||
m_checkBoxDisableMoveThickness->GetValue() );
|
||||
m_settings.SetFlag( FL_RENDER_OPENGL_VIAS_DISABLE_ON_MOVE,
|
||||
m_checkBoxDisableMoveVias->GetValue() );
|
||||
m_settings.SetFlag( FL_RENDER_OPENGL_HOLES_DISABLE_ON_MOVE,
|
||||
m_checkBoxDisableMoveHoles->GetValue() );
|
||||
|
||||
return true;
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2014-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, you may find one here:
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||
* or you may write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef PANEL_3D_OPENGL_OPTIONS_H
|
||||
#define PANEL_3D_OPENGL_OPTIONS_H
|
||||
|
||||
#include "panel_3D_opengl_options_base.h"
|
||||
#include <3d_viewer/eda_3d_viewer.h>
|
||||
|
||||
class PANEL_3D_OPENGL_OPTIONS : public PANEL_3D_OPENGL_OPTIONS_BASE
|
||||
{
|
||||
public:
|
||||
explicit PANEL_3D_OPENGL_OPTIONS( EDA_3D_VIEWER* aFrame, wxWindow* aParent );
|
||||
|
||||
/// Automatically called when clicking on the OK button
|
||||
bool TransferDataFromWindow() override;
|
||||
|
||||
/// Automatically called after creating the dialog
|
||||
bool TransferDataToWindow() override;
|
||||
|
||||
private:
|
||||
BOARD_ADAPTER& m_settings;
|
||||
EDA_3D_CANVAS* m_canvas;
|
||||
};
|
||||
|
||||
|
||||
#endif // PANEL_3D_OPENGL_OPTIONS_H
|
|
@ -0,0 +1,91 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "widgets/color_swatch.h"
|
||||
|
||||
#include "panel_3D_opengl_options_base.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
PANEL_3D_OPENGL_OPTIONS_BASE::PANEL_3D_OPENGL_OPTIONS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
|
||||
{
|
||||
wxBoxSizer* bSizerMain;
|
||||
bSizerMain = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxBoxSizer* bSizerMargins;
|
||||
bSizerMargins = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxStaticBoxSizer* sbSizerOpenGLRenderoptions;
|
||||
sbSizerOpenGLRenderoptions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Rendering Options") ), wxVERTICAL );
|
||||
|
||||
m_checkBoxBoundingBoxes = new wxCheckBox( sbSizerOpenGLRenderoptions->GetStaticBox(), wxID_ANY, _("Show model bounding boxes"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizerOpenGLRenderoptions->Add( m_checkBoxBoundingBoxes, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_checkBoxCuThickness = new wxCheckBox( sbSizerOpenGLRenderoptions->GetStaticBox(), wxID_ANY, _("Show copper thickness"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizerOpenGLRenderoptions->Add( m_checkBoxCuThickness, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_checkBoxHighlightOnRollOver = new wxCheckBox( sbSizerOpenGLRenderoptions->GetStaticBox(), wxID_ANY, _("Highlight items on rollover"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizerOpenGLRenderoptions->Add( m_checkBoxHighlightOnRollOver, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxGridSizer* gSizer1;
|
||||
gSizer1 = new wxGridSizer( 0, 2, 0, 0 );
|
||||
|
||||
m_staticText221 = new wxStaticText( sbSizerOpenGLRenderoptions->GetStaticBox(), wxID_ANY, _("Anti-aliasing:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText221->Wrap( -1 );
|
||||
gSizer1->Add( m_staticText221, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxString m_choiceAntiAliasingChoices[] = { _("Disabled"), _("2x"), _("4x"), _("8x") };
|
||||
int m_choiceAntiAliasingNChoices = sizeof( m_choiceAntiAliasingChoices ) / sizeof( wxString );
|
||||
m_choiceAntiAliasing = new wxChoice( sbSizerOpenGLRenderoptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceAntiAliasingNChoices, m_choiceAntiAliasingChoices, 0 );
|
||||
m_choiceAntiAliasing->SetSelection( 0 );
|
||||
m_choiceAntiAliasing->SetToolTip( _("3D-Viewer must be closed and re-opened to apply this setting") );
|
||||
|
||||
gSizer1->Add( m_choiceAntiAliasing, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_selectionColorLabel = new wxStaticText( sbSizerOpenGLRenderoptions->GetStaticBox(), wxID_ANY, _("Selection color:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_selectionColorLabel->Wrap( -1 );
|
||||
gSizer1->Add( m_selectionColorLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_selectionColorSwatch = new COLOR_SWATCH( sbSizerOpenGLRenderoptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
gSizer1->Add( m_selectionColorSwatch, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
sbSizerOpenGLRenderoptions->Add( gSizer1, 0, 0, 5 );
|
||||
|
||||
|
||||
bSizerMargins->Add( sbSizerOpenGLRenderoptions, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbSizerWhileMoving;
|
||||
sbSizerWhileMoving = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("While Moving") ), wxVERTICAL );
|
||||
|
||||
m_checkBoxDisableAAMove = new wxCheckBox( sbSizerWhileMoving->GetStaticBox(), wxID_ANY, _("Disable anti-aliasing"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizerWhileMoving->Add( m_checkBoxDisableAAMove, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_checkBoxDisableMoveThickness = new wxCheckBox( sbSizerWhileMoving->GetStaticBox(), wxID_ANY, _("Disable thickness"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizerWhileMoving->Add( m_checkBoxDisableMoveThickness, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_checkBoxDisableMoveVias = new wxCheckBox( sbSizerWhileMoving->GetStaticBox(), wxID_ANY, _("Disable vias"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizerWhileMoving->Add( m_checkBoxDisableMoveVias, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_checkBoxDisableMoveHoles = new wxCheckBox( sbSizerWhileMoving->GetStaticBox(), wxID_ANY, _("Disable holes"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbSizerWhileMoving->Add( m_checkBoxDisableMoveHoles, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizerMargins->Add( sbSizerWhileMoving, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerMain->Add( bSizerMargins, 1, wxEXPAND|wxRIGHT, 5 );
|
||||
|
||||
|
||||
this->SetSizer( bSizerMain );
|
||||
this->Layout();
|
||||
bSizerMain->Fit( this );
|
||||
}
|
||||
|
||||
PANEL_3D_OPENGL_OPTIONS_BASE::~PANEL_3D_OPENGL_OPTIONS_BASE()
|
||||
{
|
||||
}
|
|
@ -0,0 +1,809 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<wxFormBuilder_Project>
|
||||
<FileVersion major="1" minor="15" />
|
||||
<object class="Project" expanded="1">
|
||||
<property name="class_decoration"></property>
|
||||
<property name="code_generation">C++</property>
|
||||
<property name="disconnect_events">1</property>
|
||||
<property name="disconnect_mode">source_name</property>
|
||||
<property name="disconnect_php_events">0</property>
|
||||
<property name="disconnect_python_events">0</property>
|
||||
<property name="embedded_files_path">res</property>
|
||||
<property name="encoding">UTF-8</property>
|
||||
<property name="event_generation">connect</property>
|
||||
<property name="file">panel_3D_opengl_options_base</property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="indent_with_spaces"></property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">panel_3D_opengl_optionS_base</property>
|
||||
<property name="namespace"></property>
|
||||
<property name="path">.</property>
|
||||
<property name="precompiled_header"></property>
|
||||
<property name="relative_path">1</property>
|
||||
<property name="skip_lua_events">1</property>
|
||||
<property name="skip_php_events">1</property>
|
||||
<property name="skip_python_events">1</property>
|
||||
<property name="ui_table">UI</property>
|
||||
<property name="use_enum">0</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<object class="Panel" expanded="1">
|
||||
<property name="aui_managed">0</property>
|
||||
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="event_handler">impl_virtual</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">PANEL_3D_OPENGL_OPTIONS_BASE</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size">-1,-1</property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style">wxTAB_TRAVERSAL</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizerMain</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizerMargins</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Rendering Options</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">sbSizerOpenGLRenderoptions</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="parent">1</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Show model bounding boxes</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_checkBoxBoundingBoxes</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Show copper thickness</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_checkBoxCuThickness</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Highlight items on rollover</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_checkBoxHighlightOnRollOver</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag"></property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxGridSizer" expanded="1">
|
||||
<property name="cols">2</property>
|
||||
<property name="hgap">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">gSizer1</property>
|
||||
<property name="permission">none</property>
|
||||
<property name="rows">0</property>
|
||||
<property name="vgap">0</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Anti-aliasing:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticText221</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxChoice" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="choices">"Disabled" "2x" "4x" "8x"</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_choiceAntiAliasing</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selection">0</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip">3D-Viewer must be closed and re-opened to apply this setting</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Selection color:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_selectionColorLabel</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="CustomControl" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="class">COLOR_SWATCH</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="construction"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="declaration"></property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="include"></property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_selectionColorSwatch</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="settings"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="subclass">COLOR_SWATCH; widgets/color_swatch.h; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">While Moving</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">sbSizerWhileMoving</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="parent">1</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Disable anti-aliasing</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_checkBoxDisableAAMove</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Disable thickness</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_checkBoxDisableMoveThickness</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Disable vias</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_checkBoxDisableMoveVias</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Disable holes</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_checkBoxDisableMoveHoles</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</wxFormBuilder_Project>
|
|
@ -0,0 +1,56 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
#include <wx/intl.h>
|
||||
class COLOR_SWATCH;
|
||||
|
||||
#include <wx/string.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/font.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/panel.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class PANEL_3D_OPENGL_OPTIONS_BASE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class PANEL_3D_OPENGL_OPTIONS_BASE : public wxPanel
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxCheckBox* m_checkBoxBoundingBoxes;
|
||||
wxCheckBox* m_checkBoxCuThickness;
|
||||
wxCheckBox* m_checkBoxHighlightOnRollOver;
|
||||
wxStaticText* m_staticText221;
|
||||
wxChoice* m_choiceAntiAliasing;
|
||||
wxStaticText* m_selectionColorLabel;
|
||||
COLOR_SWATCH* m_selectionColorSwatch;
|
||||
wxCheckBox* m_checkBoxDisableAAMove;
|
||||
wxCheckBox* m_checkBoxDisableMoveThickness;
|
||||
wxCheckBox* m_checkBoxDisableMoveVias;
|
||||
wxCheckBox* m_checkBoxDisableMoveHoles;
|
||||
|
||||
public:
|
||||
|
||||
PANEL_3D_OPENGL_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
||||
~PANEL_3D_OPENGL_OPTIONS_BASE();
|
||||
|
||||
};
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2014-2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2014-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -22,71 +22,23 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "dialog_3D_view_option_base.h"
|
||||
#include "panel_3D_raytracing_options.h"
|
||||
#include <3d_canvas/board_adapter.h>
|
||||
#include <3d_viewer/eda_3d_viewer.h>
|
||||
#include <3d_viewer/tools/3d_controller.h>
|
||||
#include <bitmaps.h>
|
||||
#include <tool/tool_manager.h>
|
||||
|
||||
class DIALOG_3D_VIEW_OPTIONS : public DIALOG_3D_VIEW_OPTIONS_BASE
|
||||
PANEL_3D_RAYTRACING_OPTIONS::PANEL_3D_RAYTRACING_OPTIONS( EDA_3D_VIEWER* aFrame,
|
||||
wxWindow* aParent ) :
|
||||
PANEL_3D_RAYTRACING_OPTIONS_BASE( aParent ),
|
||||
m_settings( aFrame->GetAdapter() ),
|
||||
m_canvas( aFrame->GetCanvas() )
|
||||
{
|
||||
public:
|
||||
explicit DIALOG_3D_VIEW_OPTIONS( EDA_3D_VIEWER* aParent );
|
||||
|
||||
EDA_3D_VIEWER* GetParent()
|
||||
{
|
||||
return static_cast<EDA_3D_VIEWER*>( DIALOG_SHIM::GetParent() );
|
||||
}
|
||||
|
||||
void OnCheckEnableAnimation( wxCommandEvent& WXUNUSED( event ) ) override;
|
||||
void OnLightsResetToDefaults( wxCommandEvent& event ) override;
|
||||
|
||||
/// Automatically called when clicking on the OK button
|
||||
bool TransferDataFromWindow() override;
|
||||
|
||||
/// Automatically called after creating the dialog
|
||||
bool TransferDataToWindow() override;
|
||||
|
||||
void TransferColorDataToWindow();
|
||||
|
||||
private:
|
||||
BOARD_ADAPTER& m_settings;
|
||||
EDA_3D_CANVAS* m_canvas;
|
||||
};
|
||||
|
||||
|
||||
void EDA_3D_VIEWER::Install3DViewOptionDialog( wxCommandEvent& event )
|
||||
{
|
||||
DIALOG_3D_VIEW_OPTIONS dlg( this );
|
||||
|
||||
if( dlg.ShowModal() == wxID_OK )
|
||||
{
|
||||
NewDisplay( true );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DIALOG_3D_VIEW_OPTIONS::DIALOG_3D_VIEW_OPTIONS( EDA_3D_VIEWER* aParent ) :
|
||||
DIALOG_3D_VIEW_OPTIONS_BASE( aParent ),
|
||||
m_settings( aParent->GetAdapter() ),
|
||||
m_canvas( aParent->GetCanvas() )
|
||||
{
|
||||
m_sdbSizerOK->SetDefault();
|
||||
|
||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||
finishDialogSettings();
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_3D_VIEW_OPTIONS::OnCheckEnableAnimation( wxCommandEvent& event )
|
||||
{
|
||||
m_staticAnimationSpeed->Enable( m_checkBoxEnableAnimation->GetValue() );
|
||||
m_sliderAnimationSpeed->Enable( m_checkBoxEnableAnimation->GetValue() );
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_3D_VIEW_OPTIONS::OnLightsResetToDefaults( wxCommandEvent& event )
|
||||
void PANEL_3D_RAYTRACING_OPTIONS::ResetPanel()
|
||||
{
|
||||
m_settings.m_RtCameraLightColor = SFVEC3F( 0.2f );
|
||||
m_settings.m_RtLightColorTop = SFVEC3F( 0.247f );
|
||||
|
@ -116,7 +68,7 @@ void DIALOG_3D_VIEW_OPTIONS::OnLightsResetToDefaults( wxCommandEvent& event )
|
|||
}
|
||||
|
||||
|
||||
void DIALOG_3D_VIEW_OPTIONS::TransferColorDataToWindow()
|
||||
void PANEL_3D_RAYTRACING_OPTIONS::TransferColorDataToWindow()
|
||||
{
|
||||
auto Transfer_color = [] ( const SFVEC3F& aSource, wxColourPickerCtrl *aTarget )
|
||||
{
|
||||
|
@ -137,8 +89,6 @@ void DIALOG_3D_VIEW_OPTIONS::TransferColorDataToWindow()
|
|||
Transfer_color( m_settings.m_RtLightColor[6], m_colourPickerLight7 );
|
||||
Transfer_color( m_settings.m_RtLightColor[7], m_colourPickerLight8 );
|
||||
|
||||
Transfer_color( m_settings.m_OpenGlSelectionColor, m_colourPickerSelection );
|
||||
|
||||
m_spinCtrlLightElevation1->SetValue(
|
||||
(int)( m_settings.m_RtLightSphericalCoords[0].x * 180.0f - 90.0f ) );
|
||||
m_spinCtrlLightElevation2->SetValue(
|
||||
|
@ -175,42 +125,8 @@ void DIALOG_3D_VIEW_OPTIONS::TransferColorDataToWindow()
|
|||
}
|
||||
|
||||
|
||||
bool DIALOG_3D_VIEW_OPTIONS::TransferDataToWindow()
|
||||
bool PANEL_3D_RAYTRACING_OPTIONS::TransferDataToWindow()
|
||||
{
|
||||
// Check/uncheck checkboxes
|
||||
m_checkBoxRealisticMode->SetValue( m_settings.GetFlag( FL_USE_REALISTIC_MODE ) );
|
||||
m_checkBoxBoardBody->SetValue( m_settings.GetFlag( FL_SHOW_BOARD_BODY ) );
|
||||
m_checkBoxAreas->SetValue( m_settings.GetFlag( FL_ZONE ) );
|
||||
|
||||
m_checkBox3DshapesTH->SetValue( m_settings.GetFlag( FL_FP_ATTRIBUTES_NORMAL ) );
|
||||
m_checkBox3DshapesSMD->SetValue( m_settings.GetFlag( FL_FP_ATTRIBUTES_NORMAL_INSERT ) );
|
||||
m_checkBox3DshapesVirtual->SetValue( m_settings.GetFlag( FL_FP_ATTRIBUTES_VIRTUAL ) );
|
||||
|
||||
m_checkBoxSilkscreen->SetValue( m_settings.GetFlag( FL_SILKSCREEN ) );
|
||||
m_checkBoxSolderMask->SetValue( m_settings.GetFlag( FL_SOLDERMASK ) );
|
||||
m_checkBoxSolderpaste->SetValue( m_settings.GetFlag( FL_SOLDERPASTE ) );
|
||||
m_checkBoxAdhesive->SetValue( m_settings.GetFlag( FL_ADHESIVE ) );
|
||||
m_checkBoxComments->SetValue( m_settings.GetFlag( FL_COMMENTS ) );
|
||||
m_checkBoxECO->SetValue( m_settings.GetFlag( FL_ECO ) );
|
||||
m_checkBoxSubtractMaskFromSilk->SetValue( m_settings.GetFlag( FL_SUBTRACT_MASK_FROM_SILK ) );
|
||||
m_checkBoxClipSilkOnViaAnnulus->SetValue( m_settings.GetFlag( FL_CLIP_SILK_ON_VIA_ANNULUS ) );
|
||||
m_checkBoxRenderPlatedPadsAsPlated->SetValue(
|
||||
m_settings.GetFlag( FL_RENDER_PLATED_PADS_AS_PLATED ) );
|
||||
|
||||
// OpenGL options
|
||||
m_checkBoxCuThickness->SetValue( m_settings.GetFlag( FL_RENDER_OPENGL_COPPER_THICKNESS ) );
|
||||
m_checkBoxBoundingBoxes->SetValue( m_settings.GetFlag( FL_RENDER_OPENGL_SHOW_MODEL_BBOX ) );
|
||||
m_checkBoxHighlightOnRollOver->SetValue( m_settings.GetFlag( FL_HIGHLIGHT_ROLLOVER_ITEM ) );
|
||||
m_checkBoxDisableAAMove->SetValue( m_settings.GetFlag( FL_RENDER_OPENGL_AA_DISABLE_ON_MOVE ) );
|
||||
m_checkBoxDisableMoveThickness->SetValue(
|
||||
m_settings.GetFlag( FL_RENDER_OPENGL_THICKNESS_DISABLE_ON_MOVE ) );
|
||||
m_checkBoxDisableMoveVias->SetValue(
|
||||
m_settings.GetFlag( FL_RENDER_OPENGL_VIAS_DISABLE_ON_MOVE ) );
|
||||
m_checkBoxDisableMoveHoles->SetValue(
|
||||
m_settings.GetFlag( FL_RENDER_OPENGL_HOLES_DISABLE_ON_MOVE ) );
|
||||
m_choiceAntiAliasing->SetSelection( static_cast<int>( m_settings.GetAntiAliasingMode() ) );
|
||||
|
||||
// Raytracing options
|
||||
m_checkBoxRaytracing_renderShadows->SetValue(
|
||||
m_settings.GetFlag( FL_RENDER_RAYTRACING_SHADOWS ) );
|
||||
m_checkBoxRaytracing_addFloor->SetValue( m_settings.GetFlag( FL_RENDER_RAYTRACING_BACKFLOOR ) );
|
||||
|
@ -240,60 +156,12 @@ bool DIALOG_3D_VIEW_OPTIONS::TransferDataToWindow()
|
|||
|
||||
TransferColorDataToWindow();
|
||||
|
||||
// Camera Options
|
||||
m_checkBoxEnableAnimation->SetValue( m_canvas->AnimationEnabledGet() );
|
||||
m_sliderAnimationSpeed->SetValue( m_canvas->MovingSpeedMultiplierGet() );
|
||||
m_staticAnimationSpeed->Enable( m_canvas->AnimationEnabledGet() );
|
||||
m_sliderAnimationSpeed->Enable( m_canvas->AnimationEnabledGet() );
|
||||
|
||||
EDA_3D_CONTROLLER* ctrlTool = GetParent()->GetToolManager()->GetTool<EDA_3D_CONTROLLER>();
|
||||
m_spinCtrlRotationAngle->SetValue( ctrlTool->GetRotationIncrement() );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool DIALOG_3D_VIEW_OPTIONS::TransferDataFromWindow()
|
||||
bool PANEL_3D_RAYTRACING_OPTIONS::TransferDataFromWindow()
|
||||
{
|
||||
// Set render mode
|
||||
m_settings.SetFlag( FL_USE_REALISTIC_MODE, m_checkBoxRealisticMode->GetValue() );
|
||||
|
||||
// Set visibility of items
|
||||
m_settings.SetFlag( FL_SHOW_BOARD_BODY, m_checkBoxBoardBody->GetValue() );
|
||||
m_settings.SetFlag( FL_ZONE, m_checkBoxAreas->GetValue() );
|
||||
m_settings.SetFlag( FL_SUBTRACT_MASK_FROM_SILK, m_checkBoxSubtractMaskFromSilk->GetValue() );
|
||||
m_settings.SetFlag( FL_CLIP_SILK_ON_VIA_ANNULUS, m_checkBoxClipSilkOnViaAnnulus->GetValue() );
|
||||
m_settings.SetFlag( FL_RENDER_PLATED_PADS_AS_PLATED,
|
||||
m_checkBoxRenderPlatedPadsAsPlated->GetValue() );
|
||||
|
||||
// Set 3D shapes visibility
|
||||
m_settings.SetFlag( FL_FP_ATTRIBUTES_NORMAL, m_checkBox3DshapesTH->GetValue() );
|
||||
m_settings.SetFlag( FL_FP_ATTRIBUTES_NORMAL_INSERT, m_checkBox3DshapesSMD->GetValue() );
|
||||
m_settings.SetFlag( FL_FP_ATTRIBUTES_VIRTUAL, m_checkBox3DshapesVirtual->GetValue() );
|
||||
|
||||
// Set Layer visibility
|
||||
m_settings.SetFlag( FL_SILKSCREEN, m_checkBoxSilkscreen->GetValue() );
|
||||
m_settings.SetFlag( FL_SOLDERMASK, m_checkBoxSolderMask->GetValue() );
|
||||
m_settings.SetFlag( FL_SOLDERPASTE, m_checkBoxSolderpaste->GetValue() );
|
||||
m_settings.SetFlag( FL_ADHESIVE, m_checkBoxAdhesive->GetValue() );
|
||||
m_settings.SetFlag( FL_COMMENTS, m_checkBoxComments->GetValue() );
|
||||
m_settings.SetFlag( FL_ECO, m_checkBoxECO->GetValue( ) );
|
||||
|
||||
// OpenGL options
|
||||
m_settings.SetFlag( FL_RENDER_OPENGL_COPPER_THICKNESS, m_checkBoxCuThickness->GetValue() );
|
||||
m_settings.SetFlag( FL_RENDER_OPENGL_SHOW_MODEL_BBOX, m_checkBoxBoundingBoxes->GetValue() );
|
||||
m_settings.SetFlag( FL_HIGHLIGHT_ROLLOVER_ITEM, m_checkBoxHighlightOnRollOver->GetValue() );
|
||||
m_settings.SetFlag( FL_RENDER_OPENGL_AA_DISABLE_ON_MOVE, m_checkBoxDisableAAMove->GetValue() );
|
||||
m_settings.SetFlag( FL_RENDER_OPENGL_THICKNESS_DISABLE_ON_MOVE,
|
||||
m_checkBoxDisableMoveThickness->GetValue() );
|
||||
m_settings.SetFlag( FL_RENDER_OPENGL_VIAS_DISABLE_ON_MOVE,
|
||||
m_checkBoxDisableMoveVias->GetValue() );
|
||||
m_settings.SetFlag( FL_RENDER_OPENGL_HOLES_DISABLE_ON_MOVE,
|
||||
m_checkBoxDisableMoveHoles->GetValue() );
|
||||
m_settings.SetAntiAliasingMode(
|
||||
static_cast<ANTIALIASING_MODE>( m_choiceAntiAliasing->GetSelection() ) );
|
||||
|
||||
// Raytracing options
|
||||
m_settings.SetFlag( FL_RENDER_RAYTRACING_SHADOWS,
|
||||
m_checkBoxRaytracing_renderShadows->GetValue() );
|
||||
m_settings.SetFlag( FL_RENDER_RAYTRACING_BACKFLOOR,
|
||||
|
@ -343,8 +211,6 @@ bool DIALOG_3D_VIEW_OPTIONS::TransferDataFromWindow()
|
|||
Transfer_color( m_settings.m_RtLightColor[6], m_colourPickerLight7 );
|
||||
Transfer_color( m_settings.m_RtLightColor[7], m_colourPickerLight8 );
|
||||
|
||||
Transfer_color( m_settings.m_OpenGlSelectionColor, m_colourPickerSelection );
|
||||
|
||||
m_settings.m_RtLightSphericalCoords[0].x =
|
||||
( m_spinCtrlLightElevation1->GetValue() + 90.0f ) / 180.0f;
|
||||
m_settings.m_RtLightSphericalCoords[1].x =
|
||||
|
@ -380,12 +246,5 @@ bool DIALOG_3D_VIEW_OPTIONS::TransferDataFromWindow()
|
|||
glm::clamp( m_settings.m_RtLightSphericalCoords[i].y, 0.0f, 2.0f );
|
||||
}
|
||||
|
||||
// Camera Options
|
||||
m_canvas->AnimationEnabledSet( m_checkBoxEnableAnimation->GetValue() );
|
||||
m_canvas->MovingSpeedMultiplierSet( m_sliderAnimationSpeed->GetValue() );
|
||||
|
||||
EDA_3D_CONTROLLER* ctrlTool = GetParent()->GetToolManager()->GetTool<EDA_3D_CONTROLLER>();
|
||||
ctrlTool->SetRotationIncrement( m_spinCtrlRotationAngle->GetValue() );
|
||||
|
||||
return true;
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2014-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, you may find one here:
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||
* or you may write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef PANEL_3D_RAYTRACING_OPTIONS_H
|
||||
#define PANEL_3D_RAYTRACING_OPTIONS_H
|
||||
|
||||
#include "panel_3D_raytracing_options_base.h"
|
||||
#include <3d_viewer/eda_3d_viewer.h>
|
||||
|
||||
class PANEL_3D_RAYTRACING_OPTIONS : public PANEL_3D_RAYTRACING_OPTIONS_BASE
|
||||
{
|
||||
public:
|
||||
explicit PANEL_3D_RAYTRACING_OPTIONS( EDA_3D_VIEWER* aFrame, wxWindow* aParent );
|
||||
|
||||
void ResetPanel() override;
|
||||
|
||||
/// Automatically called when clicking on the OK button
|
||||
bool TransferDataFromWindow() override;
|
||||
|
||||
/// Automatically called after creating the dialog
|
||||
bool TransferDataToWindow() override;
|
||||
|
||||
void TransferColorDataToWindow();
|
||||
|
||||
private:
|
||||
BOARD_ADAPTER& m_settings;
|
||||
EDA_3D_CANVAS* m_canvas;
|
||||
};
|
||||
|
||||
|
||||
#endif // PANEL_3D_RAYTRACING_OPTIONS_H
|
|
@ -0,0 +1,339 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "panel_3D_raytracing_options_base.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
PANEL_3D_RAYTRACING_OPTIONS_BASE::PANEL_3D_RAYTRACING_OPTIONS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : RESETTABLE_PANEL( parent, id, pos, size, style, name )
|
||||
{
|
||||
wxBoxSizer* bSizerMain;
|
||||
bSizerMain = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxBoxSizer* bSizerMargins;
|
||||
bSizerMargins = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxStaticBoxSizer* sbSizerRaytracingRenderOptions;
|
||||
sbSizerRaytracingRenderOptions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Rendering Options") ), wxVERTICAL );
|
||||
|
||||
sbSizerRaytracingRenderOptions->SetMinSize( wxSize( -1,32 ) );
|
||||
wxGridSizer* gSizer1;
|
||||
gSizer1 = new wxGridSizer( 0, 1, 0, 20 );
|
||||
|
||||
m_checkBoxRaytracing_proceduralTextures = new wxCheckBox( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, _("Procedural textures (slow)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkBoxRaytracing_proceduralTextures->SetValue(true);
|
||||
gSizer1->Add( m_checkBoxRaytracing_proceduralTextures, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_checkBoxRaytracing_addFloor = new wxCheckBox( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, _("Add floor (slow)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkBoxRaytracing_addFloor->SetValue(true);
|
||||
gSizer1->Add( m_checkBoxRaytracing_addFloor, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_checkBoxRaytracing_antiAliasing = new wxCheckBox( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, _("Anti-aliasing (slow)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkBoxRaytracing_antiAliasing->SetValue(true);
|
||||
gSizer1->Add( m_checkBoxRaytracing_antiAliasing, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_checkBoxRaytracing_postProcessing = new wxCheckBox( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, _("Screen space ambient occlusions and global illumination reflections (slow)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkBoxRaytracing_postProcessing->SetValue(true);
|
||||
gSizer1->Add( m_checkBoxRaytracing_postProcessing, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
sbSizerRaytracingRenderOptions->Add( gSizer1, 1, wxEXPAND|wxBOTTOM, 5 );
|
||||
|
||||
wxFlexGridSizer* fgSizer111;
|
||||
fgSizer111 = new wxFlexGridSizer( 0, 4, 4, 8 );
|
||||
fgSizer111->SetFlexibleDirection( wxBOTH );
|
||||
fgSizer111->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
|
||||
fgSizer111->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
m_staticText19 = new wxStaticText( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, _("Number of Samples"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText19->Wrap( -1 );
|
||||
fgSizer111->Add( m_staticText19, 0, wxLEFT|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_staticText201 = new wxStaticText( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, _("Spread Factor %"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText201->Wrap( -1 );
|
||||
fgSizer111->Add( m_staticText201, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_staticText211 = new wxStaticText( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, _("Recursion Level"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText211->Wrap( -1 );
|
||||
fgSizer111->Add( m_staticText211, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_checkBoxRaytracing_renderShadows = new wxCheckBox( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, _("Shadows:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkBoxRaytracing_renderShadows->SetValue(true);
|
||||
fgSizer111->Add( m_checkBoxRaytracing_renderShadows, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_spinCtrl_NrSamples_Shadows = new wxSpinCtrl( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, 1, 64, 0 );
|
||||
m_spinCtrl_NrSamples_Shadows->SetToolTip( _("Number of rays that will be cast, into light direction, to evaluate a shadow point") );
|
||||
|
||||
fgSizer111->Add( m_spinCtrl_NrSamples_Shadows, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_spinCtrlDouble_SpreadFactor_Shadows = new wxSpinCtrlDouble( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, 0.1, 25, 0, 1 );
|
||||
m_spinCtrlDouble_SpreadFactor_Shadows->SetDigits( 1 );
|
||||
m_spinCtrlDouble_SpreadFactor_Shadows->SetToolTip( _("Random direction factor of the cast rays") );
|
||||
|
||||
fgSizer111->Add( m_spinCtrlDouble_SpreadFactor_Shadows, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
fgSizer111->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
m_checkBoxRaytracing_showReflections = new wxCheckBox( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, _("Reflections:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkBoxRaytracing_showReflections->SetValue(true);
|
||||
fgSizer111->Add( m_checkBoxRaytracing_showReflections, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_spinCtrl_NrSamples_Reflections = new wxSpinCtrl( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, 1, 32, 0 );
|
||||
m_spinCtrl_NrSamples_Reflections->SetToolTip( _("Number of rays that will be cast to evaluate a reflection point") );
|
||||
|
||||
fgSizer111->Add( m_spinCtrl_NrSamples_Reflections, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spinCtrlDouble_SpreadFactor_Reflections = new wxSpinCtrlDouble( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, 0.1, 25, 0, 1 );
|
||||
m_spinCtrlDouble_SpreadFactor_Reflections->SetDigits( 1 );
|
||||
m_spinCtrlDouble_SpreadFactor_Reflections->SetToolTip( _("Random direction factor of the cast rays") );
|
||||
|
||||
fgSizer111->Add( m_spinCtrlDouble_SpreadFactor_Reflections, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_spinCtrlRecursiveLevel_Reflections = new wxSpinCtrl( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, 1, 5, 0 );
|
||||
m_spinCtrlRecursiveLevel_Reflections->SetToolTip( _("Interactions number that a ray can travel through objects. (higher number of levels improve results, specially on very transparent boards)") );
|
||||
|
||||
fgSizer111->Add( m_spinCtrlRecursiveLevel_Reflections, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_checkBoxRaytracing_showRefractions = new wxCheckBox( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, _("Refractions:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkBoxRaytracing_showRefractions->SetValue(true);
|
||||
fgSizer111->Add( m_checkBoxRaytracing_showRefractions, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||
|
||||
m_spinCtrl_NrSamples_Refractions = new wxSpinCtrl( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, 1, 5, 0 );
|
||||
m_spinCtrl_NrSamples_Refractions->SetToolTip( _("Number of rays that will be cast to evaluate a refraction point") );
|
||||
|
||||
fgSizer111->Add( m_spinCtrl_NrSamples_Refractions, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_spinCtrlDouble_SpreadFactor_Refractions = new wxSpinCtrlDouble( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, 0.1, 25, 0, 1 );
|
||||
m_spinCtrlDouble_SpreadFactor_Refractions->SetDigits( 1 );
|
||||
m_spinCtrlDouble_SpreadFactor_Refractions->SetToolTip( _("Random direction factor of the cast rays") );
|
||||
|
||||
fgSizer111->Add( m_spinCtrlDouble_SpreadFactor_Refractions, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_spinCtrlRecursiveLevel_Refractions = new wxSpinCtrl( sbSizerRaytracingRenderOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, 1, 7, 0 );
|
||||
m_spinCtrlRecursiveLevel_Refractions->SetToolTip( _("Number of bounces that a ray can hit reflective objects") );
|
||||
|
||||
fgSizer111->Add( m_spinCtrlRecursiveLevel_Refractions, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
sbSizerRaytracingRenderOptions->Add( fgSizer111, 0, wxTOP|wxBOTTOM|wxRIGHT|wxEXPAND, 5 );
|
||||
|
||||
|
||||
sbSizerRaytracingRenderOptions->Add( 0, 3, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerMargins->Add( sbSizerRaytracingRenderOptions, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbSizerRaytracingLightConfiguration;
|
||||
sbSizerRaytracingLightConfiguration = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Lights Configuration") ), wxVERTICAL );
|
||||
|
||||
wxBoxSizer* bSizer11;
|
||||
bSizer11 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_staticText17 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("Ambient camera light:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText17->Wrap( -1 );
|
||||
bSizer11->Add( m_staticText17, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_colourPickerCameraLight = new wxColourPickerCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxColour( 51, 51, 51 ), wxDefaultPosition, wxSize( 72,-1 ), wxCLRP_DEFAULT_STYLE );
|
||||
bSizer11->Add( m_colourPickerCameraLight, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
bSizer11->Add( 0, 0, 1, 0, 5 );
|
||||
|
||||
m_staticText5 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("Top light:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText5->Wrap( -1 );
|
||||
bSizer11->Add( m_staticText5, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_colourPickerTopLight = new wxColourPickerCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxColour( 63, 63, 63 ), wxDefaultPosition, wxSize( 72,-1 ), wxCLRP_DEFAULT_STYLE );
|
||||
bSizer11->Add( m_colourPickerTopLight, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
bSizer11->Add( 0, 0, 1, 0, 5 );
|
||||
|
||||
m_staticText6 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("Bottom light:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText6->Wrap( -1 );
|
||||
bSizer11->Add( m_staticText6, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_colourPickerBottomLight = new wxColourPickerCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxColour( 63, 63, 63 ), wxDefaultPosition, wxSize( 72,-1 ), wxCLRP_DEFAULT_STYLE );
|
||||
bSizer11->Add( m_colourPickerBottomLight, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||
|
||||
|
||||
sbSizerRaytracingLightConfiguration->Add( bSizer11, 0, wxEXPAND|wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
wxFlexGridSizer* fgSizer11;
|
||||
fgSizer11 = new wxFlexGridSizer( 0, 9, 0, 0 );
|
||||
fgSizer11->AddGrowableCol( 4 );
|
||||
fgSizer11->SetFlexibleDirection( wxHORIZONTAL );
|
||||
fgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
|
||||
fgSizer11->Add( 0, 0, 0, 0, 5 );
|
||||
|
||||
|
||||
fgSizer11->Add( 0, 0, 0, 0, 5 );
|
||||
|
||||
m_staticText20 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("Elevation (deg)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText20->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticText20, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_staticText18 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("Azimuth (deg)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText18->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticText18, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
fgSizer11->Add( 0, 0, 0, 0, 5 );
|
||||
|
||||
|
||||
fgSizer11->Add( 0, 0, 0, 0, 5 );
|
||||
|
||||
|
||||
fgSizer11->Add( 0, 0, 0, 0, 5 );
|
||||
|
||||
m_staticText27 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("Elevation (deg)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText27->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticText27, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_staticText28 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("Azimuth (deg)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText28->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticText28, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_staticText21 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("Light 1:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText21->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticText21, 0, wxALIGN_CENTER|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_colourPickerLight1 = new wxColourPickerCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, *wxBLACK, wxDefaultPosition, wxSize( 72,-1 ), wxCLRP_DEFAULT_STYLE );
|
||||
fgSizer11->Add( m_colourPickerLight1, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spinCtrlLightElevation1 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, -90, 90, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightElevation1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
m_spinCtrlLightAzimuth1 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 359, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightAzimuth1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
|
||||
fgSizer11->Add( 10, 0, 0, 0, 5 );
|
||||
|
||||
m_staticText22 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("Light 5:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText22->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticText22, 0, wxALIGN_CENTER|wxLEFT, 5 );
|
||||
|
||||
m_colourPickerLight5 = new wxColourPickerCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, *wxBLACK, wxDefaultPosition, wxSize( 72,-1 ), wxCLRP_DEFAULT_STYLE );
|
||||
fgSizer11->Add( m_colourPickerLight5, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spinCtrlLightElevation5 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, -90, 90, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightElevation5, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
m_spinCtrlLightAzimuth5 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 359, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightAzimuth5, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
m_staticText23 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("Light 2:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText23->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticText23, 0, wxALIGN_CENTER, 5 );
|
||||
|
||||
m_colourPickerLight2 = new wxColourPickerCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, *wxBLACK, wxDefaultPosition, wxSize( 72,-1 ), wxCLRP_DEFAULT_STYLE );
|
||||
fgSizer11->Add( m_colourPickerLight2, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spinCtrlLightElevation2 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, -90, 90, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightElevation2, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
m_spinCtrlLightAzimuth2 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 359, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightAzimuth2, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
|
||||
fgSizer11->Add( 0, 0, 0, 0, 5 );
|
||||
|
||||
m_staticText24 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("Light 6:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText24->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticText24, 0, wxALIGN_CENTER|wxLEFT, 5 );
|
||||
|
||||
m_colourPickerLight6 = new wxColourPickerCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, *wxBLACK, wxDefaultPosition, wxSize( 72,-1 ), wxCLRP_DEFAULT_STYLE );
|
||||
fgSizer11->Add( m_colourPickerLight6, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spinCtrlLightElevation6 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, -90, 90, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightElevation6, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
m_spinCtrlLightAzimuth6 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 359, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightAzimuth6, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
m_staticText25 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("Light 3:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText25->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticText25, 0, wxALIGN_CENTER, 5 );
|
||||
|
||||
m_colourPickerLight3 = new wxColourPickerCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, *wxBLACK, wxDefaultPosition, wxSize( 72,-1 ), wxCLRP_DEFAULT_STYLE );
|
||||
fgSizer11->Add( m_colourPickerLight3, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spinCtrlLightElevation3 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, -90, 90, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightElevation3, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
m_spinCtrlLightAzimuth3 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 359, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightAzimuth3, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
|
||||
fgSizer11->Add( 0, 0, 0, 0, 5 );
|
||||
|
||||
m_staticText26 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("Light 7:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText26->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticText26, 0, wxALIGN_CENTER|wxLEFT, 5 );
|
||||
|
||||
m_colourPickerLight7 = new wxColourPickerCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, *wxBLACK, wxDefaultPosition, wxSize( 72,-1 ), wxCLRP_DEFAULT_STYLE );
|
||||
fgSizer11->Add( m_colourPickerLight7, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spinCtrlLightElevation7 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, -90, 90, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightElevation7, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
m_spinCtrlLightAzimuth7 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 359, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightAzimuth7, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
m_staticText171 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("Light 4:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText171->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticText171, 0, wxALIGN_CENTER, 5 );
|
||||
|
||||
m_colourPickerLight4 = new wxColourPickerCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, *wxBLACK, wxDefaultPosition, wxSize( 72,-1 ), wxCLRP_DEFAULT_STYLE );
|
||||
fgSizer11->Add( m_colourPickerLight4, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spinCtrlLightElevation4 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, -90, 90, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightElevation4, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
m_spinCtrlLightAzimuth4 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 359, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightAzimuth4, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
|
||||
fgSizer11->Add( 0, 0, 0, 0, 5 );
|
||||
|
||||
m_staticText181 = new wxStaticText( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, _("Light 8:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText181->Wrap( -1 );
|
||||
fgSizer11->Add( m_staticText181, 0, wxALIGN_CENTER|wxLEFT, 5 );
|
||||
|
||||
m_colourPickerLight8 = new wxColourPickerCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, *wxBLACK, wxDefaultPosition, wxSize( 72,-1 ), wxCLRP_DEFAULT_STYLE );
|
||||
fgSizer11->Add( m_colourPickerLight8, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spinCtrlLightElevation8 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS, -90, 90, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightElevation8, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
m_spinCtrlLightAzimuth8 = new wxSpinCtrl( sbSizerRaytracingLightConfiguration->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 124,-1 ), wxSP_ARROW_KEYS|wxSP_WRAP, 0, 359, 0 );
|
||||
fgSizer11->Add( m_spinCtrlLightAzimuth8, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 1 );
|
||||
|
||||
|
||||
sbSizerRaytracingLightConfiguration->Add( fgSizer11, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizerMargins->Add( sbSizerRaytracingLightConfiguration, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizerMain->Add( bSizerMargins, 1, wxEXPAND|wxRIGHT, 5 );
|
||||
|
||||
|
||||
this->SetSizer( bSizerMain );
|
||||
this->Layout();
|
||||
bSizerMain->Fit( this );
|
||||
}
|
||||
|
||||
PANEL_3D_RAYTRACING_OPTIONS_BASE::~PANEL_3D_RAYTRACING_OPTIONS_BASE()
|
||||
{
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -10,7 +10,7 @@
|
|||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
#include <wx/intl.h>
|
||||
#include "dialog_shim.h"
|
||||
#include "widgets/resettable_panel.h"
|
||||
#include <wx/string.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/gdicmn.h>
|
||||
|
@ -18,71 +18,23 @@
|
|||
#include <wx/colour.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/spinctrl.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/slider.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/icon.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/clrpicker.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/notebook.h>
|
||||
#include <wx/dialog.h>
|
||||
#include <wx/panel.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class DIALOG_3D_VIEW_OPTIONS_BASE
|
||||
/// Class PANEL_3D_RAYTRACING_OPTIONS_BASE
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class DIALOG_3D_VIEW_OPTIONS_BASE : public DIALOG_SHIM
|
||||
class PANEL_3D_RAYTRACING_OPTIONS_BASE : public RESETTABLE_PANEL
|
||||
{
|
||||
private:
|
||||
|
||||
protected:
|
||||
wxNotebook* m_notebook;
|
||||
wxPanel* m_panelDspOpt;
|
||||
wxCheckBox* m_checkBox3DshapesTH;
|
||||
wxCheckBox* m_checkBox3DshapesSMD;
|
||||
wxCheckBox* m_checkBox3DshapesVirtual;
|
||||
wxCheckBox* m_checkBoxSilkscreen;
|
||||
wxCheckBox* m_checkBoxSolderMask;
|
||||
wxCheckBox* m_checkBoxSolderpaste;
|
||||
wxCheckBox* m_checkBoxAdhesive;
|
||||
wxCheckBox* m_checkBoxComments;
|
||||
wxCheckBox* m_checkBoxECO;
|
||||
wxCheckBox* m_checkBoxRealisticMode;
|
||||
wxCheckBox* m_checkBoxBoardBody;
|
||||
wxCheckBox* m_checkBoxAreas;
|
||||
wxCheckBox* m_checkBoxSubtractMaskFromSilk;
|
||||
wxCheckBox* m_checkBoxClipSilkOnViaAnnulus;
|
||||
wxCheckBox* m_checkBoxRenderPlatedPadsAsPlated;
|
||||
wxStaticText* m_staticTextRotAngle;
|
||||
wxSpinCtrlDouble* m_spinCtrlRotationAngle;
|
||||
wxStaticText* m_staticTextRotAngleUnits;
|
||||
wxStaticLine* m_staticline3;
|
||||
wxCheckBox* m_checkBoxEnableAnimation;
|
||||
wxStaticText* m_staticAnimationSpeed;
|
||||
wxSlider* m_sliderAnimationSpeed;
|
||||
wxPanel* m_panelOpenGL;
|
||||
wxCheckBox* m_checkBoxBoundingBoxes;
|
||||
wxCheckBox* m_checkBoxCuThickness;
|
||||
wxCheckBox* m_checkBoxHighlightOnRollOver;
|
||||
wxStaticText* m_staticText221;
|
||||
wxChoice* m_choiceAntiAliasing;
|
||||
wxStaticText* m_staticText231;
|
||||
wxColourPickerCtrl* m_colourPickerSelection;
|
||||
wxCheckBox* m_checkBoxDisableAAMove;
|
||||
wxCheckBox* m_checkBoxDisableMoveThickness;
|
||||
wxCheckBox* m_checkBoxDisableMoveVias;
|
||||
wxCheckBox* m_checkBoxDisableMoveHoles;
|
||||
wxPanel* m_panelRaytracing;
|
||||
wxNotebook* m_notebook2;
|
||||
wxPanel* m_panelRaytracingCfg;
|
||||
wxCheckBox* m_checkBoxRaytracing_proceduralTextures;
|
||||
wxCheckBox* m_checkBoxRaytracing_addFloor;
|
||||
wxCheckBox* m_checkBoxRaytracing_antiAliasing;
|
||||
|
@ -101,7 +53,6 @@ class DIALOG_3D_VIEW_OPTIONS_BASE : public DIALOG_SHIM
|
|||
wxSpinCtrl* m_spinCtrl_NrSamples_Refractions;
|
||||
wxSpinCtrlDouble* m_spinCtrlDouble_SpreadFactor_Refractions;
|
||||
wxSpinCtrl* m_spinCtrlRecursiveLevel_Refractions;
|
||||
wxPanel* m_panelLightsConfig;
|
||||
wxStaticText* m_staticText17;
|
||||
wxColourPickerCtrl* m_colourPickerCameraLight;
|
||||
wxStaticText* m_staticText5;
|
||||
|
@ -144,21 +95,11 @@ class DIALOG_3D_VIEW_OPTIONS_BASE : public DIALOG_SHIM
|
|||
wxColourPickerCtrl* m_colourPickerLight8;
|
||||
wxSpinCtrl* m_spinCtrlLightElevation8;
|
||||
wxSpinCtrl* m_spinCtrlLightAzimuth8;
|
||||
wxButton* m_buttonLightsResetToDefaults;
|
||||
wxStdDialogButtonSizer* m_sdbSizer;
|
||||
wxButton* m_sdbSizerOK;
|
||||
wxButton* m_sdbSizerCancel;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnCheckRealisticMode( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnCheckEnableAnimation( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnLightsResetToDefaults( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
|
||||
DIALOG_3D_VIEW_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("3D Display Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 810,484 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_3D_VIEW_OPTIONS_BASE();
|
||||
PANEL_3D_RAYTRACING_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
|
||||
~PANEL_3D_RAYTRACING_OPTIONS_BASE();
|
||||
|
||||
};
|
||||
|
|
@ -22,13 +22,13 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <wx/colordlg.h>
|
||||
#include <wx/colour.h>
|
||||
#include <wx/filename.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/wupdlock.h>
|
||||
#include <wx/clipbrd.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/treebook.h>
|
||||
#include "eda_3d_viewer.h"
|
||||
#include <3d_viewer_settings.h>
|
||||
#include <3d_viewer_id.h>
|
||||
|
@ -38,8 +38,6 @@
|
|||
#include <bitmaps.h>
|
||||
#include <board_design_settings.h>
|
||||
#include <board_stackup_manager/board_stackup.h>
|
||||
#include <board_stackup_manager/stackup_predefined_prms.h>
|
||||
#include <board.h>
|
||||
#include <core/arraydim.h>
|
||||
#include <layers_id_colors_and_visibility.h>
|
||||
#include <gal/dpi_scaling.h>
|
||||
|
@ -53,8 +51,13 @@
|
|||
#include <tool/tool_dispatcher.h>
|
||||
#include <tool/action_toolbar.h>
|
||||
#include <widgets/infobar.h>
|
||||
#include <widgets/paged_dialog.h>
|
||||
#include <dialogs/panel_3D_display_options.h>
|
||||
#include <dialogs/panel_3D_opengl_options.h>
|
||||
#include <dialogs/panel_3D_raytracing_options.h>
|
||||
#include <dialogs/panel_3D_colors.h>
|
||||
#include <panel_hotkeys_editor.h>
|
||||
#include <wildcards_and_files_ext.h>
|
||||
#include <wx/filedlg.h>
|
||||
|
||||
/**
|
||||
* Flag to enable 3D viewer main frame window debug tracing.
|
||||
|
@ -74,8 +77,6 @@ BEGIN_EVENT_TABLE( EDA_3D_VIEWER, EDA_BASE_FRAME )
|
|||
EVT_TOOL_RANGE( ID_START_COMMAND_3D, ID_MENU_COMMAND_END,
|
||||
EDA_3D_VIEWER::Process_Special_Functions )
|
||||
|
||||
EVT_TOOL( ID_TOOL_SET_VISIBLE_ITEMS, EDA_3D_VIEWER::Install3DViewOptionDialog )
|
||||
|
||||
EVT_MENU( wxID_CLOSE, EDA_3D_VIEWER::Exit3DFrame )
|
||||
EVT_MENU( ID_RENDER_CURRENT_VIEW, EDA_3D_VIEWER::OnRenderEngineSelection )
|
||||
EVT_MENU( ID_DISABLE_RAY_TRACING, EDA_3D_VIEWER::OnDisableRayTracing )
|
||||
|
@ -190,7 +191,6 @@ void EDA_3D_VIEWER::setupUIConditions()
|
|||
EDA_3D_CONDITIONS cond( &m_boardAdapter );
|
||||
|
||||
// Helper to define check conditions
|
||||
#define MaterialCheck( x ) ACTION_CONDITIONS().Check( cond.MaterialMode( x ) )
|
||||
#define FlagCheck( x ) ACTION_CONDITIONS().Check( cond.Flag( x ) )
|
||||
#define GridSizeCheck( x ) ACTION_CONDITIONS().Check( cond.GridSize( x ) )
|
||||
|
||||
|
@ -202,27 +202,6 @@ void EDA_3D_VIEWER::setupUIConditions()
|
|||
RegisterUIUpdateHandler( ID_RENDER_CURRENT_VIEW,
|
||||
ACTION_CONDITIONS().Check( raytracingCondition ) );
|
||||
|
||||
mgr->SetConditions( EDA_3D_ACTIONS::materialNormal,
|
||||
MaterialCheck( MATERIAL_MODE::NORMAL ) );
|
||||
mgr->SetConditions( EDA_3D_ACTIONS::materialDiffuse,
|
||||
MaterialCheck( MATERIAL_MODE::DIFFUSE_ONLY ) );
|
||||
mgr->SetConditions( EDA_3D_ACTIONS::materialCAD,
|
||||
MaterialCheck( MATERIAL_MODE::CAD_MODE ) );
|
||||
|
||||
mgr->SetConditions( EDA_3D_ACTIONS::renderShadows,
|
||||
FlagCheck( FL_RENDER_RAYTRACING_SHADOWS ) );
|
||||
mgr->SetConditions( EDA_3D_ACTIONS::proceduralTextures,
|
||||
FlagCheck( FL_RENDER_RAYTRACING_PROCEDURAL_TEXTURES ) );
|
||||
mgr->SetConditions( EDA_3D_ACTIONS::addFloor,
|
||||
FlagCheck( FL_RENDER_RAYTRACING_BACKFLOOR ) );
|
||||
mgr->SetConditions( EDA_3D_ACTIONS::showRefractions,
|
||||
FlagCheck( FL_RENDER_RAYTRACING_REFRACTIONS ) );
|
||||
mgr->SetConditions( EDA_3D_ACTIONS::showReflections,
|
||||
FlagCheck( FL_RENDER_RAYTRACING_REFLECTIONS ) );
|
||||
mgr->SetConditions( EDA_3D_ACTIONS::antiAliasing,
|
||||
FlagCheck( FL_RENDER_RAYTRACING_ANTI_ALIASING ) );
|
||||
mgr->SetConditions( EDA_3D_ACTIONS::postProcessing,
|
||||
FlagCheck( FL_RENDER_RAYTRACING_POST_PROCESSING ) );
|
||||
mgr->SetConditions( EDA_3D_ACTIONS::showBoundingBoxes,
|
||||
FlagCheck( FL_RENDER_OPENGL_SHOW_MODEL_BBOX ) );
|
||||
mgr->SetConditions( EDA_3D_ACTIONS::showAxis,
|
||||
|
@ -236,19 +215,32 @@ void EDA_3D_VIEWER::setupUIConditions()
|
|||
|
||||
|
||||
auto orthoCondition =
|
||||
[this] ( const SELECTION& )
|
||||
{
|
||||
return m_currentCamera.GetProjection() == PROJECTION_TYPE::ORTHO;
|
||||
};
|
||||
[this]( const SELECTION& )
|
||||
{
|
||||
return m_currentCamera.GetProjection() == PROJECTION_TYPE::ORTHO;
|
||||
};
|
||||
|
||||
mgr->SetConditions( EDA_3D_ACTIONS::toggleOrtho, ACTION_CONDITIONS().Check( orthoCondition ) );
|
||||
|
||||
#undef MaterialCheck
|
||||
#undef FlagCheck
|
||||
#undef GridSizeCheck
|
||||
}
|
||||
|
||||
|
||||
void EDA_3D_VIEWER::InstallPreferences( PAGED_DIALOG* aParent, PANEL_HOTKEYS_EDITOR* aHotkeysPanel )
|
||||
{
|
||||
wxTreebook* book = aParent->GetTreebook();
|
||||
|
||||
book->AddPage( new wxPanel( book ), _( "3D Viewer" ) );
|
||||
book->AddSubPage( new PANEL_3D_DISPLAY_OPTIONS( this, aParent ), _( "Display Options" ) );
|
||||
book->AddSubPage( new PANEL_3D_OPENGL_OPTIONS( this, book ), _( "OpenGL" ) );
|
||||
book->AddSubPage( new PANEL_3D_RAYTRACING_OPTIONS( this, book ), _( "Raytracing" ) );
|
||||
book->AddSubPage( new PANEL_3D_COLORS( this, book ), _( "Colors" ) );
|
||||
|
||||
aHotkeysPanel->AddHotKeys( GetToolManager() );
|
||||
}
|
||||
|
||||
|
||||
void EDA_3D_VIEWER::ReloadRequest()
|
||||
{
|
||||
// This will schedule a request to load later
|
||||
|
@ -332,43 +324,6 @@ void EDA_3D_VIEWER::Process_Special_Functions( wxCommandEvent &event )
|
|||
takeScreenshot( event );
|
||||
return;
|
||||
|
||||
case ID_MENU3D_BGCOLOR_BOTTOM:
|
||||
if( Set3DColorFromUser( m_boardAdapter.m_BgColorBot, _( "Background Color, Bottom" ),
|
||||
nullptr ) )
|
||||
refreshRender();
|
||||
return;
|
||||
|
||||
case ID_MENU3D_BGCOLOR_TOP:
|
||||
if( Set3DColorFromUser( m_boardAdapter.m_BgColorTop, _( "Background Color, Top" ),
|
||||
nullptr ) )
|
||||
refreshRender();
|
||||
return;
|
||||
|
||||
case ID_MENU3D_SILKSCREEN_COLOR:
|
||||
Set3DSilkScreenColorFromUser();
|
||||
return;
|
||||
|
||||
case ID_MENU3D_SOLDERMASK_COLOR:
|
||||
Set3DSolderMaskColorFromUser();
|
||||
return;
|
||||
|
||||
case ID_MENU3D_SOLDERPASTE_COLOR:
|
||||
Set3DSolderPasteColorFromUser();
|
||||
return;
|
||||
|
||||
case ID_MENU3D_COPPER_COLOR:
|
||||
Set3DCopperColorFromUser();
|
||||
break;
|
||||
|
||||
case ID_MENU3D_PCB_BODY_COLOR:
|
||||
Set3DBoardBodyColorFromUser();
|
||||
break;
|
||||
|
||||
case ID_MENU3D_STACKUP_COLORS:
|
||||
SynchroniseColoursWithBoard();
|
||||
refreshRender();
|
||||
break;
|
||||
|
||||
case ID_MENU3D_RESET_DEFAULTS:
|
||||
{
|
||||
auto cfg = Pgm().GetSettingsManager().GetAppSettings<EDA_3D_VIEWER_SETTINGS>();
|
||||
|
@ -719,73 +674,6 @@ void EDA_3D_VIEWER::SaveSettings( APP_SETTINGS_BASE *aCfg )
|
|||
}
|
||||
|
||||
|
||||
void EDA_3D_VIEWER::SynchroniseColoursWithBoard()
|
||||
{
|
||||
BOARD* brd = GetBoard();
|
||||
const FAB_LAYER_COLOR* stdColors = GetColorStandardList();
|
||||
wxColour color;
|
||||
|
||||
if( brd )
|
||||
{
|
||||
const BOARD_STACKUP& stckp = brd->GetDesignSettings().GetStackupDescriptor();
|
||||
|
||||
for( const BOARD_STACKUP_ITEM* stckpItem : stckp.GetList() )
|
||||
{
|
||||
wxString colorName = stckpItem->GetColor();
|
||||
|
||||
if( colorName.StartsWith( "#" ) ) // This is a user defined color.
|
||||
{
|
||||
color.Set( colorName );
|
||||
}
|
||||
else
|
||||
{
|
||||
for( int i = 0; i < GetColorStandardListCount(); i++ )
|
||||
{
|
||||
if( stdColors[i].m_ColorName == colorName )
|
||||
{
|
||||
color = stdColors[i].m_Color;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( color.IsOk() )
|
||||
{
|
||||
switch( stckpItem->GetBrdLayerId() )
|
||||
{
|
||||
case F_SilkS:
|
||||
m_boardAdapter.m_SilkScreenColorTop.r = color.Red() / 255.0;
|
||||
m_boardAdapter.m_SilkScreenColorTop.g = color.Green() / 255.0;
|
||||
m_boardAdapter.m_SilkScreenColorTop.b = color.Blue() / 255.0;
|
||||
break;
|
||||
case B_SilkS:
|
||||
m_boardAdapter.m_SilkScreenColorBot.r = color.Red() / 255.0;
|
||||
m_boardAdapter.m_SilkScreenColorBot.g = color.Green() / 255.0;
|
||||
m_boardAdapter.m_SilkScreenColorBot.b = color.Blue() / 255.0;
|
||||
break;
|
||||
case F_Mask:
|
||||
m_boardAdapter.m_SolderMaskColorTop.r = color.Red() / 255.0;
|
||||
m_boardAdapter.m_SolderMaskColorTop.g = color.Green() / 255.0;
|
||||
m_boardAdapter.m_SolderMaskColorTop.b = color.Blue() / 255.0;
|
||||
// Keep the previous alpha value
|
||||
//m_boardAdapter.m_SolderMaskColorTop.a = color.Alpha() / 255.0;
|
||||
break;
|
||||
case B_Mask:
|
||||
m_boardAdapter.m_SolderMaskColorBot.r = color.Red() / 255.0;
|
||||
m_boardAdapter.m_SolderMaskColorBot.g = color.Green() / 255.0;
|
||||
m_boardAdapter.m_SolderMaskColorBot.b = color.Blue() / 255.0;
|
||||
// Keep the previous alpha value
|
||||
//m_boardAdapter.m_SolderMaskColorBot.a = color.Alpha() / 255.0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void EDA_3D_VIEWER::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged )
|
||||
{
|
||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER::CommonSettingsChanged" );
|
||||
|
@ -905,158 +793,6 @@ void EDA_3D_VIEWER::RenderEngineChanged()
|
|||
}
|
||||
|
||||
|
||||
bool EDA_3D_VIEWER::Set3DColorFromUser( SFVEC4F &aColor, const wxString& aTitle,
|
||||
CUSTOM_COLORS_LIST* aPredefinedColors,
|
||||
bool aAllowOpacityControl,
|
||||
KIGFX::COLOR4D aDefaultColor )
|
||||
{
|
||||
KIGFX::COLOR4D newcolor;
|
||||
KIGFX::COLOR4D oldcolor( aColor.r,aColor.g, aColor.b, aColor.a );
|
||||
|
||||
DIALOG_COLOR_PICKER picker( this, oldcolor, aAllowOpacityControl, aPredefinedColors,
|
||||
aDefaultColor );
|
||||
|
||||
if( picker.ShowModal() != wxID_OK )
|
||||
return false;
|
||||
|
||||
newcolor = picker.GetColor();
|
||||
|
||||
if( newcolor == oldcolor )
|
||||
return false;
|
||||
|
||||
aColor.r = newcolor.r;
|
||||
aColor.g = newcolor.g;
|
||||
aColor.b = newcolor.b;
|
||||
aColor.a = newcolor.a;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool EDA_3D_VIEWER::Set3DSilkScreenColorFromUser()
|
||||
{
|
||||
CUSTOM_COLORS_LIST colors;
|
||||
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 241.0/255.0, 241.0/255.0, 241.0/255.0, "White" ) );
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 4.0/255.0, 18.0/255.0, 21.0/255.0, "Dark" ) );
|
||||
|
||||
if( Set3DColorFromUser( m_boardAdapter.m_SilkScreenColorTop, _( "Silkscreen Color" ),
|
||||
&colors, false, colors[0].m_Color ) )
|
||||
{
|
||||
m_boardAdapter.m_SilkScreenColorBot = m_boardAdapter.m_SilkScreenColorTop;
|
||||
|
||||
refreshRender();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool EDA_3D_VIEWER::Set3DSolderMaskColorFromUser()
|
||||
{
|
||||
CUSTOM_COLORS_LIST colors;
|
||||
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 20/255.0, 51/255.0, 36/255.0, 0.83, "Green" ) );
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 91/255.0, 168/255.0, 12/255.0, 0.83, "Light Green" ) );
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 13/255.0, 104/255.0, 11/255.0, 0.83,
|
||||
"Saturated Green" ) );
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 181/255.0, 19/255.0, 21/255.0, 0.83, "Red" ) );
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 239/255.0, 53/255.0, 41/255.0, 0.83,
|
||||
"Red Light Orange" ) );
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 210/255.0, 40/255.0, 14/255.0, 0.83, "Red 2" ) );
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 2/255.0, 59/255.0, 162/255.0, 0.83, "Blue" ) );
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 54/255.0, 79/255.0, 116/255.0, 0.83, "Light blue 1" ) );
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 61/255.0, 85/255.0, 130/255.0, 0.83, "Light blue 2" ) );
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 21/255.0, 70/255.0, 80/255.0, 0.83,
|
||||
"Green blue (dark)" ) );
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 11/255.0, 11/255.0, 11/255.0, 0.83, "Black" ) );
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 245/255.0, 245/255.0, 245/255.0, 0.83, "White" ) );
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 119/255.0, 31/255.0, 91/255.0, 0.83, "Purple" ) );
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 32/255.0, 2/255.0, 53/255.0, 0.83, "Purple Dark" ) );
|
||||
|
||||
if( Set3DColorFromUser( m_boardAdapter.m_SolderMaskColorTop, _( "Solder Mask Color" ),
|
||||
&colors, true, colors[0].m_Color ) )
|
||||
{
|
||||
m_boardAdapter.m_SolderMaskColorBot = m_boardAdapter.m_SolderMaskColorTop;
|
||||
|
||||
refreshRender();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool EDA_3D_VIEWER::Set3DCopperColorFromUser()
|
||||
{
|
||||
CUSTOM_COLORS_LIST colors;
|
||||
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 184/255.0, 115/255.0, 50/255.0, "Copper" ) );
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 178/255.0, 156/255.0, 0.0, "Gold" ) );
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 213/255.0, 213/255.0, 213/255.0, "Silver" ) );
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 160/255.0, 160/255.0, 160/255.0, "Tin" ) );
|
||||
|
||||
if( Set3DColorFromUser( m_boardAdapter.m_CopperColor, _( "Copper Color" ), &colors, false,
|
||||
colors[0].m_Color ) )
|
||||
{
|
||||
refreshRender();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool EDA_3D_VIEWER::Set3DBoardBodyColorFromUser()
|
||||
{
|
||||
CUSTOM_COLORS_LIST colors;
|
||||
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 51/255.0, 43/255.0, 22/255.0, 0.9,
|
||||
"FR4 natural, dark" ) );
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 109/255.0, 116/255.0, 75/255.0, 0.9, "FR4 natural" ) );
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 78/255.0, 14/255.0, 5/255.0, 0.9, "brown/red" ) );
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 146/255.0, 99/255.0, 47/255.0, 0.9, "brown 1" ) );
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 160/255.0, 123/255.0, 54/255.0, 0.9, "brown 2" ) );
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 146/255.0, 99/255.0, 47/255.0, 0.9, "brown 3" ) );
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 63/255.0, 126/255.0, 71/255.0, 0.9, "green 1" ) );
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 117/255.0, 122/255.0, 90/255.0, 0.9, "green 2" ) );
|
||||
|
||||
if( Set3DColorFromUser( m_boardAdapter.m_BoardBodyColor, _( "Board Body Color" ), &colors,
|
||||
true, colors[0].m_Color ) )
|
||||
{
|
||||
refreshRender();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool EDA_3D_VIEWER::Set3DSolderPasteColorFromUser()
|
||||
{
|
||||
CUSTOM_COLORS_LIST colors;
|
||||
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 128/255.0, 128/255.0, 128/255.0, "grey" ) );
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 213/255.0, 213/255.0, 213/255.0, "Silver" ) );
|
||||
colors.push_back( CUSTOM_COLOR_ITEM( 90/255.0, 90/255.0, 90/255.0, "grey 2" ) );
|
||||
|
||||
if( Set3DColorFromUser( m_boardAdapter.m_SolderPasteColor, _( "Solder Paste Color" ), &colors,
|
||||
false, colors[0].m_Color ) )
|
||||
{
|
||||
refreshRender();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void EDA_3D_VIEWER::loadCommonSettings()
|
||||
{
|
||||
wxCHECK_RET( m_canvas, "Cannot load settings to null canvas" );
|
||||
|
|
|
@ -47,10 +47,6 @@
|
|||
|
||||
#define KICAD_DEFAULT_3D_DRAWFRAME_STYLE (wxDEFAULT_FRAME_STYLE | wxWANTS_CHARS)
|
||||
|
||||
#define VIEWER3D_FRAMENAME wxT( "Viewer3DFrameName" )
|
||||
#define QUALIFIED_VIEWER3D_FRAMENAME( parent ) \
|
||||
( wxString( VIEWER3D_FRAMENAME ) + wxT( ":" ) + parent->GetName() )
|
||||
|
||||
|
||||
enum EDA_3D_VIEWER_STATUSBAR
|
||||
{
|
||||
|
@ -77,6 +73,8 @@ public:
|
|||
|
||||
wxWindow* GetToolCanvas() const override { return m_canvas; }
|
||||
|
||||
void InstallPreferences( PAGED_DIALOG* aParent, PANEL_HOTKEYS_EDITOR* aHotkeysPanel ) override;
|
||||
|
||||
/**
|
||||
* Request reloading the 3D view.
|
||||
*
|
||||
|
@ -108,54 +106,6 @@ public:
|
|||
|
||||
EDA_3D_CANVAS* GetCanvas() { return m_canvas; }
|
||||
|
||||
/**
|
||||
* Get a SFVEC3D from a color dialog.
|
||||
*
|
||||
* @param aColor is the SFVEC3D to change.
|
||||
* @param aTitle is the title displayed in the colordialog selector.
|
||||
* @param aPredefinedColors is a reference to a CUSTOM_COLOR_ITEM list which contains.
|
||||
* a few predefined colors
|
||||
*/
|
||||
bool Set3DColorFromUser( SFVEC4F& aColor, const wxString& aTitle,
|
||||
CUSTOM_COLORS_LIST* aPredefinedColors,
|
||||
bool aAllowOpacityControl = false,
|
||||
KIGFX::COLOR4D aDefaultColor = KIGFX::COLOR4D( 1.0, 1.0, 1.0, 1.0 ) );
|
||||
|
||||
/**
|
||||
* Set the solder mask color from a set of colors.
|
||||
*
|
||||
* @return true if a new color is chosen, false if no change or aborted by user.
|
||||
*/
|
||||
bool Set3DSolderMaskColorFromUser();
|
||||
|
||||
/**
|
||||
* Set the solder mask color from a set of colors.
|
||||
*
|
||||
* @return true if a new color is chosen, false if no change or aborted by user.
|
||||
*/
|
||||
bool Set3DSolderPasteColorFromUser();
|
||||
|
||||
/**
|
||||
* Set the copper color from a set of colors.
|
||||
*
|
||||
* @return true if a new color is chosen, false if no change or aborted by user.
|
||||
*/
|
||||
bool Set3DCopperColorFromUser();
|
||||
|
||||
/**
|
||||
* Set the copper color from a set of colors.
|
||||
*
|
||||
* @return true if a new color is chosen, false if no change or aborted by user.
|
||||
*/
|
||||
bool Set3DBoardBodyColorFromUser();
|
||||
|
||||
/**
|
||||
* Set the silkscreen color from a set of colors.
|
||||
*
|
||||
* @return true if a new color is chosen, false if no change or aborted by user.
|
||||
*/
|
||||
bool Set3DSilkScreenColorFromUser();
|
||||
|
||||
/**
|
||||
* Notification that common settings are updated.
|
||||
*
|
||||
|
@ -164,9 +114,6 @@ public:
|
|||
*/
|
||||
void CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged ) override;
|
||||
|
||||
|
||||
void SynchroniseColoursWithBoard();
|
||||
|
||||
protected:
|
||||
void setupUIConditions() override;
|
||||
|
||||
|
|
|
@ -227,42 +227,6 @@ TOOL_ACTION EDA_3D_ACTIONS::showBoundingBoxes( "3DViewer.Control.showBoundingBox
|
|||
_( "Show Model Bounding Boxes" ), _( "Show Model Bounding Boxes" ),
|
||||
BITMAPS::ortho, AF_NONE, (void*) FL_RENDER_OPENGL_SHOW_MODEL_BBOX );
|
||||
|
||||
TOOL_ACTION EDA_3D_ACTIONS::renderShadows( "3DViewer.Control.renderShadows",
|
||||
AS_GLOBAL, 0, "",
|
||||
_( "Render Shadows" ), _( "Render Shadows" ),
|
||||
BITMAPS::INVALID_BITMAP, AF_NONE, (void*) FL_RENDER_RAYTRACING_SHADOWS );
|
||||
|
||||
TOOL_ACTION EDA_3D_ACTIONS::proceduralTextures( "3DViewer.Control.proceduralTextures",
|
||||
AS_GLOBAL, 0, "",
|
||||
_( "Procedural Textures" ), _( "Apply procedural textures to materials (slow)" ),
|
||||
BITMAPS::INVALID_BITMAP, AF_NONE, (void*) FL_RENDER_RAYTRACING_PROCEDURAL_TEXTURES );
|
||||
|
||||
TOOL_ACTION EDA_3D_ACTIONS::addFloor( "3DViewer.Control.addFloor",
|
||||
AS_GLOBAL, 0, "",
|
||||
_( "Add Floor" ), _( "Adds a floor plane below the board (slow)"),
|
||||
BITMAPS::INVALID_BITMAP, AF_NONE, (void*) FL_RENDER_RAYTRACING_BACKFLOOR );
|
||||
|
||||
TOOL_ACTION EDA_3D_ACTIONS::showRefractions( "3DViewer.Control.showRefractions",
|
||||
AS_GLOBAL, 0, "",
|
||||
_( "Refractions" ), _( "Render materials with refractive properties on final render (slow)" ),
|
||||
BITMAPS::INVALID_BITMAP, AF_NONE, (void*) FL_RENDER_RAYTRACING_REFRACTIONS );
|
||||
|
||||
TOOL_ACTION EDA_3D_ACTIONS::showReflections( "3DViewer.Control.showReflections",
|
||||
AS_GLOBAL, 0, "",
|
||||
_( "Reflections" ), _( "Render materials with reflective properties on final render (slow)" ),
|
||||
BITMAPS::INVALID_BITMAP, AF_NONE, (void*) FL_RENDER_RAYTRACING_REFLECTIONS );
|
||||
|
||||
TOOL_ACTION EDA_3D_ACTIONS::antiAliasing( "3DViewer.Control.antiAliasing",
|
||||
AS_GLOBAL, 0, "",
|
||||
_( "Anti-aliasing" ), _( "Render with improved quality on final render (slow)" ),
|
||||
BITMAPS::INVALID_BITMAP, AF_NONE, (void*) FL_RENDER_RAYTRACING_ANTI_ALIASING );
|
||||
|
||||
TOOL_ACTION EDA_3D_ACTIONS::postProcessing( "3DViewer.Control.postProcessing",
|
||||
AS_GLOBAL, 0, "",
|
||||
_( "Post-processing" ),
|
||||
_( "Apply Screen Space Ambient Occlusion and Global Illumination reflections on final render (slow)"),
|
||||
BITMAPS::INVALID_BITMAP, AF_NONE, (void*) FL_RENDER_RAYTRACING_POST_PROCESSING );
|
||||
|
||||
TOOL_ACTION EDA_3D_ACTIONS::toggleRealisticMode( "3DViewer.Control.toggleRealisticMode",
|
||||
AS_GLOBAL, 0, "",
|
||||
_( "Toggle realistic mode" ), _( "Toggle realistic mode" ),
|
||||
|
|
|
@ -80,13 +80,6 @@ public:
|
|||
static TOOL_ACTION attributesSMD;
|
||||
static TOOL_ACTION attributesVirtual;
|
||||
static TOOL_ACTION showBoundingBoxes;
|
||||
static TOOL_ACTION renderShadows;
|
||||
static TOOL_ACTION proceduralTextures;
|
||||
static TOOL_ACTION addFloor;
|
||||
static TOOL_ACTION showRefractions;
|
||||
static TOOL_ACTION showReflections;
|
||||
static TOOL_ACTION antiAliasing;
|
||||
static TOOL_ACTION postProcessing;
|
||||
static TOOL_ACTION toggleRealisticMode;
|
||||
static TOOL_ACTION toggleBoardBody;
|
||||
static TOOL_ACTION showAxis;
|
||||
|
|
|
@ -348,13 +348,6 @@ void EDA_3D_CONTROLLER::setTransitions()
|
|||
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::attributesSMD.MakeEvent() );
|
||||
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::attributesVirtual.MakeEvent() );
|
||||
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::showBoundingBoxes.MakeEvent() );
|
||||
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::renderShadows.MakeEvent() );
|
||||
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::proceduralTextures.MakeEvent() );
|
||||
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::addFloor.MakeEvent() );
|
||||
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::showRefractions.MakeEvent() );
|
||||
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::showReflections.MakeEvent() );
|
||||
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::antiAliasing.MakeEvent() );
|
||||
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::postProcessing.MakeEvent() );
|
||||
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::toggleRealisticMode.MakeEvent() );
|
||||
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::toggleBoardBody.MakeEvent() );
|
||||
Go( &EDA_3D_CONTROLLER::ToggleVisibility, EDA_3D_ACTIONS::showAxis.MakeEvent() );
|
||||
|
|
|
@ -27,16 +27,6 @@ enum id_3dview_frm
|
|||
ID_VIEW3D_RESET,
|
||||
ID_VIEW3D_FLIP,
|
||||
ID_TOOL_SCREENCOPY_TOCLIBBOARD,
|
||||
ID_MENU3D_COLOR,
|
||||
ID_MENU3D_BGCOLOR,
|
||||
ID_MENU3D_BGCOLOR_BOTTOM,
|
||||
ID_MENU3D_BGCOLOR_TOP,
|
||||
ID_MENU3D_SILKSCREEN_COLOR,
|
||||
ID_MENU3D_SOLDERMASK_COLOR,
|
||||
ID_MENU3D_SOLDERPASTE_COLOR,
|
||||
ID_MENU3D_PCB_BODY_COLOR,
|
||||
ID_MENU3D_COPPER_COLOR,
|
||||
ID_MENU3D_STACKUP_COLORS,
|
||||
|
||||
ID_MENU_SCREENCOPY_PNG,
|
||||
ID_MENU_SCREENCOPY_JPEG,
|
||||
|
@ -49,8 +39,6 @@ enum id_3dview_frm
|
|||
|
||||
ID_RENDER_CURRENT_VIEW,
|
||||
|
||||
ID_TOOL_SET_VISIBLE_ITEMS,
|
||||
|
||||
ID_DISABLE_RAY_TRACING,
|
||||
|
||||
ID_CUSTOM_EVENT_1, // A id for a custom event (canvas refresh request)
|
||||
|
|
|
@ -87,8 +87,14 @@ set(3D-VIEWER_SRCS
|
|||
3d_rendering/trackball.cpp
|
||||
3d_viewer/3d_menubar.cpp
|
||||
3d_viewer/3d_toolbar.cpp
|
||||
3d_viewer/dialogs/dialog_3D_view_option.cpp
|
||||
3d_viewer/dialogs/dialog_3D_view_option_base.cpp
|
||||
3d_viewer/dialogs/panel_3D_colors.cpp
|
||||
3d_viewer/dialogs/panel_3D_colors_base.cpp
|
||||
3d_viewer/dialogs/panel_3D_display_options.cpp
|
||||
3d_viewer/dialogs/panel_3D_display_options_base.cpp
|
||||
3d_viewer/dialogs/panel_3D_opengl_options.cpp
|
||||
3d_viewer/dialogs/panel_3D_opengl_options_base.cpp
|
||||
3d_viewer/dialogs/panel_3D_raytracing_options.cpp
|
||||
3d_viewer/dialogs/panel_3D_raytracing_options_base.cpp
|
||||
3d_viewer/tools/3d_actions.cpp
|
||||
3d_viewer/tools/3d_conditions.cpp
|
||||
3d_viewer/tools/3d_controller.cpp
|
||||
|
|
|
@ -931,14 +931,24 @@ void EDA_BASE_FRAME::OnPreferences( wxCommandEvent& event )
|
|||
PANEL_HOTKEYS_EDITOR* hotkeysPanel = new PANEL_HOTKEYS_EDITOR( this, book, false );
|
||||
book->AddPage( hotkeysPanel, _( "Hotkeys" ) );
|
||||
|
||||
wxWindow* viewer3D = nullptr;
|
||||
|
||||
for( unsigned i = 0; i < KIWAY_PLAYER_COUNT; ++i )
|
||||
{
|
||||
KIWAY_PLAYER* frame = dlg.Kiway().Player( (FRAME_T) i, false );
|
||||
|
||||
if( frame )
|
||||
{
|
||||
frame->InstallPreferences( &dlg, hotkeysPanel );
|
||||
|
||||
if( !viewer3D )
|
||||
viewer3D = wxFindWindowByName( QUALIFIED_VIEWER3D_FRAMENAME( frame ) );
|
||||
}
|
||||
}
|
||||
|
||||
if( viewer3D )
|
||||
static_cast<EDA_BASE_FRAME*>( viewer3D )->InstallPreferences( &dlg, hotkeysPanel );
|
||||
|
||||
// The Kicad manager frame is not a player so we have to add it by hand
|
||||
wxWindow* manager = wxFindWindowByName( KICAD_MANAGER_FRAME_NAME );
|
||||
|
||||
|
|
|
@ -273,7 +273,8 @@ void COLOR_SWATCH::GetNewSwatchColor()
|
|||
return;
|
||||
}
|
||||
|
||||
DIALOG_COLOR_PICKER dialog( ::wxGetTopLevelParent( this ), m_color, true, nullptr, m_default );
|
||||
DIALOG_COLOR_PICKER dialog( ::wxGetTopLevelParent( this ), m_color, m_supportsOpacity,
|
||||
m_userColors, m_default );
|
||||
|
||||
if( dialog.ShowModal() == wxID_OK )
|
||||
{
|
||||
|
|
|
@ -48,8 +48,13 @@
|
|||
#define KICAD_DEFAULT_DRAWFRAME_STYLE wxDEFAULT_FRAME_STYLE | wxWANTS_CHARS
|
||||
|
||||
|
||||
#define VIEWER3D_FRAMENAME wxT( "Viewer3DFrameName" )
|
||||
#define QUALIFIED_VIEWER3D_FRAMENAME( parent ) \
|
||||
( wxString( VIEWER3D_FRAMENAME ) + wxT( ":" ) + parent->GetName() )
|
||||
|
||||
#define KICAD_MANAGER_FRAME_NAME wxT( "KicadFrame" )
|
||||
|
||||
|
||||
class wxChoice;
|
||||
class wxEvent;
|
||||
class wxFileName;
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include <functional>
|
||||
|
||||
#include <gal/color4d.h>
|
||||
|
||||
#include <dialogs/dialog_color_picker.h>
|
||||
|
||||
enum SWATCH_SIZE
|
||||
{
|
||||
|
@ -89,6 +89,11 @@ public:
|
|||
*/
|
||||
void SetSwatchBackground( KIGFX::COLOR4D aBackground );
|
||||
|
||||
/**
|
||||
* Fetch a reference to the user colors list.
|
||||
*/
|
||||
void SetUserColors( CUSTOM_COLORS_LIST* aUserColors ) { m_userColors = aUserColors; }
|
||||
|
||||
/**
|
||||
* @return the current swatch color
|
||||
*/
|
||||
|
@ -104,6 +109,8 @@ public:
|
|||
void SetReadOnly( bool aReadOnly = true ) { m_readOnly = aReadOnly; }
|
||||
bool IsReadOnly() const { return m_readOnly; }
|
||||
|
||||
void SetSupportsOpacity( bool aSupportsOpacity ) { m_supportsOpacity = aSupportsOpacity; }
|
||||
|
||||
/// Registers a handler for when the user tries to interact with a read-only swatch
|
||||
void SetReadOnlyCallback( std::function<void()> aCallback ) { m_readOnlyCallback = aCallback; }
|
||||
|
||||
|
@ -118,19 +125,23 @@ private:
|
|||
*/
|
||||
void rePostEvent( wxEvent& aEvent );
|
||||
|
||||
KIGFX::COLOR4D m_color;
|
||||
KIGFX::COLOR4D m_background;
|
||||
KIGFX::COLOR4D m_default;
|
||||
KIGFX::COLOR4D m_color;
|
||||
KIGFX::COLOR4D m_background;
|
||||
KIGFX::COLOR4D m_default;
|
||||
CUSTOM_COLORS_LIST* m_userColors;
|
||||
|
||||
wxStaticBitmap* m_swatch;
|
||||
wxStaticBitmap* m_swatch;
|
||||
|
||||
wxSize m_size;
|
||||
wxSize m_checkerboardSize;
|
||||
KIGFX::COLOR4D m_checkerboardBg;
|
||||
wxSize m_size;
|
||||
wxSize m_checkerboardSize;
|
||||
KIGFX::COLOR4D m_checkerboardBg;
|
||||
|
||||
/// A read-only swatch won't show the color chooser dialog but otherwise works normally
|
||||
bool m_readOnly;
|
||||
bool m_readOnly;
|
||||
std::function<void()> m_readOnlyCallback;
|
||||
|
||||
/// If opacity is not supported the color chooser dialog will be displayed without it
|
||||
bool m_supportsOpacity;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -40,8 +40,7 @@ static const UTIL::CFG_MAP<PCB_DISPLAY_OPTIONS::TRACE_CLEARANCE_DISPLAY_MODE_T>
|
|||
};
|
||||
|
||||
|
||||
PANEL_DISPLAY_OPTIONS::PANEL_DISPLAY_OPTIONS( PCB_BASE_FRAME* aFrame,
|
||||
PAGED_DIALOG* aParent ) :
|
||||
PANEL_DISPLAY_OPTIONS::PANEL_DISPLAY_OPTIONS( PCB_BASE_FRAME* aFrame, PAGED_DIALOG* aParent ) :
|
||||
PANEL_DISPLAY_OPTIONS_BASE( aParent->GetTreebook() ),
|
||||
m_frame( aFrame )
|
||||
{
|
||||
|
|
|
@ -297,8 +297,6 @@ BEGIN_EVENT_TABLE( EDA_3D_VIEWER, EDA_BASE_FRAME )
|
|||
EVT_TOOL_RANGE( ID_START_COMMAND_3D, ID_MENU_COMMAND_END,
|
||||
EDA_3D_VIEWER::Process_Special_Functions )
|
||||
|
||||
EVT_TOOL( ID_TOOL_SET_VISIBLE_ITEMS, EDA_3D_VIEWER::Install3DViewOptionDialog )
|
||||
|
||||
EVT_MENU( wxID_CLOSE, EDA_3D_VIEWER::Exit3DFrame )
|
||||
EVT_MENU( ID_RENDER_CURRENT_VIEW, EDA_3D_VIEWER::OnRenderEngineSelection )
|
||||
EVT_MENU( ID_DISABLE_RAY_TRACING, EDA_3D_VIEWER::OnDisableRayTracing )
|
||||
|
|
Loading…
Reference in New Issue