module rr

Parent Previous Next


The module rr is available for all python scripts in RR applications.

It is already loaded/imported.


Each RR application has a different rr module, but the function names are kept the same.

Some functions are not available in all RR applications.



Classes

Exception rrCleanExit

Available in:


Description:

If you raise an exception, the execution is stopped. All other exceptions are seen as an error.

But if you call 

raise rrCleanExit() 

then RR will ignore the exception and exit the script.




Functions - Commands

bool    jobModify(list<UInt64> jobIDs,  _SettingsOnly settings,  _SettingsOnly change)

Available in:


Description:

Send a Change Settings command to the rrServer (like rrControl tab Job Settings).

jobIDs is a list with JobIDs of jobs that you want to change.

You need to call rrJob.getClass_SettingsOnly() to get a _SettingsOnly class instance.


This function uses two _SettingsOnly classes. The settings parameter is the one with all the new values you want to set.

The changeFlags tells RR which parameters you want to change. E.g. if you want to change the user name for all jobs, but all jobs should keep their sequence start-end.

To let RR know that you want to change this value, just set them to anything non-null. (bool values to true, integer to 1, strings to e.g. "1".)


Note:

The job table display does not update until the next refresh. But the job itself will be changed (you can verify it if you re-select the job and check the Job Settings page in rrControl)


bool    jobSendCommand(list<UInt64> jobIDs,  _LogMessage commandID, UInt64 commandParam)

Available in:


Description:

Send a Change Settings command to the rrServer.

jobIDs is a list with JobIDs of jobs that you want to send a command to.



Note:

The job in rrControl will not update until rrControl gets an update from the rrServer.


bool    clientSendCommand(const bp::list clients, quint8 commandID, PyObject* param);

Available in:


Description:

Sends a command to rrClients.

clientArray is a list with client IDs. If the list has only one element and the ID is -1, then the command is applied to all clients.

param is an optional string parameter. It can be used to send commandlines to the client with the commandID "rrGlobal._ClientCommand.cCommandLine"

Functions - Data access 

Misc



string   sceneFileToLoad()

Available in:



Description:

Returns the name of the scene file to be parsed.




void   returnFromPlugin(pluginReturn  returncode)

Available in:



Description:

This function has to be executed by each scene parser plugin.

It tells the rrSubmitter if the scene load was successful, if it failed or if this plugin is not the right plugin to load this kind of file.



All Jobs


_JobSubmitter     getNewJob()

Available in:


Description:

Returns an empty job.



int   jobAll_count()

Available in:


Description:

Returns the number of all jobs available in this RR application.


_JobSend/_JobSubmitter     jobAll_get(int index)

Available in:


Description:

Returns a COPY of a job by its index. 


jobAll_set(int index, _JobSubmitter job)

Available in:


Description:

Overwrites the job in the rrSubmitter with your job.

Scripted Jobs/Scene Parser only:  If the index is higher than the number of jobs in your list, then a new job is added.


int   jobVisible_count()

Available in:


Description:

Returns the number of all jobs that are currently visible in rrControl.

Jobs that does not match your rrControl UI filter are not listed.


_JobSend   jobVisible_get(int index)

Available in:


Description:

Returns a copy of a visible job by its index.



   jobAll_setShotgunID(int index, string shotgunID)

Available in:



Description:

Set the shotgunID of the job at index.




   populatePreIDs()

Available in:



Description:

Sets the preID for all jobs currently in the rrSubmitter.

PreIDs are required if you want to set waitForPreID in some job.



Current Job


If you create a script that is executed "Per Job", then the script is executed multiple times.

For each selected job once. The current job is the job the script should be executed for.


_JobSend/_JobSubmitter    getJob()

Available in:


Description:

Gets the current job.

Note: perJob plugins are called once for each selected/checked job. 



int    perJobCurrent()

Available in:


Description:

Note: perJob plugins are called once for each selected job.

This gets the number of the current job in the execution list.


int    perJobMax()

Available in:


Description:

Note: perJob plugins are called once for each selected job.

This gets the number of all jobs in the execution list.


setJob(_JobSubmitter job)

Available in:


Description:

Overwrites the job in the rrSubmitter with your job.




Selected/Submitted Jobs


int    jobSelected_count()

Available in:


Description:

rrControl: Returns the number of all selected jobs.

rrSubmitter: Returns the number of all checked jobs.


_JobSend/_JobSubmitter     jobSelected_get(int index)

Available in:


Description:

Returns a COPY of a selected job by its index.


jobSelected_set(int index, _JobSubmitter job)

Available in:


Description:

Overwrites the job in the rrSubmitter with your job.



    jobSelected_setShotgunID(int index, string shotgunID)

Available in:


Description:

Set the shotgunID of the job at index.




Clients

int   clientAll_count()

Available in:



Description:

Gets the number of clients.


_Client   clientAll_get(int clientID)

Available in:


Description:

Gets a client by its index.




_Client   getClient()

Available in:


Description:

Gets the current client.

Note: perClient plugins are called once for each selected client. 


int   perClientCurrent()

Available in:


Description:

Note: perClient plugins are called once for each selected Client.

This gets the number of the current client in the execution list.


int    perClientMax()

Available in:


Description:

Note: perClient plugins are called once for each selected client.

This gets the number of all clients in the execution list.