hqueue package

Submodules

hqueue.houdini module

hqueue.houdini.enableProgressReporting(rop)

Enable progress reporting on the given ROP node.

hqueue.houdini.fileExists(file_path)

Return true if the file path exists and False otherwise.

This function checks the HOUDINI_PATHMAP environment variable to check other paths.

hqueue.houdini.getImageFileTileSuffix(rop)

Return the tile suffix to use in image files as specified by the given output driver.

hqueue.houdini.getNode(node_path)

Return the node matching the specified node path.

Raise an exception if no such node exists.

hqueue.houdini.getRopNodeAndTileCallbackParm(rop_path, enable_checkpoints, get_tile_callback=True)

Return the requested ROP node.

Also return the ROP node’s tile callback parameter if it has a tile callback parameter.

hqueue.houdini.getVerboseLevel(rop=None)

Return the render verbose level to use in a render job.

If rop is specified, then try to obtain the verbose level from the ROP node.

hqueue.houdini.hqScriptsDirPath()

Return the unexpanded directory containing the HQueue scripts.

hqueue.houdini.loadHipFile(hip_file)

Load the specified .hip file.

Raise an exception if the file could not be found or loaded.

hqueue.houdini.render(node, *args, **kwargs)

Render the specified node.

Raise an exception if the node could not be rendered.

hqueue.houdini.setParmValue(parm, value)

Sets a parm with the given value.

Will handle parmTuples and cases where the parm has an expression set.

hqueue.houdini.setParmValueInRopNodeAndInputs(rop, parm_name, val)

Set the value for the given parameter in the specified ROP node and recursively in each of its ROP input nodes.

hqueue.houdini.setTileCallbackParmValue(parm, frame_index, frame_number, num_frames)

Set the value of the specified tile callback parameter using the given arguments.

hqueue.rendertrackerrpc module

hqueue.rendertrackerrpc.endedGeneratingFrameIFD(frame)
hqueue.rendertrackerrpc.getProjectName()
hqueue.rendertrackerrpc.init(project_name)

Initialize the global RPC connection to the HQueue render tracker.

hqueue.rendertrackerrpc.setCurrentFrameError(msg)
hqueue.rendertrackerrpc.setFrameRenderFraction(frame, fraction)
hqueue.rendertrackerrpc.setProjectError(msg)
hqueue.rendertrackerrpc.startedFrameRender(frame, job_id, image_path)
hqueue.rendertrackerrpc.startedGeneratingFrameIFD(frame)
hqueue.rendertrackerrpc.startedRenderProject(frames, generate_ifds, job_id)

hqueue.server module

This module contains functionality that requires connecting to the HQueue server.

hqueue.server.connection()

Return a proxy connection to the HQueue server.

hqueue.server.getJobCPUAndTagInfo(job_id=None)

Return the CPU and tag info for the specified job.

If job_id is None then return info on the current job running this process.

hqueue.server.getJobInfo(job_id, attribs=None)

Return information on the requested attributes for the specified job.

Attribute information is returned as a dictionary.

attribs can be a list of attribute names. If attribs is None then all attribute information is returned.

If job_id is None then information on the current job running this process is returned.

hqueue.server.getParentJobID()

Return current job’s parent job id.

The current job is the one running this process. If the current job has multiple parents then return the first parent.

hqueue.server.submitJobs(job_specs)

Submit jobs to the HQueue server.

Return a sequence of job ids for the new job(s) or None if the submission failed.

job_specs can either be a dictionary representing a single job specification or a tuple/list of dictionary objects representing multiple job specifications.

hqueue.server.updateJobName(job_id, new_name)

Updates the name of the job associated with the given job_id.

hqueue.utils module

This module contains miscellaneous utility functions pertaining to HQueue.

hqueue.utils.failWithError(msg)

Print the specified message to stderr and then exit the process with a non-zero error code.

hqueue.utils.getJobArgs(args)

Scans the job environment for the given list of arguments and returns a dictionary mapping argument names to their values.

If an argument does not exist in the environment then an error is raised and the job fails.

hqueue.utils.logInfo(msg)

Log the specified message.

hqueue.utils.logProgress(progress_pct)

Log the job’s reported progress percentage.

hqueue.utils.logSubprocessOutput(pipe)

Log the output of a spawned subprocess.

The output is retrieved from the given subprocess pipe. This function returns when the subprocess exits. This function returns the complete subprocess output.

hqueue.utils.logWarning(msg)

Log the specified warning message.

hqueue.utils.replaceWithHQROOT(file_path)

Replace the beginning of the given path with $HQROOT.

If the path is not under HQ’s shared network file system return the original path.

hqueue.utils.setPreservedEnvVar(name, value)

Set an environment variable that will be preserved in child jobs.

hqueue.utils.updateJobEnvWithPreservedVars(job_spec)

Update a job spec to set environment variables that are to be preserved.

The variables to preserve are in the HQ_PRESERVE_ENV_VARS environment variable in a comma-separated list, and HQ_PRESERVE_ENV_VARS is not explicitly in this list.

Module contents