mirror of https://github.com/GNOME/gimp.git
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.
This commit is contained in:
parent
26a238c5fb
commit
63b041046e
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue