EMBOSS will not execute in PSP 2018 Script

Moderator: Kathy_9

Post Reply
dondean
Posts: 34
Joined: Fri Apr 19, 2013 6:42 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
ram: 48GB
Hard_Drive_Capacity: 1T+.5T SSD
Corel programs: PSP 2020, 2019, 2018, X9, X8
Location: Kansas, USA

EMBOSS will not execute in PSP 2018 Script

Post by dondean »

Anyone else have this problem?

I have created a script in PSP 2018 where I open a pspimage file (that has vector text in it) and place it on an open JPG photo.
I do several things in the script (I'm creating a watermark on the photo) and one step is to use layer styles and do an EMBOSS and set the lighting.
The script works just fine and all the steps execute except for the EMBOSS & Lighting part.

I've looked at the script in a text editor and the code is there for the EMBOSS.
I've tried performing the steps in a different order, but the Emboss and Lighting part of the script just will not execute on the text.
I've also tried using a Preset shape instead of text, but again, the Emboss and Lighting changes will not execute.

I can manually set the EMBOSS and Lighting in the Layer Styles on the text and that works OK.

Suggestions?
Don
User avatar
Ken Berry
Site Admin
Posts: 22481
Joined: Fri Dec 10, 2004 9:36 pm
operating_system: Windows 11
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Gigabyte B550M DS3H AC
processor: AMD Ryzen 9 5900X
ram: 32 GB DDR4
Video Card: AMD RX 6600 XT
Hard_Drive_Capacity: 1 TB SSD + 2 TB HDD
Monitor/Display Make & Model: Kogan 32" 4K 3840 x 2160
Corel programs: VS2022; PSP2023; DRAW2021; Painter 2022
Location: Levin, New Zealand

Re: EMBOSS will not execute in PSP 2018 Script

Post by Ken Berry »

I've moved your post to the Scripting forum which is the most relevant to your problem.

I am also sure that before long one of our scripting experts will ask to see the script in full, so I suggest you think about posting it now. It will certainly help you get a useful answer.
Ken Berry
dondean
Posts: 34
Joined: Fri Apr 19, 2013 6:42 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
ram: 48GB
Hard_Drive_Capacity: 1T+.5T SSD
Corel programs: PSP 2020, 2019, 2018, X9, X8
Location: Kansas, USA

Re: EMBOSS will not execute in PSP 2018 Script

Post by dondean »

Thanks Ken.
I forgot to check to see if there was a Scripting forum. My Bad.
Here's the code.
----------------------------------------------------------------------------------
from PSPApp import *

def ScriptProperties():
return {
'Author': u'',
'Copyright': u'',
'Description': u'',
'Host': u'PaintShop Pro',
'Host Version': u'20.00'
}

def Do(Environment):
# EnableOptimizedScriptUndo
App.Do( Environment, 'EnableOptimizedScriptUndo', {
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Default,
'AutoActionMode': App.Constants.AutoActionMode.Match,
'Version': ((20,0,0),1)
}
})

# FileOpen
App.Do( Environment, 'FileOpen', {
'FileList': [u'C:\\Users\\dfort\\Documents\\Photo Retouching\\Logo\\DP watermark vect'\
u'or group.pspimage'],
'Folder': u'C:\\Users\\dfort\\Documents\\Photo Retouching\\Logo',
'FileFormat': App.Constants.FileFormat.Unknown,
'ShowPreview': True,
'EnableBrowser': True,
'FavFileList': [],
'RawCameraSettings': {
'WhiteBalance': App.Constants.WhiteBalance.AsShot,
'SharpenMode': App.Constants.SharpenMode.Low,
'Exposure': 0,
'Rect': ((0,0), 0, 0),
'ShowMaximized': False,
'ShowPreview': True
},
'FileOpenScript': u'',
'EnablePreprocessing': False,
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Default,
'AutoActionMode': App.Constants.AutoActionMode.Match,
'Version': ((20,0,0),1)
}
})

# SelectDocument
App.Do( Environment, 'SelectDocument', {
'SelectedImage': 0,
'Strict': False,
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Default,
'AutoActionMode': App.Constants.AutoActionMode.Match,
'Version': ((20,0,0),1)
}
})

# Copy
App.Do( Environment, 'Copy', {
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Default,
'AutoActionMode': App.Constants.AutoActionMode.Match,
'Version': ((20,0,0),1)
}
})

# FileClose
App.Do( Environment, 'FileClose', {
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Silent,
'AutoActionMode': App.Constants.AutoActionMode.Match,
'Version': ((20,0,0),1)
}
})

# SelectDocument
App.Do( Environment, 'SelectDocument', {
'SelectedImage': 0,
'Strict': False,
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Default,
'AutoActionMode': App.Constants.AutoActionMode.Match,
'Version': ((20,0,0),1)
}
})

# PasteAsNewLayer
App.Do( Environment, 'PasteAsNewLayer', {
'CreateFromDropData': False,
'InsertPos': -1,
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Default,
'AutoActionMode': App.Constants.AutoActionMode.Match,
'Version': ((20,0,0),1)
}
})

# Vector Selection Update
App.Do( Environment, 'VectorSelectionUpdate', {
'Path': (0,0,[1],False),
'Type': App.Constants.ObjectSelection.Select,
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Silent,
'AutoActionMode': App.Constants.AutoActionMode.Default,
'Version': ((20,0,0),1)
}
})

# Resize
App.Do( Environment, 'Resize', {
'AspectRatio': 1.6,
'CurrentDimensionUnits': App.Constants.UnitsOfMeasure.Pixels,
'CurrentResolutionUnits': App.Constants.ResolutionUnits.PixelsPerIn,
'Height': 600,
'MaintainAspectRatio': True,
'Resample': True,
'ResampleType': App.Constants.ResampleType.Bicubic,
'ResizeAllLayers': False,
'Resolution': 96,
'Width': 960,
'SharpnessValue': 50,
'AdvancedMode': True,
'ResizeType': 0,
'OneSide_Type': 0,
'OneSide_LongWidth': 1925,
'OneSide_ShortHeight': 1203,
'OneSide_Unit': App.Constants.UnitsOfMeasure.Pixels,
'OneSide_Active': 0,
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Default,
'AutoActionMode': App.Constants.AutoActionMode.Match,
'Version': ((20,0,0),1)
}
})

# Vector Align Center in Canvas
App.Do( Environment, 'VectorAlignCenterInCanvas', {
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Default,
'AutoActionMode': App.Constants.AutoActionMode.Match,
'Version': ((20,0,0),1)
}
})

# Layer Properties
App.Do( Environment, 'LayerProperties', {
'General': None,
'BlendRanges': None,
'Path': None,
'ArtMediaTexture': None,
'Effects': {
'Enabled': True,
'DropShadow': {
'Enabled': False,
'Color': (0,0,0),
'Size': 0.2,
'Opacity': 0.8,
'OffsetX': 0.5,
'OffsetY': -0.5
},
'InnerGlow': {
'Enabled': False,
'Color': (255,255,255),
'Size': 0.3,
'Opacity': 0.5
},
'OuterGlow': {
'Enabled': False,
'Color': (255,255,255),
'Size': 0.43,
'Opacity': 0.8
},
'Bevel': {
'Enabled': False,
'Color': (255,255,255),
'Size': 0.1,
'Opacity': 0.5,
'LightX': -0.5,
'LightY': 0.5,
'LightZ': 0.5
},
'Emboss': {
'Enabled': True,
'Size': 0.05,
'Opacity': 0.5,
'LightX': 0.342105,
'LightY': 0.276316,
'LightZ': 0.898117
},
'Object': {
'Enabled': True,
'Opacity': 1
},
'Reflection': {
'Enabled': False,
'Size': 0.5,
'Opacity': 0.5,
'Axis': 0
}
},
'BrightnessContrast': None,
'ChannelMixer': None,
'ColorBalance': None,
'CurveParams': None,
'HSL': None,
'Threshold': None,
'Levels': None,
'Posterize': None,
'Vibrancy': None,
'Overlay': None,
'LocalToneMapping': None,
'Invert': None,
'HistogramAdjustment': None,
'FillLightClarity': None,
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Default,
'AutoActionMode': App.Constants.AutoActionMode.Match,
'Version': ((20,0,0),1)
}
})

# MultiObjectProperties
App.Do( Environment, 'MultiObjectProperties', {
'General': {
'Opacity': 65,
'Name': None,
'IsVisible': None,
'IsTransparencyLocked': None,
'LinkSet': None,
'UseHighlight': None,
'PaletteHighlightColor': None,
'GroupLink': None,
'BlendMode': None
},
'Effects': None,
'WorkingMode': 0,
'Path': (0,0,[],False),
'GeneralSettings': {
'ExecutionMode': App.Constants.ExecutionMode.Silent,
'AutoActionMode': App.Constants.AutoActionMode.AllAlways,
'Version': ((20,0,0),1)
}
})
LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Re: EMBOSS will not execute in PSP 2018 Script

Post by LeviFiction »

I am on vacation and so did not bring my laptop with me to try this, but from a cursory look, try removing the last command, multiobjectproperties. I know it decreased the opacity but I curious if it makes a difference. From my reading of the code it should not, but still, PSP has done weirder things.

If you hit the edit script button it should open the simple script editor which let's you disable the command by unchecking it. This comments out the command without deleting it. So you can get it back quickly.
https://levifiction.wordpress.com/
dondean
Posts: 34
Joined: Fri Apr 19, 2013 6:42 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
ram: 48GB
Hard_Drive_Capacity: 1T+.5T SSD
Corel programs: PSP 2020, 2019, 2018, X9, X8
Location: Kansas, USA

Re: EMBOSS will not execute in PSP 2018 Script

Post by dondean »

Thanks so much LeviFiction for taking time to look at the code while even being on vacation.
(I have watched some of your PSP videos and have learned a lot. Kudos to you for great work.)

I unchecked the "multiobjectproperties" box, then looked at the code to verify that the section was commented out after I saved it.
Ran it again and still no Embossing was performed. :(
LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Re: EMBOSS will not execute in PSP 2018 Script

Post by LeviFiction »

Still working on it, I'm finding some interesting tendencies. For example, I can save a quick script that works just fine, but if I do a regular recording it doesn't and I'm not sure what the difference is. There technically shouldn't be any. But I think I should have a solution before the end of the day. Could be wrong but I'll definitely try.
https://levifiction.wordpress.com/
dondean
Posts: 34
Joined: Fri Apr 19, 2013 6:42 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
ram: 48GB
Hard_Drive_Capacity: 1T+.5T SSD
Corel programs: PSP 2020, 2019, 2018, X9, X8
Location: Kansas, USA

Re: EMBOSS will not execute in PSP 2018 Script

Post by dondean »

Thanks LeviFiction.
Don't feel rushed to get this solved.
I would like to eventually know what's going on and why the script won't work.

BTW: What is a "quick script",
as opposed to a "regular recording" which is what I have been using.

Don
LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Re: EMBOSS will not execute in PSP 2018 Script

Post by LeviFiction »

The only difference between a quickscript and a regular script is how they are recorded and played. But the content and how they act inside PSP are exactly the same as they are both just scripts.

A quick script is a temporary script that is recorded from the History Palette. You select the commands in the history palette that you want to convert into a script. Then you click on the "Save to Quickscript" button on the History Palette. There is also a "Play Quickscript" button on the history palette. It's meant for quick and repetitive tasks. Something you wouldn't want to keep around. Imagine having to scroll through 27 meaningless one time use scripts to get at a script you use all of the time. It would get annoying quickly.

Quickscripts are replaced every time you hit the 'Save to quickscript" button so you can only ever have one at a time.

And I am no closer to a solution. Even the quickscript stopped working. :P This is either a bug, or there's something simple to it that I'm overlooking. I tend to do that a lot.
https://levifiction.wordpress.com/
LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Re: EMBOSS will not execute in PSP 2018 Script

Post by LeviFiction »

Okay, I'm gonna call this a bug. I'll show you why in a video, but essentially the ability to add layer effects is dependent upon you having opened the layer styles in the first place. I don't really understand why.

We can get around this by making sure that the ability to turn effects on and off is already built into the watermark image. I'm not explaining this well, so here's a video demonstration of the problem and my proposed fix.

https://drive.google.com/file/d/1VOcoxR ... C6uFG/view

So the solution is:
1) Open your logo watermark image
2) Open Layer Properties on the vector layer
3) Close Layer Properties
4) Save Image
5) Run script, it should now work perfectly.
https://levifiction.wordpress.com/
dondean
Posts: 34
Joined: Fri Apr 19, 2013 6:42 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
ram: 48GB
Hard_Drive_Capacity: 1T+.5T SSD
Corel programs: PSP 2020, 2019, 2018, X9, X8
Location: Kansas, USA

Re: EMBOSS will not execute in PSP 2018 Script

Post by dondean »

LeviFiction wrote:Okay, I'm gonna call this a bug. I'll show you why in a video, but essentially the ability to add layer effects is dependent upon you having opened the layer styles in the first place. I don't really understand why.

We can get around this by making sure that the ability to turn effects on and off is already built into the watermark image. I'm not explaining this well, so here's a video demonstration of the problem and my proposed fix.

https://drive.google.com/file/d/1VOcoxR ... C6uFG/view
Thanks a million LeviFiction (do you go by Levi for short, or do you prefer LeviFiction) :?:

Thanks for taking the time to show me how the "Quickscripts" work. That is a feature I had not used before.
There is nothing about it in the PSP documentation, so I didn't know how to do it and your video was very helpful. (That's the one thing that frustrates me about PSP documentation, the PSP team does not do a thorough job in explaining all the features and how to use them in their documentation) :x

I did like you explained by opening the Layer Properties on my watermark file and saving it again, and now it works like a charm. Wonderful.
Thanks so much for taking the time to figure things out and doing the video. Very helpful.
:D

Don
Post Reply