Updates the material preferences including selecting a default material Preferences adds some options for what gets displayed in the Materials editor. The option to use the legacy editor is removed in favour of the new editor. A new preference page has been added that allows the user to select a default material. This will then be assigned to any newly created object. In support of this, a new widget PrefsMaterialTreeWidget has been added as an extension of the MaterialTreeWidget to automatically save and restore the selected material.
434 lines
14 KiB
XML
434 lines
14 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<ui version="4.0">
|
|
<class>MatGui::DlgSettingsMaterial</class>
|
|
<widget class="QWidget" name="MatGui::DlgSettingsMaterial">
|
|
<property name="geometry">
|
|
<rect>
|
|
<x>0</x>
|
|
<y>0</y>
|
|
<width>434</width>
|
|
<height>553</height>
|
|
</rect>
|
|
</property>
|
|
<property name="windowTitle">
|
|
<string>General</string>
|
|
</property>
|
|
<layout class="QVBoxLayout" name="verticalLayout">
|
|
<property name="spacing">
|
|
<number>6</number>
|
|
</property>
|
|
<item>
|
|
<widget class="QGroupBox" name="gb_4_materials">
|
|
<property name="title">
|
|
<string>Card resources</string>
|
|
</property>
|
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
<item>
|
|
<layout class="QVBoxLayout" name="verticalLayout_6">
|
|
<item>
|
|
<widget class="Gui::PrefCheckBox" name="cb_use_built_in_materials">
|
|
<property name="toolTip">
|
|
<string>The cards built-in to FreeCAD will be listed as available.</string>
|
|
</property>
|
|
<property name="text">
|
|
<string>Use built-in materials</string>
|
|
</property>
|
|
<property name="checked">
|
|
<bool>true</bool>
|
|
</property>
|
|
<property name="prefEntry" stdset="0">
|
|
<cstring>UseBuiltInMaterials</cstring>
|
|
</property>
|
|
<property name="prefPath" stdset="0">
|
|
<cstring>Mod/Material/Resources</cstring>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="Gui::PrefCheckBox" name="cb_use_mat_from_workbenches">
|
|
<property name="toolTip">
|
|
<string>Use materials added by external workbenches.</string>
|
|
</property>
|
|
<property name="text">
|
|
<string>Use materials from external workbenches</string>
|
|
</property>
|
|
<property name="checked">
|
|
<bool>true</bool>
|
|
</property>
|
|
<property name="prefEntry" stdset="0">
|
|
<cstring>UseMaterialsFromWorkbenches</cstring>
|
|
</property>
|
|
<property name="prefPath" stdset="0">
|
|
<cstring>Mod/Material/Resources</cstring>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="Gui::PrefCheckBox" name="cb_use_mat_from_config_dir">
|
|
<property name="toolTip">
|
|
<string>Also cards from FreeCAD's preferences directory will be listed as available.</string>
|
|
</property>
|
|
<property name="text">
|
|
<string>Use materials from Materials directory in user's FreeCAD preference directory</string>
|
|
</property>
|
|
<property name="checked">
|
|
<bool>true</bool>
|
|
</property>
|
|
<property name="prefEntry" stdset="0">
|
|
<cstring>UseMaterialsFromConfigDir</cstring>
|
|
</property>
|
|
<property name="prefPath" stdset="0">
|
|
<cstring>Mod/Material/Resources</cstring>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="Gui::PrefCheckBox" name="cb_use_mat_from_custom_dir">
|
|
<property name="toolTip">
|
|
<string>Also material cards also from the specified directory
|
|
will be listed as available.</string>
|
|
</property>
|
|
<property name="text">
|
|
<string>Use materials from user defined directory</string>
|
|
</property>
|
|
<property name="checked">
|
|
<bool>true</bool>
|
|
</property>
|
|
<property name="prefEntry" stdset="0">
|
|
<cstring>UseMaterialsFromCustomDir</cstring>
|
|
</property>
|
|
<property name="prefPath" stdset="0">
|
|
<cstring>Mod/Material/Resources</cstring>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<layout class="QGridLayout" name="gridLayout">
|
|
<item row="1" column="0">
|
|
<widget class="QLabel" name="l_custom_mat_dir">
|
|
<property name="enabled">
|
|
<bool>true</bool>
|
|
</property>
|
|
<property name="minimumSize">
|
|
<size>
|
|
<width>100</width>
|
|
<height>0</height>
|
|
</size>
|
|
</property>
|
|
<property name="text">
|
|
<string>User directory</string>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item row="1" column="1">
|
|
<widget class="Gui::PrefFileChooser" name="fc_custom_mat_dir">
|
|
<property name="enabled">
|
|
<bool>true</bool>
|
|
</property>
|
|
<property name="sizePolicy">
|
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
<horstretch>0</horstretch>
|
|
<verstretch>0</verstretch>
|
|
</sizepolicy>
|
|
</property>
|
|
<property name="minimumSize">
|
|
<size>
|
|
<width>0</width>
|
|
<height>20</height>
|
|
</size>
|
|
</property>
|
|
<property name="baseSize">
|
|
<size>
|
|
<width>0</width>
|
|
<height>0</height>
|
|
</size>
|
|
</property>
|
|
<property name="prefEntry" stdset="0">
|
|
<cstring>CustomMaterialsDir</cstring>
|
|
</property>
|
|
<property name="prefPath" stdset="0">
|
|
<cstring>Mod/Material/Resources</cstring>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</item>
|
|
</layout>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QGroupBox" name="gb_4_materials_2">
|
|
<property name="title">
|
|
<string>Card sorting and duplicates</string>
|
|
</property>
|
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
|
<item>
|
|
<widget class="Gui::PrefCheckBox" name="cb_delete_duplicates">
|
|
<property name="toolTip">
|
|
<string>Duplicate cards will be deleted from the displayed material card list.</string>
|
|
</property>
|
|
<property name="text">
|
|
<string>Delete card duplicates</string>
|
|
</property>
|
|
<property name="checked">
|
|
<bool>true</bool>
|
|
</property>
|
|
<property name="prefEntry" stdset="0">
|
|
<cstring>DeleteDuplicates</cstring>
|
|
</property>
|
|
<property name="prefPath" stdset="0">
|
|
<cstring>Mod/Material/Cards</cstring>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="Gui::PrefCheckBox" name="cb_sort_by_resources">
|
|
<property name="toolTip">
|
|
<string>Material cards appear sorted by their resources (locations).
|
|
If unchecked, they will be sorted by their name.</string>
|
|
</property>
|
|
<property name="text">
|
|
<string>Sort by resources</string>
|
|
</property>
|
|
<property name="checked">
|
|
<bool>true</bool>
|
|
</property>
|
|
<property name="prefEntry" stdset="0">
|
|
<cstring>SortByResources</cstring>
|
|
</property>
|
|
<property name="prefPath" stdset="0">
|
|
<cstring>Mod/Material/Cards</cstring>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QGroupBox" name="gbMaterialSelector">
|
|
<property name="title">
|
|
<string>Material Selector</string>
|
|
</property>
|
|
<layout class="QVBoxLayout" name="verticalLayout_5">
|
|
<item>
|
|
<widget class="Gui::PrefCheckBox" name="cb_show_favorites">
|
|
<property name="text">
|
|
<string>Show favorites</string>
|
|
</property>
|
|
<property name="checked">
|
|
<bool>true</bool>
|
|
</property>
|
|
<property name="prefEntry" stdset="0">
|
|
<cstring>ShowFavorites</cstring>
|
|
</property>
|
|
<property name="prefPath" stdset="0">
|
|
<cstring>Mod/Material/TreeWidget</cstring>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="Gui::PrefCheckBox" name="cb_show_recent">
|
|
<property name="text">
|
|
<string>Show recent</string>
|
|
</property>
|
|
<property name="checked">
|
|
<bool>true</bool>
|
|
</property>
|
|
<property name="prefEntry" stdset="0">
|
|
<cstring>ShowRecent</cstring>
|
|
</property>
|
|
<property name="prefPath" stdset="0">
|
|
<cstring>Mod/Material/TreeWidget</cstring>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="Gui::PrefCheckBox" name="cb_show_empty_libraries">
|
|
<property name="text">
|
|
<string>Show empty libraries</string>
|
|
</property>
|
|
<property name="checked">
|
|
<bool>true</bool>
|
|
</property>
|
|
<property name="prefEntry" stdset="0">
|
|
<cstring>ShowEmptyLibraries</cstring>
|
|
</property>
|
|
<property name="prefPath" stdset="0">
|
|
<cstring>Mod/Material/TreeWidget</cstring>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="Gui::PrefCheckBox" name="cb_show_empty_folders">
|
|
<property name="text">
|
|
<string>Show empty folders</string>
|
|
</property>
|
|
<property name="prefEntry" stdset="0">
|
|
<cstring>ShowEmptyFolders</cstring>
|
|
</property>
|
|
<property name="prefPath" stdset="0">
|
|
<cstring>Mod/Material/TreeWidget</cstring>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="Gui::PrefCheckBox" name="cb_show_legacy">
|
|
<property name="text">
|
|
<string>Show legacy files</string>
|
|
</property>
|
|
<property name="prefEntry" stdset="0">
|
|
<cstring>ShowLegacy</cstring>
|
|
</property>
|
|
<property name="prefPath" stdset="0">
|
|
<cstring>Mod/Material/TreeWidget</cstring>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="QGroupBox" name="groupBox">
|
|
<property name="title">
|
|
<string>Material Editor</string>
|
|
</property>
|
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
|
<item>
|
|
<widget class="Gui::PrefCheckBox" name="cb_show_favorites_editor">
|
|
<property name="text">
|
|
<string>Show favorites</string>
|
|
</property>
|
|
<property name="checked">
|
|
<bool>true</bool>
|
|
</property>
|
|
<property name="prefEntry" stdset="0">
|
|
<cstring>ShowFavorites</cstring>
|
|
</property>
|
|
<property name="prefPath" stdset="0">
|
|
<cstring>Mod/Material/Editor</cstring>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="Gui::PrefCheckBox" name="cb_show_recent_editor">
|
|
<property name="text">
|
|
<string>Show recent</string>
|
|
</property>
|
|
<property name="checked">
|
|
<bool>true</bool>
|
|
</property>
|
|
<property name="prefEntry" stdset="0">
|
|
<cstring>ShowRecent</cstring>
|
|
</property>
|
|
<property name="prefPath" stdset="0">
|
|
<cstring>Mod/Material/Editor</cstring>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="Gui::PrefCheckBox" name="cb_show_empty_libraries_editor">
|
|
<property name="text">
|
|
<string>Show empty libraries</string>
|
|
</property>
|
|
<property name="checked">
|
|
<bool>true</bool>
|
|
</property>
|
|
<property name="prefEntry" stdset="0">
|
|
<cstring>ShowEmptyLibraries</cstring>
|
|
</property>
|
|
<property name="prefPath" stdset="0">
|
|
<cstring>Mod/Material/Editor</cstring>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="Gui::PrefCheckBox" name="cb_show_empty_folders_editor">
|
|
<property name="text">
|
|
<string>Show empty folders</string>
|
|
</property>
|
|
<property name="prefEntry" stdset="0">
|
|
<cstring>ShowEmptyFolders</cstring>
|
|
</property>
|
|
<property name="prefPath" stdset="0">
|
|
<cstring>Mod/Material/Editor</cstring>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<widget class="Gui::PrefCheckBox" name="cb_show_legacy_editor">
|
|
<property name="text">
|
|
<string>Show legacy files</string>
|
|
</property>
|
|
<property name="checked">
|
|
<bool>true</bool>
|
|
</property>
|
|
<property name="prefEntry" stdset="0">
|
|
<cstring>ShowLegacy</cstring>
|
|
</property>
|
|
<property name="prefPath" stdset="0">
|
|
<cstring>Mod/Material/Editor</cstring>
|
|
</property>
|
|
</widget>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
</item>
|
|
<item>
|
|
<spacer name="verticalSpacer">
|
|
<property name="orientation">
|
|
<enum>Qt::Vertical</enum>
|
|
</property>
|
|
<property name="sizeType">
|
|
<enum>QSizePolicy::Expanding</enum>
|
|
</property>
|
|
<property name="sizeHint" stdset="0">
|
|
<size>
|
|
<width>20</width>
|
|
<height>40</height>
|
|
</size>
|
|
</property>
|
|
</spacer>
|
|
</item>
|
|
</layout>
|
|
</widget>
|
|
<layoutdefault spacing="6" margin="11"/>
|
|
<customwidgets>
|
|
<customwidget>
|
|
<class>Gui::FileChooser</class>
|
|
<extends>QWidget</extends>
|
|
<header>Gui/FileDialog.h</header>
|
|
</customwidget>
|
|
<customwidget>
|
|
<class>Gui::PrefFileChooser</class>
|
|
<extends>Gui::FileChooser</extends>
|
|
<header>Gui/PrefWidgets.h</header>
|
|
</customwidget>
|
|
<customwidget>
|
|
<class>Gui::PrefCheckBox</class>
|
|
<extends>QCheckBox</extends>
|
|
<header>Gui/PrefWidgets.h</header>
|
|
</customwidget>
|
|
</customwidgets>
|
|
<resources/>
|
|
<connections>
|
|
<connection>
|
|
<sender>cb_use_mat_from_custom_dir</sender>
|
|
<signal>toggled(bool)</signal>
|
|
<receiver>fc_custom_mat_dir</receiver>
|
|
<slot>setEnabled(bool)</slot>
|
|
<hints>
|
|
<hint type="sourcelabel">
|
|
<x>216</x>
|
|
<y>87</y>
|
|
</hint>
|
|
<hint type="destinationlabel">
|
|
<x>316</x>
|
|
<y>112</y>
|
|
</hint>
|
|
</hints>
|
|
</connection>
|
|
</connections>
|
|
</ui>
|