Deadline > Tools > Options > Image Viewers >
  • Preferred Image Viewer > CustomViewer1
  • Custom Image Viewer
  • Executable > /opt/rv/rv-centos7-x86-64-2021.1.0/bin/rvpush
  • Arguments > merge {SEQ%}
  • Name > RV

Setting up double click to view in RV Player in Deadline
Deadline > Tools > Options > Monitor Options > Task List >
  • Completed Task double-click Behavior > View Image

Maya > Windows > Settings/Preferences > Preferences > Applications > Sequence Viewing Applications
Both “image Sequence & Quicktime (MOV) files
Program : *Path to RV*/bin/rvpush
Optional Flags: -tag playblast merge %f

ERROR: “unknown ref node”
SOLUTION:
maya.cmds.delete('_UNKNOWN_REF_NODE_')
File>OptimizeSceneSize is a 'Delete Unknown Nodes' 

ERROR: Error: [driver_exr] defaultArnoldDriver@driver_exr.RGBA: can’t create file “.exr”:
SOLUTION:
Make sure there is no “/” in front of your “File name Prefix”

Variables

Global vs Local

global int $varname = 3; – This is a global variable and can be seen by other scripts

Defining a Variable

int $varname; – Integer value. Example int $varname = 10;

float $varname; – Float value. Example float $varname = 1.2345;

string $varname; – Creating a string. Example string $varname = “Hello World”;

vector $varname; – Creates a 3 digit vector. Example vector $varname = <<1,0,0>> or = <<255,128,0>>;

$varname[]; – This is for arrays

matrix $varname[3][4]; – Creates a Matrix


Int and Floats math

int $varA = 5;
float $varB = 5.123;
$varA + $varB = 10; < – You can get a float out of a int
$varB + $varA = 10.123;

Strings

string $varname; – Creating a string. Example string $varname = “Hello World”;

Line Options
"\n" = New line
"\t" = Tab
"\\" = Backslash

Examples:

string $varname = "Hello World";
// Result: “Hello world” //

print ($varname + ", Hello computer" ;
// Result: “Hello world, Hello computer” //

 

Vectors

Vectors are always three floats values

Examples:
vector $varname = <<255,128,0>>;
// Result: <<255, 128, 0>> //

print ($varname.x)
// Result: 255 //

Set a value
$varname = <<123,$varname.y,$varname.z>>;
// Result: <<123, 128, 0>> //

Arrays

int $varname[] = {1,2,3};
float $varname[] = {1.25,2.8,3.0};
string $varname[] = {"one","two","three"};

clear($varname); – Will clear an array out

Examples:

int $varname[] = {1,2,3};
$varname[0] = 9
// Result: 9 //

int $varname[] = {1,2,3};
$varname[0] = 9;
print ($varname);
// Result: 9 //
// Result: 2 //
// Result: 3 //

Looking for a value in a array. This returns a True (1) or False (0).
string $Lists[] = {"one","two","three"};
string $UserInput = "three";

print (stringArrayContains($UserInput, $Lists));
// Result: 1 //

 

 

Matrix

matrix $matrixname[Row#][Column#] = << 1, 2, 3, 4 ; 5, 6, 7, 8 ; 9, 10, 11, 12>>;
// Result: << 1 2 3 4; 5 6 7 8; 9 10 11 12 >> //

1 2 3 4
5 6 7 8
9 10 11 12

 

Script Clips

Get current render
GetCurrentRenderer();
// Result: arnold //

Get list of all render layers
string $GetRenderLayers[]=`ls -type renderLayer`;
// Result: defaultRenderLayer //

getAttr ($isRenderLayerEnabled + “.renderable “) == 1)

Gets frame padding via a number
setAttr ("defaultRenderGlobals.extensionPadding",4);
getAttr ("defaultRenderGlobals.extensionPadding");

// Result: 4 // myrender.####.exr

Gets format type via a number
setAttr( "defaultRenderGlobals.outFormatControl",1)
getAttr( "defaultRenderGlobals.outFormatControl")
  • 1 = name (Single Frame)
  • 2 = name.ext (Single Frame)

Pixel Aspect
setAttr( "defaultResolution.pixelAspect",1.25)
getAttr( "defaultResolution.pixelAspect")

Gets a list of all cameras in the scene
string $all_cameras[] = `ls -type camera`;
// Result: frontShape perspShape sideShape topShape //

 

EXR compression
getAttr( "defaultArnoldDriver.exrCompression" );
// Result: 3 //

32 or 16 bit EXR
getAttr( "defaultArnoldDriver.halfPrecision" );
// Result: 0 //

EXR tiled On/Off
getAttr( "defaultArnoldDriver.exrTiled" );
// Result: 1 //

Auto Crop On/Off
getAttr( "defaultArnoldDriver.autocrop" ) 
// Result: 0 //

MultiPart EXR On/Off
getAttr( "defaultArnoldDriver.mergeAOVs" );
// Result: 0 //

Finding Version name
import os
print "PATH : " + cmds.file(q=True, sn=True)
print "BASENAME : " + os.path.basename(cmds.file(q=True, sn=True).split('.')[0])
print "VERSION : _v"+ os.path.basename(cmds.file(q=True, sn=True)).split('.')[1].split('mb')[0]

Random Rotate:
vector $rndRot = << 0,0,90 >>;
for ($object in `ls -sl -tr`)
rotate `rand ($rndRot.x)` `rand ($rndRot.y)` `rand ($rndRot.z)` $object;

Maya (Arnold) to Nuke best EXR setting for time

Compression Types:
Run Length Encoding (RLE) : This is a basic form of compression that is comparable to that used by standard Targa files.
Zip (16 Scanline) : deflate compression applied to blocks of 16 scanlines at time. This tends to be the most effective style of compression to use with rendered images that do not have film grain applied.
Zips (1 Scanline) : deflate compression with zlib wrapper applied to individual scanlines (not based on the ZIP file format despite its name).

Tiled:
Not great for compositing packages such as Nuke or Fusion

AutoCrop :
If you have a lot of black space this might help cropping out un-used pixels.

Merge AOVs :
This create one EXR file instead multiple pre channel/pass

Arnold to Nuke EXR

Bit DepthCompressionGBTitledCropLoad SecMemWrite sec
32bitZip (16 scanline)1.7Tiledno3.231.6 GB59.2
32 bitZip (16 scanline)1.76Scanlineno1.061.6 GB56.5
32 bitZipS (1 Scanline)1.7Tiledno1.831.6 GB67.86
32 bitZipS (1 Scanline)1.76Scanlineno0.018.18 KB52.92
32 bitZipS (1 Scanline)1.76ScanlineYes0.078.18 KB52.92
32 bitnone14Scanlineno0.088.18 KB174.92
16 bitZip (16 scanline)0.51Tiledno0.781.6 GB51.26
16 bitZipS (1 Scanline)0.53Scanlineno0.058.18 KB43.1
16 bitZipS (1 Scanline)
0.53Scanlineyes0.058.18 KB42.95