Yeah right now I'm shuffling everything out, using a bunch of blink scripts and 
then shuffling everything back in. It's just a little annoying. Ok but good to 
know that it only supports rgba for now. Maybe I should have rtfm ;)

cheers,
Patrick

Mike Frank wrote on 17.11.2014 11:03:

> As an example, this would be a setup for multiple inputs with shuffles 
> controlling the input and output channels:
> 
> set cut_paste_input [stack 0]
> version 8.0 v5
> push $cut_paste_input
> Group {
>  name InvertKernel
>  selected true
>  xpos -1171
>  ypos 212
>  addUserKnob {20 InvertKernel}
>  addUserKnob {41 "Local GPU: " T BlinkScript2.gpuName}
>  addUserKnob {41 "Use GPU if Available" T BlinkScript2.useGPUIfAvailable}
>  addUserKnob {26 "" +STARTLINE}
>  addUserKnob {41 Multiply T BlinkScript2.InvertKernel_Multiply}
>  addUserKnob {26 "" +STARTLINE}
>  addUserKnob {41 in l "src channel" T src_shuffle.in <http://src_shuffle.in> }
>  addUserKnob {41 in_1 l "src2 channel" T src2_shuffle.in 
> <http://src2_shuffle.in> }
>  addUserKnob {26 "" +STARTLINE}
>  addUserKnob {41 out l "output channel" T out_shuffle.out}
> }
>  Input {
>   inputs 0
>   name src2
>   xpos -1148
>   ypos 70
>   number 1
>  }
>  Shuffle {
>   name src2_shuffle
>   label "\[value in]"
>   xpos -1148
>   ypos 110
>  }
>  Dot {
>   name Dot3
>   xpos -1114
>   ypos 175
>  }
>  Input {
>   inputs 0
>   name src
>   xpos -1471
>   ypos 74
>  }
>  Dot {
>   name Dot4
>   xpos -1437
>   ypos 116
>  }
> set N466c6e30 [stack 0]
>  Shuffle {
>   name src_shuffle
>   label "\[value in]"
>   xpos -1363
>   ypos 107
>  }
>  Dot {
>   name Dot5
>   xpos -1329
>   ypos 175
>  }
>  BlinkScript {
>   inputs 2
>   ProgramGroup 1
>   KernelDescription "1 \"InvertKernel\" iterate componentWise 
> d88e10c48ee94eacf1c704194aca3fe8c808e9b37eb5d049298d83e733a62b90 3 \"src\" 
> Read Point \"src2\" Read Point \"dst\" Write Point 1 \"Multiply\" Float 1 
> AACAPw=="
>   kernelSource "kernel InvertKernel : 
> ImageComputationKernel<eComponentWise>\n\{\n  Image<eRead, eAccessPoint, 
> eEdgeClamped> src;  //the input image\n  Image<eRead, eAccessPoint, 
> eEdgeClamped> src2;\n  Image<eWrite> dst;  //the output image\n\n  param:\n   
>  float multiply;  //This parameter is made available to the user.\n\n  
> local:\n    float _whitePoint;  //This local variable is not exposed to the 
> user.\n\n  //In define(), parameters can be given labels and default 
> values.\n  void define() \{\n    defineParam(multiply, \"Multiply\", 1.0f);\n 
>  \}\n\n  //The init() function is run before any calls to kernel().\n  void 
> init() \{\n    _whitePoint = 1.0f;  //Local variables can be initialized 
> here.\n  \}\n\n  //The kernel function is run at every pixel to produce the 
> output.\n  void process() \{\n    //Invert the input value from src and 
> multiply:\n    dst() = (_whitePoint - src()) * multiply;\n   \}\n\};\n\n"
>   rebuild ""
>   name BlinkScript2
>   xpos -1251
>   ypos 166
>  }
>  Dot {
>   name Dot1
>   xpos -1217
>   ypos 226
>  }
> push $N466c6e30
>  Dot {
>   name Dot2
>   xpos -1517
>   ypos 116
>  }
>  ShuffleCopy {
>   inputs 2
>   red red
>   green green
>   blue blue
>   name out_shuffle
>   xpos -1551
>   ypos 223
>  }
>  Output {
>   name Output1
>   xpos -1551
>   ypos 298
>  }
> end_group
> 
> 
> On Mon, Nov 17, 2014 at 1:53 PM, Mike Frank <[email protected] 
> <mailto:[email protected]> > wrote:
>> 
>> 
>> I would be interested if it is possible to output to multiple channels, 
>> according to the documents only rgba is supported.
>> 
>> 
>> You should however be able to specify multiple image inputs into the blink 
>> node. They are only required to be shuffled to rgba.  So a couple of shuffle 
>> nodes that are wrapped up inside of the Blink Script's gizmo should do the 
>> trick there.  Is that what you mean?
>> 
>> 
>> On Mon, Nov 17, 2014 at 1:45 PM, Patrick Heinen 
>> <[email protected] <mailto:[email protected]> > 
>> wrote:
>>> Hey everyone,
>>> 
>>> we have written a couple of tools in blink script over here, but they are 
>>> now making workflows difficult when we try to use them with multiple 
>>> channels. For now the blink script only affects rgba. Is there a way to get 
>>> a channel dropdown as in other nodes? I found a hidden channels knob and a 
>>> specify channels checkbox, but can't figure out how to make them do 
>>> anything. Does anyone maybe know what I need to do?
>>> 
>>> Thanks,
>>> Patrick
>>> _______________________________________________
>>> Nuke-users mailing list
>>> [email protected] 
>>> <mailto:[email protected]> , 
>>> http://forums.thefoundry.co.uk/ <http://forums.thefoundry.co.uk/> 
>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users 
>>> <http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users> 
>> 
>>
_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Reply via email to