Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Create Null Object with custom dimensions with script?

Community Beginner ,
Jul 16, 2021 Jul 16, 2021

Copy link to clipboard

Copied

Is there any possibility to create a Null Object with a custom dimensions via a script?

 

I don't mean that it has been scaled down, but that the actual layer gets created with custom dimensions, like 62.5, 62.5

 

I hope this is possible.

TOPICS
Scripting

Views

45

Likes

Translate

Translate

Report

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

Adobe Community Professional , Jul 16, 2021 Jul 16, 2021
Dimensions on a null are meaningless. The anchor point is at 0, 0, 0 and nulls don't render. Their size does not translate to other layers unless you add an expression that reads the height and width of the layer. I'm not sure what purpose setting a custom size for a null would have.

Likes

Translate

Translate
Adobe Community Professional ,
Jul 16, 2021 Jul 16, 2021

Copy link to clipboard

Copied

Dimensions on a null are meaningless. The anchor point is at 0, 0, 0 and nulls don't render. Their size does not translate to other layers unless you add an expression that reads the height and width of the layer. I'm not sure what purpose setting a custom size for a null would have.

Likes

Translate

Translate

Report

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 Beginner ,
Jul 16, 2021 Jul 16, 2021

Copy link to clipboard

Copied

I actually wanted to use it as a spacer for a grid like layout.

But I just discoverd I can also do this with slider expression controls.

But thank you for your awnser anyway.

Likes

Translate

Translate

Report

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
Guide ,
Jul 16, 2021 Jul 16, 2021

Copy link to clipboard

Copied

LATEST

You can do it with a script, but you need to modify the null's source, and the width and height have to be integers. So you could do something like this:

 

var myComp = app.project.activeItem;
var myNull = myComp.layers.addNull(myComp.duration);
myNull.source.width = 63;
myNull.source.height = 63;

Likes

Translate

Translate

Report

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