module rrJob

Parent Previous Next



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

It is already loaded/imported. 

It defines the job classes (e.g. _JobMinInfo, _JobBasic, ... ), 

enumerations used by jobs

and some job helper functions.


Functions

_JobBasics   getClass_JobBasics()


Description:

Gets a new class _JobBasics.


_SettingsOnly   getClass_SettingsOnly()


Description:

Gets a new class _SettingsOnly.

It is used to modify jobs settings.



bool exportJobAsXml( _JobSend job,   string filename,    bool withSettings,   bool forceSettings)


Description:

Exports a job into an xml file that can be used as commandline parameter for the rrSubmitter or rrSubmitterconsole.

If the function returns false, then it was unable to open/write the xml file.

withSettings:
If withSettings is true, then all rrSubmitter default settings are exported and set as well.

Otherwise the rrSubmitter uses the default settings (Like any other submission from your 3D/comp application).


forceSettings:

If true, then you cannot change the settings via the rrSubmitter UI.
Note: The submitter_last.txt file or the render config might still change settings if they are not allowed to the changed by a setting in these files.



Note:
It is not possible to use exportJobAsXml() while you use exportJobAsXml_Multi.... at the same time.





         exportJobAsXml_MultiStart()
         exportJobAsXml_MultiAdd (_JobSend job,   bool withSettings)
bool exportJobAsXml_MultiEnd( string filename,   bool joinSettings,   bool forceSettings)


Description:

Same as exportJobAsXml(), but you can export multiple jobs into one file.
You HAVE TO use all 3 functions for a successful export. 

If exportJobAsXml_MultiEnd() returns false, then the output file cannot be created/written.

withSettings:
If withSettings is true, then all rrSubmitter default settings are exported and set as well.

Otherwise the rrSubmitter uses the default settings (Like any other submission from your 3D/comp application).

forceSettings:

If true, then you cannot change the settings via the rrSubmitter UI.
Note: The submitter_last.txt file or the render config might still change settings if they are not allowed to the changed by a setting in these files.



joinSettings:

If the xml file does only contain 1 job, then the rrSubmitter reflects the job settings in the UI.

If there are multiple jobs in an .xml file, this is not possible. The settings will be applied at submission.

(It is possible to check if there are settings if you switch the rrSubmitter UI to "Selected jobs". All settings are in a short name format (Uppercase letters only). Please see screenshot on the right )



If joinSettings is true, then this function collects all settings that are equal in all jobs. These settings are then set as "global" rrSubmitter settings and are reflected in the UI.

All settings that are different are still only shown per job in "Custom Vars".





Note:
It is not possible to use these functions or exportJobAsXml() for multiple xml files at the same time.





Enumerations


enumeration _LogMessage


_LogMessage is used for all job log messages and for commands send via python to a job.

lUnknown, 0

lAbortedReservedClients, 1

lEnable, 2

lDisable, 3

lDisableAbort, 4

lApprove, 5

lDisApprove, 6

lDelete, 7

lAbort, 8

lCheck, 9

lReset, 10

lResetNDelete, 11

lChangeClientAssignment, 13

lClientRenderSuccessful, 14

lClientRenderAborted, 15

//lClientRenderCrashed, 16

lAutoDeleteAfterDays, 17

lFramesDeleted, 18

lAllFramesAssigned, 19

lSeqDivAdjusted, 20

lReceiveJob, 21

lChangeSettings, 22

lDeleteFinished, 23

lDeleteDisabled, 24

lClearErrormessages, 25

lsetSoftX32, 26

lsetSoftX64, 27

lsetSoftXAll, 28

lmoveJobs, 29

lmarkFinished, 30

lDeassignClients, 31

lEmitChange, 32

lExportDebug, 33

lClientRenderAbortedLowMem, 34

lClientRenderAbortedFrozen, 35

lClientRenderError, 36

lClientWait, 37

lClientRenderAbortedHighCpu, 38

lAbortedFrameTime, 39

