Skip to main content
Known Participant
September 8, 2022
Question

How to convert all shapes in a AN file to bitmap using jsfl?

  • September 8, 2022
  • 1 reply
  • 633 views

How to convert all shapes in a AN file to bitmap using jsfl?

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
September 8, 2022

loop through all timelines, layers and keyframes selecting each element and then test for a shape and, if true, convert to bitmap:

 

var sel = fl.getDocumentDOM().selection[0];  // this is going to be the (possibly) time-consuming part 
if(sel.elementType == "shape")
fl.getDocumentDOM().convertSelectionToBitmap()
}

kqskcmAuthor
Known Participant
September 8, 2022

this jsfl Convert only one frame to bitmap

kglad
Community Expert
Community Expert
September 8, 2022

like i said, you have to loop through timelines, layers and keyframes to use that code.