OpenToonz - An open-source full-featured 2D animation creation software
C
paste color without link
shun-iwasawad849818d3880
diff --git a/toonz/sources/toonzqt/styleselection.cpp b/toonz/sources/toonzqt/styleselection.cppindex 41b2a1488..0a3c515a9 100644--- a/toonz/sources/toonzqt/styleselection.cpp+++ b/toonz/sources/toonzqt/styleselection.cpp@@ -1106,7 +1106,6 @@ void TStyleSelection::pasteStylesValues(bool pasteName, bool pasteColor) {dstType = STUDIOSTYLE;elsedstType = LINKEDSTYLE;- //---- 追加ここまで iwasawa// For cleanup styles, do not duplicate the cleanup information. Just// paste color information.@@ -1119,55 +1118,65 @@ void TStyleSelection::pasteStylesValues(bool pasteName, bool pasteColor) {// Process the global and original names according to the pasted styleTColorStyle *pastedStyle = getPalette()->getStyle(styleId);- if (srcType == NORMALSTYLE) {- if (dstType == NORMALSTYLE) {- } // 1. From normal to normal. Do nothing.- else if (dstType == STUDIOSTYLE) // 2. From normal to studio. Restore- // the global name- pastedStyle->setGlobalName(dstGlobalName);- else // dstType == LINKEDSTYLE //3. From normal to linked.- // Restore both the global and the original name. Activate the- // edited flag.- {- pastedStyle->setGlobalName(dstGlobalName);- pastedStyle->setOriginalName(dstOriginalName);- pastedStyle->setIsEditedFlag(true);- }- } else if (srcType == STUDIOSTYLE) {- if (dstType == NORMALSTYLE) // 4. From studio to normal. Set the studio- // style's name to the original name.- pastedStyle->setOriginalName(data->getStyle(i)->getName());- else if (dstType == STUDIOSTYLE) // 5. From studio to studio. Restore- // the global name.- pastedStyle->setGlobalName(dstGlobalName);- else // dstStyle == LINKEDSTYLE //6. From studio to- // linked. Set the studio style's name to the original name, and- // set the edited flag to off.- {- pastedStyle->setOriginalName(data->getStyle(i)->getName());- pastedStyle->setIsEditedFlag(false);- }- } else // srcType == LINKEDSTYLE- {- if (dstType == NORMALSTYLE) {- } // 7. From linked to normal. Do nothing.- else if (dstType == STUDIOSTYLE) // 8. From linked to studio. Restore- // the global name. Delete the- // original name. Set the edited flag- // to off.- {- pastedStyle->setGlobalName(dstGlobalName);- pastedStyle->setOriginalName(L"");- pastedStyle->setIsEditedFlag(false);- } else // dstStyle == LINKEDSTYLE //9. From linked to- // linked.- // Do nothing (bring all information from the original).++ // If paste color and name are both ON, then paste the link information.+ if (pasteName) {+ if (srcType == NORMALSTYLE) {+ if (dstType == NORMALSTYLE) {+ } // 1. From normal to normal. Do nothing.+ else if (dstType == STUDIOSTYLE) // 2. From normal to studio. Restore+ // the global name+ pastedStyle->setGlobalName(dstGlobalName);+ else // dstType == LINKEDSTYLE //3. From normal to+ // linked. Restore both the global and the original name.+ // Activate the edited flag.+ {+ pastedStyle->setGlobalName(dstGlobalName);+ pastedStyle->setOriginalName(dstOriginalName);+ pastedStyle->setIsEditedFlag(true);+ }+ } else if (srcType == STUDIOSTYLE) {+ if (dstType ==+ NORMALSTYLE) // 4. From studio to normal. Set the studio+ // style's name to the original name.+ pastedStyle->setOriginalName(data->getStyle(i)->getName());+ else if (dstType == STUDIOSTYLE) // 5. From studio to studio. Restore+ // the global name.+ pastedStyle->setGlobalName(dstGlobalName);+ else // dstType == LINKEDSTYLE //6. From studio to+ // linked. Set the studio style's name to the original name, and+ // set the edited flag to off.+ {+ pastedStyle->setOriginalName(data->getStyle(i)->getName());+ pastedStyle->setIsEditedFlag(false);+ }+ } else // srcType == LINKEDSTYLE{+ if (dstType == NORMALSTYLE) {+ } // 7. From linked to normal. Do nothing.+ else if (dstType == STUDIOSTYLE) // 8. From linked to studio. Restore+ // the global name. Delete the+ // original name. Set the edited+ // flag to off.+ {+ pastedStyle->setGlobalName(dstGlobalName);+ pastedStyle->setOriginalName(L"");+ pastedStyle->setIsEditedFlag(false);+ } else // dstType == LINKEDSTYLE //9. From linked to+ // linked.+ // Do nothing (bring all information from the original).+ {+ }}}-- // put back the name when "paste color"- if (!pasteName) {+ // If paste color is ON and paste name is OFF, then revert the link+ // information (i.e. "paste color" will paste color info only).+ else { // !pasteName+ pastedStyle->setGlobalName(dstGlobalName);+ pastedStyle->setOriginalName(dstOriginalName);+ if (dstType == LINKEDSTYLE) pastedStyle->setIsEditedFlag(true);++ // put back the namepage->getStyle(indexInPage)->setName(styleName);page->getStyle(indexInPage)->setFlags(flags);}@@ -1177,9 +1186,8 @@ void TStyleSelection::pasteStylesValues(bool pasteName, bool pasteColor) {page->getStyle(indexInPage)->setName(data->getStyle(i)->getName());}- // Se gli stili del data sono piu' di quelli selezionati faccio un paste degli- // stili che restano,- // inserisco i nuovi stili dopo indexInPage.+ // If the styles of the data are more than those selected, make a paste of the+ // styles that remain, inserting the new styles after indexInPageif (i < dataStyleCount) {StyleData *newData = new StyleData();int j;