Changeset View
Changeset View
Standalone View
Standalone View
plugins/impex/psd/psd_loader.cpp
Show First 20 Lines • Show All 232 Lines • ▼ Show 20 Line(s) | 216 | else if ((layerRecord->infoBlocks.sectionDividerType == psd_open_folder || | |||
---|---|---|---|---|---|
233 | } | 233 | } | ||
234 | 234 | | |||
235 | groupLayer->setName(layerRecord->layerName); | 235 | groupLayer->setName(layerRecord->layerName); | ||
236 | groupLayer->setVisible(layerRecord->visible); | 236 | groupLayer->setVisible(layerRecord->visible); | ||
237 | 237 | | |||
238 | QString compositeOp = psd_blendmode_to_composite_op(layerRecord->infoBlocks.sectionDividerBlendMode); | 238 | QString compositeOp = psd_blendmode_to_composite_op(layerRecord->infoBlocks.sectionDividerBlendMode); | ||
239 | 239 | | |||
240 | // Krita doesn't support pass-through blend | 240 | // Krita doesn't support pass-through blend | ||
241 | // mode. Instead it is just a property of a goupr | 241 | // mode. Instead it is just a property of a group | ||
242 | // layer, so flip it | 242 | // layer, so flip it | ||
243 | if (compositeOp == COMPOSITE_PASS_THROUGH) { | 243 | if (compositeOp == COMPOSITE_PASS_THROUGH) { | ||
244 | compositeOp = COMPOSITE_OVER; | 244 | compositeOp = COMPOSITE_OVER; | ||
245 | groupLayer->setPassThroughMode(true); | 245 | groupLayer->setPassThroughMode(true); | ||
246 | } | 246 | } | ||
247 | 247 | | |||
248 | groupLayer->setCompositeOpId(compositeOp); | 248 | groupLayer->setCompositeOpId(compositeOp); | ||
249 | 249 | | |||
250 | newLayer = groupLayer; | 250 | newLayer = groupLayer; | ||
251 | } else { | 251 | } else { | ||
252 | /** | 252 | /** | ||
253 | * In some files saved by PS CS6 the group layer sections seem | 253 | * In some files saved by PS CS6 the group layer sections seem | ||
254 | * to be unbalanced. I don't know why it happens because the | 254 | * to be unbalanced. I don't know why it happens because the | ||
255 | * reporter didn't provide us an example file. So here we just | 255 | * reporter didn't provide us an example file. So here we just | ||
256 | * check if the new layer was created, and if not, skip the | 256 | * check if the new layer was created, and if not, skip the | ||
257 | * initialization of masks. | 257 | * initialization of masks. | ||
258 | * | 258 | * | ||
259 | * See bug: 357559 | 259 | * See bug: 357559 | ||
260 | */ | 260 | */ | ||
261 | 261 | | |||
262 | warnKrita << "WARNING: Provided PSD has unbalanced group " | 262 | warnKrita << "WARNING: Provided PSD has unbalanced group " | ||
263 | << "layer markers. Some masks and/or layers can " | 263 | << "layer markers. Some masks and/or layers can " | ||
264 | << "be lost while loading this file. Please " | 264 | << "be lost while loading this file. Please " | ||
265 | << "report a bug to Krita developes and attach " | 265 | << "report a bug to Krita developers and attach " | ||
266 | << "this file to the bugreport\n" | 266 | << "this file to the bugreport\n" | ||
267 | << " " << ppVar(layerRecord->layerName) << "\n" | 267 | << " " << ppVar(layerRecord->layerName) << "\n" | ||
268 | << " " << ppVar(layerRecord->infoBlocks.sectionDividerType) << "\n" | 268 | << " " << ppVar(layerRecord->infoBlocks.sectionDividerType) << "\n" | ||
269 | << " " << ppVar(groupStack.size()); | 269 | << " " << ppVar(groupStack.size()); | ||
270 | continue; | 270 | continue; | ||
271 | } | 271 | } | ||
272 | } | 272 | } | ||
273 | else { | 273 | else { | ||
▲ Show 20 Lines • Show All 107 Lines • Show Last 20 Lines |