Commit 63b04104 authored by Alexandre Prokoudine's avatar Alexandre Prokoudine

Some basics of loading and exporting the pass-through mode of layer groups in PSD.

The plug-in is still missing two essential bits:

1) setting blend mode to a layer group;
2) preserving layer group when exporting to PSD.
parent 26a238c5
......@@ -280,7 +280,10 @@ psd_lmode_layer (gint32 idLayer,
case GIMP_LAYER_MODE_HARD_MIX:
strcpy (psdMode, "hMix");
break;
case GIMP_LAYER_MODE_PASS_THROUGH:
strcpy (psdMode, "pass");
break;
default:
{
const gchar *nick = "?";
......
......@@ -615,6 +615,9 @@ psd_to_gimp_blend_mode (const gchar *psd_mode,
*/
if (layer_composite) *layer_composite = GIMP_LAYER_COMPOSITE_SRC_ATOP;
if (g_ascii_strncasecmp (psd_mode, "pass", 4) == 0) /* Pass through (CS)*/
return GIMP_LAYER_MODE_PASS_THROUGH;
if (g_ascii_strncasecmp (psd_mode, "norm", 4) == 0) /* Normal (ps3) */
{
if (layer_composite) *layer_composite = GIMP_LAYER_COMPOSITE_AUTO;
......@@ -774,6 +777,11 @@ gimp_to_psd_blend_mode (GimpLayerMode layer_mode,
switch (layer_mode)
{
case GIMP_LAYER_MODE_PASS_THROUGH:
psd_mode = g_strndup ("pass", 4); /* Pass through (CS) */
break;
case GIMP_LAYER_MODE_NORMAL_LEGACY:
psd_mode = g_strndup ("norm", 4); /* Normal (ps3) */
break;
......@@ -984,6 +992,7 @@ gimp_layer_mode_effects_name (GimpLayerMode mode)
"GRAIN EXTRACT",
"GRAIN MERGE",
"COLOR ERASE"
"PASS THROUGH"
};
static gchar *err_name = NULL;
if (mode >= 0 && mode <= GIMP_LAYER_MODE_COLOR_ERASE_LEGACY)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment