@@ -208,6 +208,7 @@ better quality. **DOES NOT EXPORT MESH**";
208208
209209 // LOD Settings
210210 QHBoxLayout* lodSettingsLayout = new QHBoxLayout ();
211+ lodSettingsLayout->setContentsMargins (0 ,0 ,0 ,0 );
211212 m_wLodSettingsButton = new QPushButton (tr (" Configure LOD Settings" ), this );
212213 connect (m_wLodSettingsButton, SIGNAL (released ()), this , SLOT (HandleLodSettingsButton ()));
213214 m_wEnableLodCheckBox = new QCheckBox (" " , this );
@@ -275,7 +276,11 @@ better quality. **DOES NOT EXPORT MESH**";
275276 mainLayout->addRow (" Asset Type" , assetTypeCombo);
276277 mainLayout->addRow (" Export Morphs" , morphsLayout);
277278 mainLayout->addRow (" Bake Subdivision" , subdivisionLayout);
279+
280+ // Create LOD Row, then store lod row widget, then hide row as default state
278281 mainLayout->addRow (" Enable LOD" , lodSettingsLayout);
282+ m_wLodRowLabelWidget = mainLayout->itemAt (mainLayout->rowCount ()-1 , QFormLayout::LabelRole)->widget ();
283+ this ->showLodRow (false );
279284
280285 // Advanced Settings Layout
281286 advancedLayout->addRow (" " , m_BridgeVersionLabel);
@@ -316,7 +321,15 @@ better quality. **DOES NOT EXPORT MESH**";
316321 exportMaterialPropertyCSVCheckBox->setWhatsThis (" Checking this will write out a CSV of all the material properties. Useful for reference when changing materials." );
317322 enableNormalMapGenerationCheckBox->setWhatsThis (" Checking this will enable generation of Normal Maps for any surfaces that only have Bump Height Maps." );
318323 // m_wTargetPluginInstaller->setWhatsThis("Install a plugin to use Daz Bridge with the destination software.");
319- m_wLodSettingsButton->setWhatsThis (" Configure how Level of Detail (LOD) meshes are set up or generated in the destination software." );
324+ QString sEnableLodHelp = tr (" Enable Level of Detail (LOD) mesh. Specific features depend on the destination software." );
325+ m_wLodRowLabelWidget->setWhatsThis (sEnableLodHelp );
326+ m_wLodRowLabelWidget->setToolTip (sEnableLodHelp );
327+ m_wEnableLodCheckBox->setWhatsThis (sEnableLodHelp );
328+ m_wEnableLodCheckBox->setToolTip (sEnableLodHelp );
329+ QString sLodSettingsHelp = tr (" Configure how Level of Detail (LOD) meshes are set up or generated in the destination software." );
330+ m_wLodSettingsButton->setWhatsThis (sLodSettingsHelp );
331+ m_wLodSettingsButton->setToolTip (sLodSettingsHelp );
332+
320333
321334 // detect scene change
322335 connect (dzScene, SIGNAL (nodeSelectionListChanged ()), this , SLOT (handleSceneSelectionChanged ()));
@@ -328,6 +341,7 @@ better quality. **DOES NOT EXPORT MESH**";
328341 {
329342 setDisabled (true );
330343 }
344+
331345#ifndef VODSVERSION
332346 m_WelcomeLabel->setVisible (true );
333347#endif
@@ -840,22 +854,44 @@ void DzBridgeDialog::HandleAssetTypeComboChange(int state)
840854{
841855 QString assetNameString = assetNameEdit->text ();
842856
843- // enable/disable Subdivision if Environment selected
844- if (assetTypeCombo->currentText () == " Environment" )
857+ // TODO: replace string compare with itemData system
858+ QString sAssetType = assetTypeCombo->currentText ();
859+
860+ // / Enable morphs if:
861+ // / skeletal mesh, static mesh, animation
862+ if (sAssetType == " Skeletal Mesh" ||
863+ sAssetType == " Static Mesh" ||
864+ sAssetType == " Animation" ||
865+ sAssetType == " Pose" )
866+ {
867+ morphsEnabledCheckBox->setDisabled (false );
868+ morphsButton->setDisabled (false );
869+ }
870+ else
845871 {
846872 morphsEnabledCheckBox->setChecked (false );
847873 morphsEnabledCheckBox->setDisabled (true );
848874 morphsButton->setDisabled (true );
849- subdivisionEnabledCheckBox->setChecked (false );
850- subdivisionEnabledCheckBox->setDisabled (true );
851- subdivisionButton->setDisabled (true );
852875 }
853- else
876+
877+ // / Enable subdivision and lod only if:
878+ // / skeletal mesh, static mesh
879+ if (sAssetType == " Skeletal Mesh" ||
880+ sAssetType == " Static Mesh" )
854881 {
855- morphsEnabledCheckBox->setDisabled (false );
856- morphsButton->setDisabled (false );
857882 subdivisionEnabledCheckBox->setDisabled (false );
858883 subdivisionButton->setDisabled (false );
884+ m_wEnableLodCheckBox->setDisabled (false );
885+ m_wLodSettingsButton->setDisabled (false );
886+ }
887+ else
888+ {
889+ subdivisionEnabledCheckBox->setChecked (false );
890+ subdivisionEnabledCheckBox->setDisabled (true );
891+ subdivisionButton->setDisabled (true );
892+ m_wEnableLodCheckBox->setChecked (false );
893+ m_wEnableLodCheckBox->setDisabled (true );
894+ m_wLodSettingsButton->setDisabled (true );
859895 }
860896
861897}
@@ -896,4 +932,14 @@ void DzBridgeDialog::HandleEnableLodCheckBoxChange(int state)
896932 settings->setValue (" LodEnabled" , state == Qt::Checked);
897933}
898934
935+ void DzBridgeDialog::showLodRow (bool bShowWidget)
936+ {
937+ if (m_wLodRowLabelWidget == nullptr ) return ;
938+
939+ m_wEnableLodCheckBox->setVisible (bShowWidget);
940+ m_wLodSettingsButton->setVisible (bShowWidget);
941+ m_wLodRowLabelWidget->setVisible (bShowWidget);
942+
943+ }
944+
899945#include " moc_DzBridgeDialog.cpp"
0 commit comments