Extract PSD Layer Script

extractPSDlayer_header

Hi everyone,

Here is my first script for Nuke.
I was working on my first photo projection, and I felt a bit bad to spend a lot of time shuffling the layer of my Read Node, and then add Crop, Premult etc..

So I tried to write a script to help a bit with this.

Description :

  • version : v1.0
  • Input : ReadNode with a PSD that contain layers named ‘ps_’…
  • Output : Tree with the separate layer with crop, premult, card, linked to a scene, with camera / scanline render.
  • This script extract each layer named ‘ps_’something of a 8bit PSD with a Shuffle Node.
    Then it add a Premult Node, a Crop Node, and a Card.
    The script also add a basic scene setup with a Scene Node, a Camera, and a ScanlineRender Node.
    Each card are connected to this Scene Node.

    Here is a sample of the tree you get, when applying the script on a PSD :
    extractPSDlayer_sample

    You can download the pack here

    You’ll find in the zip a sample of a menu.py, init.py, the custom icon for the custom menu (if you want to use it ^^), and the python script.

    Incomming additions :

  • - 16, 32bit support.
  • - Masked layers support.
  • - Layers in folder support.
  • - Autocrop would be great. ^^
  • - Expression linking aperture / focale of the cards to the camera.
  • Know issues :

    - If you have a bold effect on the image at first, don’t worry, it’s because the Crop node, is too large compared to your image. At the moment you have to set the Crop node manually, and it will fix this problem.

    Linking aperture / focale between the cards, and the camera can help a lot to place the different layers in the Z space. Check out this video of Frank Rueter for The Foundry training

    Hope this script will help ^^.
    If you have any questions, idea, or optimisation, please don’t hesitate to comment !
    I’d be happy to hear from you !
    Cheer =}

    About steve morel

    VFX Addict ^^
    Tags: