Skip to content

Instantly share code, notes, and snippets.

@bob-ross27
Created January 15, 2021 03:02
Show Gist options
  • Save bob-ross27/6e8015c3d2c6f5ae44584b5ef27ca4fa to your computer and use it in GitHub Desktop.
Save bob-ross27/6e8015c3d2c6f5ae44584b5ef27ca4fa to your computer and use it in GitHub Desktop.
Set the drawing art layers to Bitmap for all selected read nodes.
/**
* Set the drawing art layers to Bitmap for all selected read nodes.
*/
scene.beginUndoRedoAccum("Set Layers to Bitmap");
var readNodes = selection.selectedNodes().filter(function(selNode) {
return node.type(selNode) === "READ";
}
)
readNodes.forEach(function(n) {
node.setTextAttr(n, "overlayArtDrawingMode", 1, "Bitmap");
node.setTextAttr(n, "lineArtDrawingMode", 1, "Bitmap");
node.setTextAttr(n, "colorArtDrawingMode", 1, "Bitmap");
node.setTextAttr(n, "underlayArtDrawingMode", 1, "Bitmap");
});
MessageBox.information("All operations complete.");
scene.endUndoRedoAccum();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment