Skip to main content
New Participant
November 10, 2018
Answered

Reset transformation points in multiple frames.

  • November 10, 2018
  • 1 reply
  • 2048 views

Hi! I have animation with a lot of moving parts and while applying classic tween all thoose parts obviously rotating over transformation point which I changed while animating. Is there a way to change transformation point in all frames at once or force classic tween to use registration point?

Correct answer JoãoCésar17023019

Hi.

1 - Download this JSFL script file:

animate_cc_jsfl_reset_transformation_points.zip - Google Drive

[Reset Transformation Points JSFL code for reference only:]

function main()

{

    var doc = an.getDocumentDOM();

    var selectionq;

    if (!doc)

    {

         alert("Open a document first.");

         return;

    }

    selection = doc.selection;

    if (doc.selection.length == 0)

    {

         alert("Select one or more objects.");

         return;

    }

    doc.selectNone();

    for (var i = selection.length - 1; i >= 0; i--)

    {

         var element = selection;

         element.selected = true;

         doc.setTransformationPoint({x:0, y:0});

         element.selected = false;

    }

}

main();

2 - Inside of Animate CC, enter the Edit Multiple Frames mode (Alt + Shift + E);

3 - Select all objects you wish to reset the Transformation Point;

4 - Run the script by double-clicking it, dragging and dropping over Animate IDE or by going to Commands > Run Command....

I hope this helps.

Regards,

JC

1 reply

JoãoCésar17023019
JoãoCésar17023019Correct answer
Community Expert
November 10, 2018

Hi.

1 - Download this JSFL script file:

animate_cc_jsfl_reset_transformation_points.zip - Google Drive

[Reset Transformation Points JSFL code for reference only:]

function main()

{

    var doc = an.getDocumentDOM();

    var selectionq;

    if (!doc)

    {

         alert("Open a document first.");

         return;

    }

    selection = doc.selection;

    if (doc.selection.length == 0)

    {

         alert("Select one or more objects.");

         return;

    }

    doc.selectNone();

    for (var i = selection.length - 1; i >= 0; i--)

    {

         var element = selection;

         element.selected = true;

         doc.setTransformationPoint({x:0, y:0});

         element.selected = false;

    }

}

main();

2 - Inside of Animate CC, enter the Edit Multiple Frames mode (Alt + Shift + E);

3 - Select all objects you wish to reset the Transformation Point;

4 - Run the script by double-clicking it, dragging and dropping over Animate IDE or by going to Commands > Run Command....

I hope this helps.

Regards,

JC

New Participant
November 13, 2018

THANK YOU SO MUCH! You saved me thousands of hours! I think I have to start learning how to do scripts. And again, THANK YOU!!!

JoãoCésar17023019
Community Expert
November 13, 2018