This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > PainShop Pro Scripting > September 2007 > vector node script error





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author vector node script error
Bruce

2007-09-27, 3:17 am

I think that there must be an error in the PSP9 script engine. Can
someone confirm if this is true.

If you make a vector path and add a single node, the path will be empty.

Result = App.Do( Environment, 'ReturnVectorObjectProperties' )
Path = Result['ListOfObjects'][0]['ObjectData']['Path']
print Path

Executing ReturnVectorObjectProperties
None

Now, add a single other node and the path is now:

Executing ReturnVectorObjectProperties
[(0, (459.5, 299.5))]

The path always shows 1 less than the number of nodes.

Bruce
Joske

2007-09-27, 6:20 pm

Bruce wrote:

> I think that there must be an error in the PSP9 script engine. Can
> someone confirm if this is true.


> If you make a vector path and add a single node, the path will be
> empty.


> Result = App.Do( Environment, 'ReturnVectorObjectProperties' )
> Path = Result['ListOfObjects'][0]['ObjectData']['Path']
> print Path


> Executing ReturnVectorObjectProperties
> None


> Now, add a single other node and the path is now:


> Executing ReturnVectorObjectProperties
> [(0, (459.5, 299.5))]


> The path always shows 1 less than the number of nodes.


I'm probably misunderstanding your question. I have never had (added) nodes
missing. I recorded several scripts in 9 today doing several paths and
adding nodes to them (line, bezier, freehand). At no time did a node fail to
show up.

What does on occasion happen is that PSP starts having trouble with scripts
when it's been used very intensively for a long time; vectors would be a
good cause. See if closing and restarting solves the problem.

Joske
--
http://members.home.nl/j.a.c.backer/



Bruce

2007-09-28, 3:22 am

Joske wrote:
> Bruce wrote:
>
>
>
>
>
>
>
>
> I'm probably misunderstanding your question. I have never had (added) nodes
> missing. I recorded several scripts in 9 today doing several paths and
> adding nodes to them (line, bezier, freehand). At no time did a node fail to
> show up.
>
> What does on occasion happen is that PSP starts having trouble with scripts
> when it's been used very intensively for a long time; vectors would be a
> good cause. See if closing and restarting solves the problem.
>
> Joske


hi Joske

This is the whole script

from JascApp import *
def ScriptProperties():
return {
'Author': u'',
'Copyright': u'',
'Description': u'',
'Host': u'',
'Host Version': u''}
def Do(Environment):
App.Do( Environment, 'ScriptWndClear' )
Result = App.Do( Environment, 'ReturnVectorObjectProperties' )
Path = Result['ListOfObjects'][0]['ObjectData']['Path']
print Path

No iterations or anything complicated. Add 1 node to an empty vector
image and the path is empty. Add 2 nodes and you will see both nodes in
the path. Delete 1 of the nodes and once again it shows an empty path.
It seems that if there is a single node, it does not appear in the path.

By the way, I downloaded a vector drawing of sunglasses from your web
site. It's amazing that you get such good depth with a few vectors.

thanks
Bruce
Trev

2007-09-28, 6:24 pm


"Bruce" <info@coolit.co.za> wrote in message news:46fb1c55_2@cnews...
> Joske wrote:
>
> hi Joske
>
> This is the whole script
>
> from JascApp import *
> def ScriptProperties():
> return {
> 'Author': u'',
> 'Copyright': u'',
> 'Description': u'',
> 'Host': u'',
> 'Host Version': u''}
> def Do(Environment):
> App.Do( Environment, 'ScriptWndClear' )
> Result = App.Do( Environment, 'ReturnVectorObjectProperties' )
> Path = Result['ListOfObjects'][0]['ObjectData']['Path']
> print Path
>
> No iterations or anything complicated. Add 1 node to an empty vector image
> and the path is empty. Add 2 nodes and you will see both nodes in the
> path. Delete 1 of the nodes and once again it shows an empty path. It
> seems that if there is a single node, it does not appear in the path.
>
> By the way, I downloaded a vector drawing of sunglasses from your web
> site. It's amazing that you get such good depth with a few vectors.
>
> thanks
> Bruce


Unless I'm very mistaken and I often am. A path needs to lay between two
nodes a start and an end


Bruce

2007-09-28, 6:24 pm

Trev wrote:
> Unless I'm very mistaken and I often am. A path needs to lay between two
> nodes a start and an end
>
>

You could be right, but where then are the single node values stored?

Also, if you add another (unconnected) node, both are shown even though
there is no path.

Bruce
Sponsored Links


Copyright 2003 - 2009 forum4designers.com  Software forum  Computer Hardware reviews