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

Reset transformation points in multiple frames.

New Here ,
Nov 10, 2018 Nov 10, 2018

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?

1.9K
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

Community Expert , Nov 10, 2018 Nov 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

...
Translate
Community Expert ,
Nov 10, 2018 Nov 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

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
New Here ,
Nov 12, 2018 Nov 12, 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!!!

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
Community Expert ,
Nov 13, 2018 Nov 13, 2018
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
New Here ,
Jun 13, 2022 Jun 13, 2022

That link is not working any more 😕

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
Community Expert ,
Jun 13, 2022 Jun 13, 2022

Hi.

 

You can just copy and paste the script into a text file and save it with a .jsfl extension.

 

Please let us know if you need further assistance.

 

Regards,

JC

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
New Here ,
Jun 13, 2022 Jun 13, 2022

For some reason is not working for me. I followed that exact instruction. 

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
New Here ,
Apr 19, 2025 Apr 19, 2025
LATEST

Hi.

Gemini fixed it,It works for me.

 
function main() {
    var doc = fl.getDocumentDOM();
    var selection;
    if (!doc) {
        fl.alert("Open a document first.");
        return;
    }
    selection = doc.selection;
    if (selection.length == 0) {
        fl.alert("Select one or more objects.");
        return;
    }

    for (var i = selection.length - 1; i >= 0; i--){
        var element = selection[i];
        element.transformationPoint = { x: 0, y: 0 }; 
	element.selected = false; 
    }
}

main();

 

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