Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

True copy/paste in place

Participant ,
Jul 19, 2018 Jul 19, 2018

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();

708
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Jul 20, 2018 Jul 20, 2018

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.

*

...
Translate
Jul 20, 2018 Jul 20, 2018
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines