libpyRR39_submit
Module¶
Python module for job submission. Use of rr_python_utils.load_rrsubmit
is reccomended for importing as rrSubmit.
Example:
1from rr_python_utils.load_rrsubmit import rrSubmit
2import rrJob
3
4
5# define a render app
6my_app = rrJob._RenderAppBasic()
7my_app.name = "Maya"
8my_app.type = "3D"
9my_app.setVersionBoth("2020.51")
10my_app.rendererName = "arnold"
11my_app.rendererVersion = '4.1'
12
13# we create a new job and assign the render app
14new_job = libpyRR3_submit.createEmptyJob("C:/my_project/scenes/scene.ma")
15new_job.renderApp = my_app
16
17# set job parameters
18new_job.imageFileName = "C:/my_project/outptut/my_image_###.png"
19new_job.seqStart = 1
20new_job.seqEnd = 10
21
22# submit
23submitter = libpyRR3_submit.SubmitterSend()
24submitter.addJob(new_job)
25submitter.submitJobs()
createEmptyJob2()
Function¶
- libpyRR39_submit.createEmptyJob2((str)fileName, (str)submitterPluginVersion) _JobBasics ¶
Create a new job to render given scene file. The second argument should contain the name and version of your plugin
setVerboseLevel()
Function¶
- libpyRR39_submit.setVerboseLevel((int)level)¶
Set the verbose level for this module. (1:errors, 2:warnings, 3:info, 4:progress, 10:debug, 12/13:more job debug)
get_frameSetBinaryLock_name()
Function¶
- libpyRR39_submit.get_frameSetBinaryLock_name() str ¶
Reserved word
Submitter
Class¶
- class libpyRR39_submit.Submitter¶
RR Submitter
class Submitter properties:
Type
Name
Description
bool
- autodelete_frames¶
Delete all rendered frames before submitting the job
int
- maxWaitForIDs¶
maximum number of waitForPreIDs. see waitForPreID()
bool
- scene_exist_check¶
Check if the scene file exists.
class Submitter functions:
Return Type
Name
Description
- addJob(_JobBasics job)¶
Add a
rrJob._JobBasics
to the submission queue- deleteAllJobs()¶
Delete all jobs from the submission queue
- deleteJob(int queueID)¶
Delete job from the submission queue
str
- errorString()¶
Returns the error string if no log file is enabled
- getJob(int queueID)¶
Get a copy of a
rrJob._JobBasics
from the submission queueint
- getJobCount()¶
Total number of jobs to submit
object
- getPassA85()¶
Can be called after setLogin() to retrieve your PW as a hash. This way you can temporaly save it without the possibility to retrieve your original password
str
- getRandomPassword()¶
Returns a 40 char random password
int
- jobsSendCount()¶
Number of jobs submitted
int
- jobsSendID(int index)¶
Job IDs of jobs submitted.
bool
- loadLogin(str keyName)¶
Loads a login you have saved with saveLogin(). Returns False if there was an issue loading the Login.
- loadLogin( (Submitter)self, (str)keyName) -> bool :
Loads a login you have saved with saveLogin(). Returns False if there was an issue loading the Login.
bool
- loadLoginFile(str filename, str keyName)¶
Loads a login you have saved with saveLoginFile(). Returns False if there was an issue loading the Login.
int
- runCPUPeak(int timeDelayMinutes)¶
Peaks the CPU usage of 1 core for 3 seconds if timeDelayMinutes have passed since the last core peak (executed by this function)
bool
- saveLogin(str keyName)¶
Saves the login you have set with setLogin() into the local users settings. KeyName has to be any unique identifier. E.g. ‘myRRLogin’. Returns False if there was an issue saving the Login.
bool
- saveLoginFile(str filename, str keyName, bool userTransferable, bool hostTransferable)¶
Saves the login you have set with setLogin() into the filename specified. KeyName has to be any unique identifier. E.g. ‘myRRLogin’. ‘userTransferable’ means that any user can get the password with loadLoginFile(). ‘hostTransferable’ means that you can get the password on any machine with loadLoginFile(). Returns False if there was an issue loading the Login. e.g. file not writeable, directory does not exist, login not set…
bool
- send_JobCommand(int jobID, int commandID)¶
Send command to existing job in rrServers queue.
bool
- send_addBinaryFrameSet(int index, _binaryFrameSet binaryFrameList)¶
Update frameset of existing job in rrServers queue.
_jobFramelistWrapped
- send_getFrameList(int jobID)¶
Requests a framelist from the rrServer with the status of each frame.
_jobStatusInfo
- send_getJobStatus(int jobID)¶
Requests job data with some status informations.
- setJobCommandPassword(str password)¶
Set the jobs command password that might be required for the send* functions.
- setJobEnabled(int queueID, bool is_enabled)¶
Enable/Disable nth job in the submission queue
- setLastJobsID(int jobID)¶
Use the ID of the last job send to RR. Allows to continue the submission group even if this module was reloaded. Jobs of one submission are grouped in rrControl
- setLogin(str username, str password)¶
Sets the login to retrieve any data from the rrServer. This is required if one of the following configuration options apply (rrConfig, tab logins): - “Authorization required for all connections” is enabled - “Trusted local intranet IP whitelist” is set and you are outside this IP range
bool
- setLoginA85(str self, object passwordHash)¶
Use it the same way as setLogin(), just with the password retrieved from getPassA85(). Returns true if the hash string has the right format (Does not mean the login is right).
bool
- submitJobs()¶
Submit Jobs via Python.
bool
- submitJobs_withUI()¶
Submit Jobs by opening the rrSubmitter UI.