@@ -39,6 +39,8 @@ AppModuleProperties::AppModuleProperties(Settings* settings)
3939 groupId_application(settings->addGroup (textId(" application" ))),
4040 groupId_meshing(settings->addGroup (textId(" meshing" ))),
4141 groupId_graphics(settings->addGroup (textId(" graphics" ))),
42+ groupId_import(settings->addGroup (textId(" import" ))),
43+ groupId_export(settings->addGroup (textId(" export" ))),
4244 language(this , textId(" language" ), &AppModule::languages()),
4345 viewCubeCorner(this , textId(" viewCubeCorner" ), &cornerEnumeration()),
4446 m_settings(settings)
@@ -95,6 +97,9 @@ AppModuleProperties::AppModuleProperties(Settings* settings)
9597 settings->addSetting (&this ->meshDefaultsShowEdges , sectionId_graphicsMeshDefaults);
9698 settings->addSetting (&this ->meshDefaultsShowNodes , sectionId_graphicsMeshDefaults);
9799
100+ // Import
101+ settings->addSetting (&this ->autoExpandCompoundToAssembly , groupId_import);
102+
98103 // Register reset functions
99104 settings->addResetFunction (sectionId_systemUnits, [=]{
100105 this ->unitSystemDecimals .setValue (2 );
@@ -139,14 +144,16 @@ AppModuleProperties::AppModuleProperties(Settings* settings)
139144 this ->meshDefaultsShowEdges .setValue (meshDefaults.showEdges );
140145 this ->meshDefaultsShowNodes .setValue (meshDefaults.showNodes );
141146 });
147+ settings->addResetFunction (groupId_import, [=]{
148+ this ->autoExpandCompoundToAssembly .setValue (true );
149+ });
142150}
143151
144152void AppModuleProperties::IO_bindParameters (const IO::System* ioSystem)
145153{
146154 // Import
147- const auto groupId_Import = m_settings->addGroup (textId (" import" ));
148155 for (IO::Format format : ioSystem->readerFormats ()) {
149- auto sectionId_format = m_settings->addSection (groupId_Import , IO::formatIdentifier (format));
156+ auto sectionId_format = m_settings->addSection (groupId_import , IO::formatIdentifier (format));
150157 const IO::FactoryReader* factory = ioSystem->findFactoryReader (format);
151158 std::unique_ptr<PropertyGroup> ptrGroup = factory->createProperties (format, m_settings);
152159 if (ptrGroup) {
@@ -161,9 +168,8 @@ void AppModuleProperties::IO_bindParameters(const IO::System* ioSystem)
161168 }
162169
163170 // Export
164- const auto groupId_Export = m_settings->addGroup (textId (" export" ));
165171 for (IO::Format format : ioSystem->writerFormats ()) {
166- auto sectionId_format = m_settings->addSection (groupId_Export , IO::formatIdentifier (format));
172+ auto sectionId_format = m_settings->addSection (groupId_export , IO::formatIdentifier (format));
167173 const IO::FactoryWriter* factory = ioSystem->findFactoryWriter (format);
168174 std::unique_ptr<PropertyGroup> ptrGroup = factory->createProperties (format, m_settings);
169175 if (ptrGroup) {
@@ -253,6 +259,12 @@ void AppModuleProperties::retranslate()
253259 this ->clipPlanesCappingHatchOn .setDescription (
254260 textIdTr (" Enable capping hatch texture of currently clipped graphics" )
255261 );
262+
263+ // Import
264+ this ->autoExpandCompoundToAssembly .setDescription (
265+ textIdTr (" Automatically expand compound shapes to assemblies. For some input models this "
266+ " allows 3D exploding" )
267+ );
256268}
257269
258270void AppModuleProperties::onPropertyChanged (Property* prop)
0 commit comments