[scribus] two new Scripter commands: copyObject() and pasteObject()
Gregory Pittman
gpittman at iglou.com
Wed Jul 9 00:28:20 UTC 2014
Two new Scripter commands are now available in 1.5.0svn.
Previously there has existed one called duplicateObject(), which makes a
copy of a selected object, which it pastes on top of it.
There has been a movObject() command also, but this only allows you to
change the X, Y coordinates of an object, not move it to some other page.
The new commands simply took what was inside of duplicateObject and
split it.
What's the utility? Check the scripts on this wiki page:
http://wiki.scribus.net/canvas/CopyObject%28%29_and_pasteObject%28%29
paste2all.py allows you to paste a selected object to all pages, odd
pages, or even pages, skipping the original page.
paste2pagelist.py expects you to enter a list of pages to paste your
selected object to.
invisibleImages.py is created on the idea from JLuc he called makedraft,
where you create a new layer for your document, and then move all images
to that layer. The layer is then made invisible and non-printing
(therefore doesn't export to PDF either). Note the particular sequence
of operations for moving an object: first copy, then paste, then delete
the original. After you run the script, you can then of course use the
Layers dialog to make the layer visible and printable again. Something
to consider with this script is that you are creating this new layer on
top of others, which might be an issue for some situations. You could
move the layer, but you may lose some effect you had in your original
document.
I haven't tried it, but an interesting question is what would happen if
you pasteObject() before having copied any? Presumably you would pull in
something from the clipboard...
Greg
More information about the scribus
mailing list