Saori Yoshimoto work notes since 2018

Wednesday, August 11, 2021

[PDG] PDG Global Variable

 These  built in PDG variables are available everywhere:


@pdg_input - always evaluates to the first input of the current workitem.  Use @pdg_input.1 and @pdg_input.2 etc. to address other inputs.  When a workitem is being evaluated on the farm, this is how to make sure the network being evaluated has the correct inputs for that workitem.  Do not use @pdg_output for this purpose, as the workitem has not computed yet and so has no output.


@pdg_output - always evalutes to the first output of the current workitem.  Use @pdg_output.1 and @pdg_output.2 etc. to address other outputs. Useful for visualization purposes (eg. File sop with `@pdg_output` will display current workitem output if it's a geometry).  Do not use for other purposes.


@pdg_index - the index of the current workitem - may not be unique within even a single processor.  Check in the case of your processor node.


@pdg_name - the unique name of the current workitem.


@pdg_log - the log file if present, available after a workitem has finished cooking.


@pdg_frame - the frame of the workitem.  Will evaluate to 0 if the workitem doesn't have a frame.


@pdg_loopdepth - set to the depth of the for loop.  So for example if you have a nested loop, the inner loop will have @pdg_loopdepth set to 1, and the other loop will be 0.


Padding: note that any numberical attribute can be padded with :number.  For example, @pdg_index:4 will pad it with zeros to make sure it's 4 digits.


No comments:

Post a Comment