Copy link to clipboard
Copied
Hey guys,
I'm trying to write a JSFL script that will copy and paste between symbols while taking their different transforms into consideration. I'm using viewMatrix, and I'm close, but I'm not quite there, and I'm at wit's end. The scale and rotation is always right, no matter what combination of transforms are involved, but the positioning can be way off depending on the transforms.
Any ideas?
the code for copy:
var _doc = fl.getDocumentDOM();
if (_doc.selection.length > 0)
{
_doc.clipCopy();
fl.PHAcopyMatrix = _doc.viewMatrix;
}
and the code for paste:
var _doc = fl.getDocumentDOM();
_doc.clipPaste(true);
_doc.group();
var el = _doc.selection[0];
el.matrix = fl.Math.concatMatrix(fl.Math.invertMatrix(_doc.viewMatrix), fl.PHAcopyMatrix);
_doc.selection = [el];
_doc.unGroup();
Hi Bluebuzzle,
While looking for a solution to our query I got this thread - Copy and paste is NOT on the exact same position which actually amazed me.
Please note that the link in this thread might have been expired but here I have got one for you - Downloads | electric dog :: flanimate power tools.​ ​
If you are concerned about the registration point (position) of the symbol while copying and pasting then the above might work for you.
Let me know if you need any help with execution of this tool.
*
...Copy link to clipboard
Copied
Hi Bluebuzzle,
While looking for a solution to our query I got this thread - Copy and paste is NOT on the exact same position which actually amazed me.
Please note that the link in this thread might have been expired but here I have got one for you - Downloads | electric dog :: flanimate power tools.​ ​
If you are concerned about the registration point (position) of the symbol while copying and pasting then the above might work for you.
Let me know if you need any help with execution of this tool.
*Note - This is a third party tool site and in no way endorsed by Adobe*
Thanks!
Ankush
Find more inspiration, events, and resources on the new Adobe Community
Explore Now