lAbortLowPriority, 40

lClientSegmentLessThanXs, 41

lClearErrormessagesEnable, 42

lFirstCheck, 43

lClientRenderAbortedWorkinghours, 44

lClientRenderAbortedProcessFound, 45

lClientRenderAbortedReservedClient, 46

lClientRenderAbortedHighPriorityJob, 47

lClientRenderAbortedrrControl, 48

lClientRenderAbortedAveraging, 49

lClientRenderAbortedLicenseBlock, 50

lClientRenderAbortedLocalMachine, 51

lDisableManyCrashes, 52

lDisableNoFrames, 53

lDisableNoOutputDir, 54

lDisableUNCFailed, 55

lDisableNoDriveSpace, 56

lClientAssignmentLost, 57

lClientAssignmentWrong, 58

lViewJobInfo, 59

lClientKSOClose, 60

lClientRenderAbortedDisabled, 61




Usage Example:

tcp.jobSendCommand(jobsApply,rrJob._LogMessage.lEnable,0)


enumeration _RROptions


 0,  rroAbortLowJobs

 1,  rroIgnoreCrashes

 2,  rroAutoApprove

 3,  rroSendSMS

 4,  rroPreviewRendering

 5,  rroNoWebsiteJpegs

 6,  rroNoFrameChecking

 7,  rroLittleJob

 8,  rroMultipleInstances

 9,  rroKeepSceneOpen

 10,  rroAllowToDeleteCrashedFrame

 11,  rroLocalSceneCopy

 12,  rroTextureReplacements

 13,  rroLocalRenderOut

 14,  rroPreviewGamma22

 15,  rroCropEXR

 16,  rroMultiOSScene

 17,  rroNoProcessTreeCheck

 18,  rroOverwriteExisting

 19,  rroNoFreezeDetection

 20,  rroIsGPURender

 21,  rroDisStartToEnd

 last+1, rroTotalrrOptions




Usage Example:

job.rrOption(rrJob._RROptions.rroKeepSceneOpen)



enumeration _RRParams



ID

Name

Description

0

rrpPreviewNumberOfFrames


1

rrpMaxClientsAtATime


2

rrpRequiredMemoryGB


3

rrpMaxFrameTime


4

rrpMinFileSizeKb


5

rrpMaxCrashes


6

rrpMaxLimitsReached


7

rrpVerboseLevel


8

rrpRenderQuality


9

rrpColor


10

rrApproveJob

Possible values:
0: No Approval Wait

1: Wait before main render (after preview)

2: Wait after frames done (before finished-scripts)
3: Both (1+2)




last+1

rrpTotalrrParameter

No matter if there will be new options, this is always the total number of rrParams. 
Note for loop functions: This is not the ID of the last item!


Usage Example:

job.rrParam(rrJob._RRParams.rrpRequiredMemoryGB)


enumeration _Status


ID

Name

Description

0

sNone


20

sFirstCheck

Job was received, next server task is "first check" to find output dir and existing files.

40

sWaitForJobs

Disabled while waiting for other jobs

60

sScriptPreRender

About to execute pre-render scripts

80

sPreviewRender

Job is rendering the preview frames

90

sScriptAfterPreview

About to execute after-preview scripts

100

sWaitForApprovalMain

Waiting for user approval

110

sWaitForJobsAfterPreview

Disabled while waiting for other jobs

120

sMainRender

Main render of all frames

140

sScriptPostRender

About to execute post-render scripts

160

sWaitForApprovalDone

Waiting for user approval

180

sScriptFinished

About to execute finished scripts

200

sFinished

Job is done




Usage Examples:

print(    rrJob._Status.sPreviewRender )

print(int(rrJob._Status.sPreviewRender))

if (myjob.status==rrJob._Status.sPreviewRender):

enumeration _PrePostCommandType


ID

Name

0

pre

1

post

2

finished

3

preview

4

none



Usage Example:
rrJob._PrePostCommandType.pre