@@ -162,7 +162,21 @@ DzBridgeMorphSelectionDialog::DzBridgeMorphSelectionDialog(QWidget *parent) :
162162 fakeDualQuatCheckBox->setVisible (false );
163163 fakeDualQuatCheckBox->setWhatsThis (" Adds additional JCMs that fake the difference between Linear Blending and Dual Quaternion Skinning." );
164164
165+ allowMorphDoubleDippingCheckBox = new QCheckBox (tr (" Allow Morph Double-Dipping." ));
166+ allowMorphDoubleDippingCheckBox->setChecked (false );
167+ allowMorphDoubleDippingCheckBox->setVisible (true );
168+ QString sAllowDoubleDippingHelpText = QString (tr (" Allow Connected Morphs such as Victoria 9 and Victoria 9 Head \
169+ and Victoria 9 Body to all fully contribute to the exported blendshape when they are exported simultaneously. \
170+ WARNING: this will cause 200% or similar morph distortion when they are all applied together and may break \
171+ functionallity for some Morph and JCM products." ));
172+ allowMorphDoubleDippingCheckBox->setWhatsThis (sAllowDoubleDippingHelpText );
173+ allowMorphDoubleDippingCheckBox->setToolTip (sAllowDoubleDippingHelpText );
174+
165175 QPushButton* AddConnectedMorphsButton = new QPushButton (" Add Connected Morphs" );
176+ AddConnectedMorphsButton->setVisible (false );
177+ QString sAddConnectedMorphsHelpText = QString (tr (" Add any morphs or property sliders which can contribute to strength of exported morphs." ));
178+ AddConnectedMorphsButton->setWhatsThis (sAddConnectedMorphsHelpText );
179+ AddConnectedMorphsButton->setToolTip (sAddConnectedMorphsHelpText );
166180
167181 ((QGridLayout*)JCMGroupBox->layout ())->addWidget (ArmsJCMButton, 0 , 0 );
168182 ((QGridLayout*)JCMGroupBox->layout ())->addWidget (LegsJCMButton, 0 , 1 );
@@ -175,6 +189,7 @@ DzBridgeMorphSelectionDialog::DzBridgeMorphSelectionDialog(QWidget *parent) :
175189 MorphGroupBox->layout ()->addWidget (autoJCMCheckBox);
176190 MorphGroupBox->layout ()->addWidget (fakeDualQuatCheckBox);
177191 MorphGroupBox->layout ()->addWidget (AddConnectedMorphsButton);
192+ MorphGroupBox->layout ()->addWidget (allowMorphDoubleDippingCheckBox);
178193
179194 if (!settings->value (" AutoJCMEnabled" ).isNull ())
180195 {
@@ -1361,28 +1376,32 @@ QList<QString> DzBridgeMorphSelectionDialog::getMorphNamesToDisconnectList()
13611376{
13621377 QList<QString> morphsToDisconnect;
13631378
1364- foreach (MorphInfo exportMorph, m_morphsToExport_finalized)
1379+ // DB 2023-July-10, Allow Morph Double-Dipping
1380+ if (this ->allowMorphDoubleDippingCheckBox ->isChecked () == false )
13651381 {
1366- DzProperty* morphProperty = exportMorph.Property ;
1367- // DB (2022-Sept-26): crashfix
1368- if (morphProperty == nullptr )
1369- continue ;
1370-
1371- // DB, 2022-June-07: NOTE: using iterator may be more efficient due to potentially large number of controllers
1372- for (auto iterator = morphProperty->controllerListIterator (); iterator.hasNext (); )
1382+ foreach (MorphInfo exportMorph, m_morphsToExport_finalized)
13731383 {
1374- DzERCLink* ercLink = qobject_cast<DzERCLink*>(iterator.next ());
1375- if (ercLink == nullptr )
1384+ DzProperty* morphProperty = exportMorph.Property ;
1385+ // DB (2022-Sept-26): crashfix
1386+ if (morphProperty == nullptr )
13761387 continue ;
1377- auto controllerProperty = ercLink->getProperty ();
1378- QString sControllerName = getMorphPropertyName (controllerProperty);
1379- // iterate through each exported morph
1380- foreach (MorphInfo compareMorph, m_morphsToExport_finalized)
1388+
1389+ // DB, 2022-June-07: NOTE: using iterator may be more efficient due to potentially large number of controllers
1390+ for (auto iterator = morphProperty->controllerListIterator (); iterator.hasNext (); )
13811391 {
1382- if (compareMorph.Name == sControllerName )
1392+ DzERCLink* ercLink = qobject_cast<DzERCLink*>(iterator.next ());
1393+ if (ercLink == nullptr )
1394+ continue ;
1395+ auto controllerProperty = ercLink->getProperty ();
1396+ QString sControllerName = getMorphPropertyName (controllerProperty);
1397+ // iterate through each exported morph
1398+ foreach (MorphInfo compareMorph, m_morphsToExport_finalized)
13831399 {
1384- morphsToDisconnect.append (exportMorph.Name );
1385- break ;
1400+ if (compareMorph.Name == sControllerName )
1401+ {
1402+ morphsToDisconnect.append (exportMorph.Name );
1403+ break ;
1404+ }
13861405 }
13871406 }
13881407 }
@@ -1407,6 +1426,7 @@ void DzBridgeMorphSelectionDialog::SetAutoJCMVisible(bool bVisible)
14071426 return ;
14081427 autoJCMCheckBox->setVisible (bVisible);
14091428 fakeDualQuatCheckBox->setVisible (bVisible);
1429+ AddConnectedMorphsButton->setVisible (bVisible);
14101430 update ();
14111431}
14121432
@@ -1435,4 +1455,21 @@ void DzBridgeMorphSelectionDialog::SetAutoJCMEnabled(bool bEnabled)
14351455 update ();
14361456}
14371457
1458+ void DzBridgeMorphSelectionDialog::SetAllowMorphDoubleDippingEnabled (bool bEnabled)
1459+ {
1460+ if (allowMorphDoubleDippingCheckBox == nullptr )
1461+ return ;
1462+ allowMorphDoubleDippingCheckBox->setChecked (bEnabled);
1463+ update ();
1464+ }
1465+
1466+ void DzBridgeMorphSelectionDialog::SetAllowMorphDoubleDippingVisible (bool bVisible)
1467+ {
1468+ if (allowMorphDoubleDippingCheckBox == nullptr )
1469+ return ;
1470+ allowMorphDoubleDippingCheckBox->setVisible (bVisible);
1471+ update ();
1472+ }
1473+
1474+
14381475#include " moc_DzBridgeMorphSelectionDialog.cpp"
0 commit comments