hqrop module¶
-
hqrop.
buildContainingJobSpec
(job_name, hq_cmds, parms, child_job, apply_conditions_to_children=True)¶ Return a job spec that submits the child job and waits for it.
The job containing the child job will not run any command.
-
hqrop.
checkBaseParameters
(parms)¶ Check the values of the given parameters.
Return True if all the parameter values are valid and False otherwise.
-
hqrop.
checkForRecursiveChain
(hq_node)¶ Checks to see if the HQueue node is an ancestor to its output driver.
-
hqrop.
checkOutputDriver
(output_driver_string, _visited_nodes=None)¶
-
hqrop.
checkPath
(path)¶ Returns the name ofthe Houdini variable that the given path starts with, without the trailing /.
Returns None if no valid output directory variable could be determined.
Copy the render project’s files to the target location specified in parms.
Return True if the copy is successful. Return False otherwise. The user is first prompted by the file dependency dialog to choose the files to be copied to the shared folder.
-
hqrop.
displayError
(msg, exception=None)¶ Pop up a message dialog to display the given error message.
If the ui is unavailable, then it writes the message to the console.
-
hqrop.
displayMessage
(msg)¶ Pop up a message dialog to display the given message.
If the ui is unavailable, then it writes the message to the console.
-
hqrop.
doesHQServerExists
(hq_server)¶ Check that the given HQ server can be connected to.
Returns True if the server exists and False if it does not. Furthermore, it will display an error message if it does not exists.
-
hqrop.
expandHQROOT
(path, hq_server)¶ Return the given file path with instances of $HQROOT expanded out to the mount point for the HQueue shared folder root.
-
hqrop.
getBaseParameters
()¶ Return a dictionary of the base parameters used by all HQueue ROPs.
-
hqrop.
getDirectoriesToCreate
(hq_node, expand=True)¶ Return a list of directory paths that should be created on the farm.
The result is based on the contents of the “Create Directories” parameter. If expand is True, then return a list of directories with all variables expanded.
-
hqrop.
getEnvVariablesToSet
(hq_node)¶ Return a dictionary of environment variables to set on the client machine when processing a job.
-
hqrop.
getFileInfosFromFileReferences
(file_references, hq_rop_node)¶ Return a sequence of file_info dictionaries corresponding to the files matching the given file references.
-
hqrop.
getFrames
(hq_rop_node)¶ Return a tuple of frame numbers that the given HQueue ROP node is configured to render.
-
hqrop.
getHFS
(parms)¶ Returns the hfs paths, prefixed with $HQROOT if possible.
-
hqrop.
getHQROOT
(hq_server)¶ Query the HQueue server and return the mount point path to the HQueue shared folder root.
Return None if the path cannot be retrieved from the server.
-
hqrop.
getHQueueCommands
(remote_hfs, num_cpus=0)¶ Return the dictionary of commands to start hython, Python, and mantra.
Return None if an error occurs when reading the commands from the HQueueCommands file.
If num_cpus is greater than 0, then we add a -j option to each command so that the application is run with a maximum number of threads.
-
hqrop.
getHQueueServerMachineFromURL
(hq_server_url)¶
-
hqrop.
getHipFileAndHFS
(parms)¶ Return the hip file and hfs paths, prefixed with $HQROOT if possible.
-
hqrop.
getJobCommands
(hq_cmds, cmd_key, script=None)¶ Return platform-specific job commands defined by cmd_key and script.
Return a dictionary where the keys are the supported platforms (i.e. linux, windows, macosx) and the values are the shell commands to be executed for the job. cmd_key is a key into the hq_cmds dictionary and should be either “hythonComands”, “pythonCommands” or “mantraCommands”.
The optional script argument indicates whether the job should execute a script file. If script is None, then the job should run the commands from hq_cmds[cmd_key] as-is.
-
hqrop.
getOutputDirVariable
(rop_node)¶ Return the name of the Houdini variable that expands to the output directory of the given ROP node, without a trailing /.
Return None if no valid output directory variable could be determined.
-
hqrop.
getOutputDriver
(rop_node)¶ Returns the node which does the rendering/simulation work.
For eg, if a hq_sim ROP points to a wedge ROP which points to a Geometry ROP, then this function will return the Geometry ROP.
This function skips over all “pointer” ROPs.
Return None if the Output Driver parameter is empty or points to a node path that does not exist. Also return None hq_rop_node is None or if the Output Driver parameter does not exist.
-
hqrop.
getOutputDriverString
(rop_node)¶ Return the node set in the Output Driver parameter of ‘rop node’.
Returns None if the there is no Output Driver parameter.
-
hqrop.
getOutputParm
(rop_node)¶ Return the output file parameter from the given ROP node.
Return None if rop_node is None or if it is not a recognized output driver.
-
hqrop.
getOutputParmPattern
(rop_node)¶ Return the file pattern in the ROP node’s output parameter.
Return None if no output parameter could be found.
-
hqrop.
getSelectedFileReferences
(output_dir_variable)¶ Returns the required file references when the file dependency dialog is to be skipped.
-
hqrop.
getUnexpandedStringParmVal
(parm)¶ Return the value for the given string parameter without expanding any variables.
-
hqrop.
selectClientGroups
(hq_server, client_groups_parm)¶ Select client groups on the HQueue server from a list.
A modal dialog pops-up displaying a list of all the client groups on the HQueue farm. The user selects the groups from the list and clicks on OK to populate the client_groups_parm parameter with the selection.
-
hqrop.
selectClients
(hq_server, clients_parm)¶ Select clients registered on the HQueue server from a list.
A modal dialog pops-up displaying a list of all the client machines on the HQueue farm. The user selects the machines from the list and clicks on OK to populate the clients_parm parameter with the selection.
-
hqrop.
sendJob
(hq_server, main_job, open_browser, report_submitted_job_id)¶ Send the given job to the HQ server.
If the ui is available, either display the HQ web interface or display the id of the submitted job depending on the value of open_browser and ‘report_submitted_job_id’.
-
hqrop.
submitJob
(parms, submit_function)¶ Submits a job with the given parameters and function after checking to see if the project files need to be copied or not.
submit_function will be passed parms
-
hqrop.
substituteNonHQVariables
(file_path, expand_frame_variables=True)¶ Returns the file path with all the variables that are not HQ specfic expanded.
-
hqrop.
substituteWithHQROOT
(hq_server, file_path, expand_frame_variables=True)¶ Replace the beginning of the given path with “$HQROOT”.
Return the new path. If the original path is not under HQueue’s shared network file system, return the original path. Return None if an error occurs.
-
hqrop.
warnOrAutoSaveHipFile
(parms)¶ Automatically save the current .hip file or display a warning to the user about unsaved changes.
This function is meant to be called before an HQueue job submission as a way of informing the user about unsaved changes that may not trickle down to the HQueue farm.
Return True if the job submission should continue on. Return False if the user chose to cancel the job submission.