Fusion : hos_SplitEXR.eyeonscript

Fusion 6 is out, and i wanted to test something that has been gathering dust on my harddisk because the script simply could not be done natively in Fusion 5.

But here’s a quick prototype on a script that takes a multi channel EXR file and creates new loaders with the same EXR file but assigns groups of channels accordingly to the RGBA channels so it is  ready for easy comping.

Now this is as i said, a prototype, it requires an EXR file that contains channels like the channel names in the example file below (rendered with Autodesk Maya passes), there’s no GUI, it doesn’t do any error checking or anything fancy to check for channels that can or can’t be grouped.

Should the script fail and your comp seems to stop working or responding, try typing the following in the command line (it means it failed between the locking and unlocking of your comp and is thus locked and needs to manually be unlocked again)

comp:Unlock()

download : hos_SplitEXR_v1.2.zip

download : hos_SplitEXR_v1.1.zip

download : hos_SplitEXR_v1.0

download : fusion_6_passes.exr

changes v1.2

  1. Added a TOOLST_Clip_FormatName check to fix the ’attempt to index global ‘tool’ (a nil value)’ error.

changes v1.1

  1. XYZ channel data is now recognized and mapped to RGB channels
  2. Added a GUI where you choose how the split EXR loaders are placed (Horizontal or Vertical)

changes v1.0

  1. Prototype and initial release

splitexr

Tags: , , , ,

21 Responses to “Fusion : hos_SplitEXR.eyeonscript”

  1. abhay sharma says:

    I tried this script but I get error.
    error : attempt to index global ‘tool’ (a nil value);

  2. elay says:

    Hi i have the same errormassage like abhay sharma.

    Whenn i use your EXR File in Fusion 6 i get this Error:

    error : attempt to index global ‘tool’ (a nil value);

    • Sven says:

      Hmmm…i wonder what is going on.
      Could you email me the EXR file that produces this error?

      I’ve send you the details via email.

      Sven

      • elay says:

        Hi i use the your EXR ( fusion_6_passes.exr ) File wich you can download on your Site.

        thanks

        • elay says:

          Hi again maybe my workflow is wrong.
          I load your EXR File in the Fusion Comp and activate it than i go to the Script Menu and execute the hos_splitexr. After this i get the error messages

          • Sven says:

            That’s odd, downloaded the script and EXR from the blog just to be sure, but over here it works like a charm, i have no idea what goes wrong.

            In order to run the script, do you right click on the EXR file and from the RMB menu choose the script (i’m not sure there’s another way to get access to Tool scripts that i’m missing)

          • Sven says:

            Just to be sure we use the same Fusion version.
            Which build of Fusion 6 are you using?

  3. isotron says:

    Hi, your tool works nearly fine. Open my EXR with 8 Channels inside, and your script splits up all, but only 6 in the right way, the other 2 loaders have no entry in the R G B A . And often your tool missed the Alpha of the channel. But work on, and it could be very helpfull! nice work so far

    • Sven says:

      Could you send me a comp and some footage that shows this behaviour, it would help a lot to see why it does something on someone else way of working.

  4. isotron says:

    okay, seems that the channels, wich not have the R G B values like Z , or motionvector ( X Y Z) , will extracted but are empty… download the sample comp from here, and let me know: w_w.suedlich-t.de/ftp/UPLOAD/hos_SplitEXR_isotrontest_F6.rar

    • isotron says:

      so this was easy to manage…. i only added the if else statement at the end of your script for X Y Z .

      • isotron says:

        but , sry, whats with the name, the correct name “channel: filename” is only visible in the viewport, but not in the flow (there´s only the filename) . When i rename the ne loaders, it shows the “channel:filename” …… can u fix this? ;)

        • isotron says:

          okay, check this , sorry for spamming :) ” myLoader:SetAttrs{TOOLS_Name = loaderList[i], TOOLB_NameSet = true} ”
          only the channelnames appears, but the filename get lost, but therefor the original exr file is in the flow too. …. i like it so… maybe u can update your script? if u like ;)

          • Sven says:

            Thanks Stefan, the data you send really helped picking out some errors and things i missed when writing the prototype.
            I posted version v1.1 of the script, v1.2 will add some more features (like channel mapping options, loader naming, etc)

            http://www.svenneve.com/?p=470

  5. elay says:

    hi Sven thanks the option to load the script with the mmb works now fine.

    But i have anoter Question.

    I created a multichannel exr File in Maya and when i pick and drag it into my workspace in Fusion 6 to try the script i get on imort a error message:

    [string"composition"]:1:´´expected near ´char(1)´

    maybe someone knows what this is. This Error messages apears when i drag it into fusion.
    And whenn i use the Import menue nothing happens. The Workspace is empty

    thanks

    • elay says:

      Hi again
      Now it works fine.
      I Forgot to set the Framebuffer in Maya to RGBA (Float)4x32Bit
      With the setting in the Framebuffer in Maya RGBA (Byte)4x8Bit it make the Error Message.

  6. Juan Bernardo says:

    I get this error:

    …eon/Fusion 6.0/Scripts/Comp/hos_SplitEXR.eyeonscript:39: attempt to index global ‘tool’ (a nil value)

    It worked one time, I don´t know why, but no more. Thanks

    • Sven says:

      Hi Juan,
      This error should only occur if nothing is selected, not sure why some people get this error.
      I can’t check at the moment as i have no access to a copy Fusion at the moment, but could you see what happens if you select the loader first and then run the script?

      • Sven says:

        Okay, just checked via remote desktop, when i first loaded an exr file i got the same error when i used print(tool:GetAttrs()), the second time running the command didn’t.

        I have no idea why this happens, but atleast i’m a step further.

        If you type print(tool:GetAttrs()) and it gives the error, could you then deselect and reselect your loader and run the print(tool:GetAttrs()) command or the script again to see what happens?

        • Sven says:

          Hmmm…i seem to have found something.

          When i create a new comp, create an EXR loader and then immediately run the script, the error occurs, when i deselect and reselect the loader and then run the script it works.
          I’ll do some more testing, but i guess this might be a bug that is more related to Fusion itselve rather than my script.

Leave a Reply

grandiose-certain