[scribus-dev] a couple of new scripter commands

JLuc jluc at no-log.org
Mon Jan 30 11:08:15 UTC 2012


Le 30/01/2012 04:45, Gregory Pittman a écrit :
> Something I mused about today was the idea that, separate from how master pages work, one might want to make a copy of
> an object to a number of pages, maybe all, maybe odd pages, maybe a list of pages.
>
> So I was going to see if I could write a script for this. It turns out there are not sufficient commands to do this.
> About the closest is duplicateObject(), but this makes a single copy on top of the original.
>
> I set about making 2 new commands, copyObject() and pasteObject(), each of which is a modified version of
> duplicateObject(). I've got them working, at least for a single selected object, not multiple objects, and not groups
> (have to work on that issue -- more swimming around the plugin).
>
> The concept as I envisioned it would work thusly in a script:
>
> Test for document and a selected object (maybe have to test for a single selected object).
> copyObject().
> Value dialog for keyword (all, odd, even) or list of page numbers.
> Parse the value(s).
> use gotoPage().
> pasteObject().
> Loop as needed, and useful to skip the object's original page (if 'all' is specified, for example).
>
> I wanted to see if anyone else felt this was of general interest, perhaps using these commands for other purposes, in
> other ways.

I'm not script user but as a UI user, i find this funcionnality is very usefull.

--> It emulates editable parts in masterpages !

So as to achieave this i use the "multiple duplicate" in the User Interface,
and choose a one page high hop...
(could you not call this function from you scripter new entries ?)

Please note that so as specify a one page high hop I have to compute how high is one page hop :
with my documents actual settings it seems to be "one page height" + 1,41111 cm.

- It would be very usefull to have a new little button in the multiple duplicate dialog,
close to the "height" input, so as to copy the correct "one page vertical hop height" in the dialog
and avoiding the user to compute or guess this value.

- As with grouped objects ou multiple object multiple duplicate, there is a concern with the lock status :
the multiple duplicate (in the UI) doesnt copy the locked status of the objects.
When using this functionnality for emulating editable parts in masterpages,
it would be usefull to copy the locked status of the objects.
This is http://bugs.scribus.net/view.php?id=10468

JLuc









More information about the scribus-dev mailing list