This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "/Users/david/Desktop/input_composition.jsx"; | |
#include "/Users/david/Desktop/current_workspace.jsx"; | |
function create_json_file(object) { | |
var text = JSON.stringify(object); | |
var file = new File("~/Desktop/input_composition_cache.json"); | |
file.encoding = "utf-8"; | |
file.open("w"); | |
file.write(text); | |
file.close(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var margin_control_composition = comp("Input"); | |
var margin_control_layer = margin_control_composition.layer("Controller - All"); | |
var margin_control_effect = margin_control_layer.effect("Margin"); | |
var margin_control_slider = margin_control_effect("Slider"); | |
var padding_control_composition = comp("Input"); | |
var padding_control_layer = padding_control_composition.layer("Controller - All"); | |
var padding_control_effect = padding_control_layer.effect("Padding"); | |
var padding_control_slider = padding_control_effect("Slider"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var margin_control_composition = comp("Input"); | |
var margin_control_layer = margin_control_composition.layer("Controller - All"); | |
var margin_control_effect = margin_control_layer.effect("Margin"); | |
var margin_control_slider = margin_control_effect("Slider"); | |
var padding_control_composition = comp("Input"); | |
var padding_control_layer = padding_control_composition.layer("Controller - All"); | |
var padding_control_effect = padding_control_layer.effect("Padding"); | |
var padding_control_slider = padding_control_effect("Slider"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var extra_horizontal_margin_composition = comp("Preview"); | |
var extra_horizontal_margin_layer = extra_horizontal_margin_composition.layer("Controller - All Objects"); | |
var extra_horizontal_margin_effect = extra_horizontal_margin_layer.effect("Extra Horizontal Margin"); | |
var extra_horizontal_margin_slider = extra_horizontal_margin_effect("Slider"); | |
var extra_vertical_margin_composition = comp("Preview"); | |
var extra_vertical_margin_layer = extra_vertical_margin_composition.layer("Controller - All Objects"); | |
var extra_vertical_margin_effect = extra_vertical_margin_layer.effect("Extra Vertical Margin"); | |
var extra_vertical_margin_slider = extra_vertical_margin_effect("Slider"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var extra_horizontal_margin_composition = comp("Preview"); | |
var extra_horizontal_margin_layer = extra_horizontal_margin_composition.layer("Controller - Top Left Section"); | |
var extra_horizontal_margin_effect = extra_horizontal_margin_layer.effect("Extra Horizontal Margin"); | |
var extra_horizontal_margin_slider = extra_horizontal_margin_effect("Slider"); | |
var extra_vertical_margin_composition = comp("Preview"); | |
var extra_vertical_margin_layer = extra_vertical_margin_composition.layer("Controller - Bottom Right Section"); | |
var extra_vertical_margin_effect = extra_vertical_margin_layer.effect("Extra Vertical Margin"); | |
var extra_vertical_margin_slider = extra_vertical_margin_effect("Slider"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Transform > Position > Code | |
var text_composition = comp("Top"); | |
var text_layer = text_composition.layer("Subtitle"); | |
var text_rectangle = text_layer.sourceRectAtTime(); | |
var text_left = text_rectangle.left; | |
var text_top = text_rectangle.top; | |
var text_width = text_rectangle.width; | |
var text_height = text_rectangle.height; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Transform Position | |
var background_composition = comp("Top Left"); | |
var background_layer = background_composition.layer("Background"); | |
var background_position = background_layer.position; | |
var background_x_value = background_position[0]; | |
var background_y_value = background_position[1]; | |
var background_rectangle = background_layer.sourceRectAtTime(); | |
var background_width = background_rectangle.width; | |
var background_height = background_rectangle.height; | |
var background_top = background_y_value - (background_height / 2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var padding_composition = comp("Preview"); | |
var padding_layer = padding_composition.layer("Controller"); | |
var padding_effect = padding_layer.effect("Padding"); | |
var padding_slider = padding_effect("Slider"); | |
var text_composition = comp("Top Right"); | |
var text_layer = text_composition.layer("Label"); | |
var text_properties = text_layer.text; | |
var text_source = text_properties.sourceText; | |
var text_style = text_source.style; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Transform | |
var margin = thisComp.layer("Controller").effect("Margin")("Slider"); | |
var object_composition = comp("Right Object"); | |
var object_composition_width = object_composition.width; | |
var object_layer = object_composition.layer("Object"); | |
var object_scale = object_layer.scale[0] / 100; | |
var object_rectangle = object_layer.sourceRectAtTime(); | |
var object_width = object_rectangle.width * object_scale; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Scale | |
var card_layer = comp("Left").layer("Card"); | |
var card_rectangle = card_layer.sourceRectAtTime(); | |
var card_height = card_rectangle.height; | |
var object_layer = thisComp.layer("Object"); | |
var object_rectangle = object_layer.sourceRectAtTime(); | |
var object_height = object_rectangle.height; |
NewerOlder