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

Resize Comp with 3D Layers

Community Beginner ,
Feb 28, 2023 Feb 28, 2023

Hello friends,

i want to resize my Comp through a script.

So far so good, it works and everything is in right place for 2D layers.

If the layer is 3D, after the resize the layer don’t have the right pos value, its still stay relative to the old comp size null-point. If I resize the comp through the comp dialog everything looks correct.

Does I miss something?


Thanks for your help

app.project.activeItem.width = 1000;
app.project.activeItem.height = 1000;

 

TOPICS
Scripting
774
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
LEGEND ,
Feb 28, 2023 Feb 28, 2023

Just resizing the comp does not adjust any position values. This is how it is supposed to work. You need to implement respective functions in your code.

 

Mylenium

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 Beginner ,
Feb 28, 2023 Feb 28, 2023

hmmm ok, but still a bit confused.

If I resize the comp through the dialog it works different as through script. 😞
comp size: 2000x2000
3D obj pos: 1000, 1000, 0
After resizing the comp through the dialog to 1000x100 the new pos of the 3D object is 500, 500, 0


But if resize the comp through a script the pos value of the 3D object
still: 1000, 1000, 0
There are still relative to the old comp size. Yes, 
actually this shoud be right.

Strange behavior!?

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 Beginner ,
Feb 28, 2023 Feb 28, 2023

...i meen 
After resizing the comp through the dialog to 1000x1000 the new pos of the 3D object is 500, 500, 0

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 ,
Feb 28, 2023 Feb 28, 2023

There is already a resize comp script under the File menu. You might want to take a look at that. 

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 Beginner ,
Feb 28, 2023 Feb 28, 2023
LATEST

I know that script and i also tested it, but with same behavior.

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