Recursive Switches: Motion Blur & 3D

What type of scripts do you need?

Moderator: byronnash

Post Reply
Navstar
Posts: 68
Joined: February 16th, 2009, 12:41 pm

Are there any scripts that will recursively turn on/off the 3D & Motion Blur switches for all comps, and the layers contained in precomps?
Navstar
Posts: 68
Joined: February 16th, 2009, 12:41 pm

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?
floating.point
Posts: 7
Joined: May 12th, 2009, 5:15 pm

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();  
}
Post Reply