Page 1 of 1

Recursive Switches: Motion Blur & 3D

Posted: February 1st, 2012, 7:43 pm
by Navstar
Are there any scripts that will recursively turn on/off the 3D & Motion Blur switches for all comps, and the layers contained in precomps?

Re: Recursive Switches: Motion Blur & 3D

Posted: February 6th, 2012, 7:43 pm
by Navstar
I found this code by Paul to lock everything in another recent thread.

Code: Select all

// turn off solo on all layers
{
  var myComp;
  for (var i = 1; i <= app.project.numItems; i++){
    if (app.project.item(i) instanceof CompItem){
      myComp = app.project.item(i);
      for (var j = 1; j <= myComp.numLayers; j++){
        myComp.layer(j).solo = false;
      }
    }
  }
}
If I change the last line to: myComp.layer(j).motionBlur = True; and
myComp.layer(j).threeDLayer = True will that work?

Re: Recursive Switches: Motion Blur & 3D

Posted: September 30th, 2012, 6:08 am
by floating.point
Confirmed, this works fine.

I needed this just today. Importing huge layersets from PSD's, needing everything to be 3D...
(manually trawling through precomp after precomp would have taken forever!)

I added the ability to undo and made a few individual scripts for different uses.

What would be nice is a dockable UI that allows quick adjustment of each of these layer properties (Shy, collapse transofrms, quality etc.) But this certainly gets the job done as is.

Code: Select all

// turn on 3D on all layers
// http://aenhancers.com/viewtopic.php?f=11&t=2036&p=7496
{
app.beginUndoGroup("Recursive Enable 3D");
var myComp;
  for (var i = 1; i <= app.project.numItems; i++){
    if (app.project.item(i) instanceof CompItem){
      myComp = app.project.item(i);
      for (var j = 1; j <= myComp.numLayers; j++){
        myComp.layer(j).threeDLayer = true;
      }
    }
  }
app.endUndoGroup();  
}