NetRenderService

New in version R15.037.

Note

This type cannot be instantiated.

Members

NetRenderService.GetUuid()

Gets the UUID of the service.

Return type:UUID
Returns:The UUID of the service.
NetRenderService.Message(userUuid, op, isPrivate, msg, result=None)

New in version R16.021.

Sends a message to the render service.

Parameters:
  • userUuid – The user UUID.
  • op (object) –
  • isPrivate (bool) –
  • msg (c4d.BaseContainer) – The message container.
  • result (c4d.BaseContainer) – The optional result container.
Return type:

bool

Returns:

NetRenderService.ClearResults(jobUuid)

New in version R16.021.

Clears the results.

Parameters:jobUuid – The job UUID.
Return type:bool
Returns:True if results were cleared, otherwise False.
NetRenderService.GetNetPreferences()

New in version R16.021.

Retrieves the NET preferences.

Return type:c4d.BaseContainer
Returns:The NET preferences container. For the container IDs, see preferences dialog and WPREF_NET in the C++ API header ge_prepass.h.
NetRenderService.AddMachine(address, securityToken, allowGui, uuidOfMachineToOverwrite)

New in version R16.038.

Adds a machine.

Parameters:
  • address (str) – The machine address.
  • securityToken (str) – The security token.
  • allowGui (bool) – True to allow GUI, otherwise False.
  • uuidOfMachineToOverwrite – The UUID of the machine to overwrite.
Return type:

bool

Returns:

True if the machine was added successfully, otherwise False.

NetRenderService.GetAllMachineUuids(list=c4d.MACHINELIST_ALL, bits=VERIFICATIONBIT_NONE, includeLocalMachine=True, includeBonjourMachines=True)

Retrieves the UUIDs of all machines (with default parameters). Parameters can be changed to filter the machines.

Parameters:
  • list (int) –

    Machine list flags:

    MACHINELIST_ONLINE Online.
    MACHINELIST_OFFLINE Offline.
    MACHINELIST_ALL All: MACHINELIST_ONLINE | MACHINELIST_OFFLINE.
  • bits (int) –

    Verification bits:

    VERIFICATIONBIT_NONE None.
    VERIFICATIONBIT_ONLINE Online.
    VERIFICATIONBIT_VERIFIED Verified.
    VERIFICATIONBIT_VERIFIEDME Certified client (set on client for server).
    VERIFICATIONBIT_SHARED Shared.
    VERIFICATIONBIT_VERIFYING Verifying.
    VERIFICATIONBIT_FAILURE Unknown.
    VERIFICATIONBIT_SECURITYTOKENCHANGED Security token changed.
    VERIFICATIONBIT_WRONGBUILDID Wrong build ID.
    VERIFICATIONBIT_WRONGARCHITECTURE Wrong architecture.
    VERIFICATIONBIT_REMOTENOTREACHABLE Remote not reachable.
    VERIFICATIONBIT_THISNOTREACHABLE This not reachable.
    VERIFICATIONBIT_WRONGSECURITYTOKEN Wrong security token.
    VERIFICATIONBIT_DEMONOTACTIVATED Demo not activated.
    VERIFICATIONBIT_REMOVING Removing.
    VERIFICATIONBIT_NORENDERSUPPORT No render support.
    VERIFICATIONBIT_INITIALIZING GUI flag only to show a please wait indicator on startup.
    VERIFICATIONBIT_VERIFICATIONESTABLISHED Set soon after the persistent connection has been registered. Can be set without VERIFICATIONBIT_VERIFIED on first connect and host adds itself on the server.
  • includeLocalMachine (bool) – Pass False to not include local machine. Default to True.
  • includeBonjourMachines (bool) – Pass False to not include Bonjour machines. Default to True.
Return type:

list of UUID

Returns:

The list of all machine UUIDs.

NetRenderService.GetMachinesList(logCount=-1, getOnlyThisMachine=None)

New in version R16.021.

Retrieves the information of all machines.

Parameters:
  • logCount (int) –

    New in version R16.050.

    The log count.

  • getOnlyThisMachine – Pass a machine UUID to get only the information for this machine.
Return type:

list of BaseContainer

Returns:

The list of machines.

NetRenderService.GetUserPool()

Gets the user pool.

Return type:c4d.modules.net.UserPool
Returns:The user pool.
NetRenderService.GetJobsList(triggerWatchDog, rdata, assets, results, log, selectedJob=None, selectedJobOnly=False, user=None, settings=None)

New in version R16.021.

Retrieves the render jobs.

Parameters:
  • triggerWatchDog (bool) –
  • rdata (int) –

    The render data select flags:

    DETAILSELECTOR_NONE None
    DETAILSELECTOR_SELECTED Selected.
    DETAILSELECTOR_NONSELECTED Not selected.
  • assets (int) –

    The assets data select flags:

    DETAILSELECTOR_NONE None
    DETAILSELECTOR_SELECTED Selected.
    DETAILSELECTOR_NONSELECTED Not selected.
  • results (int) –

    The results data select flags:

    DETAILSELECTOR_NONE None
    DETAILSELECTOR_SELECTED Selected.
    DETAILSELECTOR_NONSELECTED Not selected.
  • log (int) –

    The log data select flags:

    DETAILSELECTOR_NONE None
    DETAILSELECTOR_SELECTED Selected.
    DETAILSELECTOR_NONSELECTED Not selected.
  • selectedJob
  • selectedJobOnly (bool) –
  • user – The user UUID.
  • settings (c4d.BaseContainer) –

    New in version R16.038.

    The settings container.

Return type:

list of BaseContainer

Returns:

The render jobs.

NetRenderService.CreateRenderJob(docName, jobUuid, creator, username, bt=None, watchFolderName="")

New in version R16.021.

Creates a render job.

Parameters:
  • docName (str) – The document name.
  • jobUuid – The job UUID.
  • creator (int) –

    The render job creator:

    RENDERJOBCREATOR_BATCHRENDER Batch render.
    RENDERJOBCREATOR_PICTUREVIEWER Picture Viewer.
    RENDERJOBCREATOR_USER User.
    RENDERJOBCREATOR_WATCHDIRECTORY Watch directory.
    RENDERJOBCREATOR_WATCHDIRECTORYSTARTUP Watch directory startup.
    RENDERJOBCREATOR_OTHER Other.
  • username (str) – The user name.
  • bt (c4d.threading.BaseThread) – The thread.
  • watchFolderName (str) – The name of the folder to watch.
Return type:

int

Returns:

The result:

CREATEJOBRESULT_OK Ok.
CREATEJOBRESULT_OUTOFMEMORY Out of memory.
CREATEJOBRESULT_ASSETMISSING Asset missing.
CREATEJOBRESULT_SAVINGFAILED Saving failed.
CREATEJOBRESULT_REPOSITORYERROR Repository error.

NetRenderService.StartRendering(mode, doc, jobUuid, bt)

New in version R16.021.

Starts a render job.

Parameters:
  • mode (int) –

    The thread mode:

    THREADMODE_DEPRECATED_SYNCHRONOUS Synchronous thread. Deprecated.
    THREADMODE_ASYNC Asynchronous thread.
    THREADMODE_PRIVATE_OPENGL

    New in version R18.

    Private

  • doc (c4d.documents.BaseDocument) – The document.
  • jobUuid – The job UUID.
  • bt (c4d.threading.BaseThread) – The thread for the operation.
Return type:

int

Returns:

The result:

RENDERRESULT_OK Function was successful.
RENDERRESULT_OUTOFMEMORY Not enough memory.
RENDERRESULT_ASSETMISSING Assets (textures etc.) are missing.
RENDERRESULT_SAVINGFAILED Failed to save.
RENDERRESULT_USERBREAK User stopped the processing.
RENDERRESULT_GICACHEMISSING GI cache is missing.
RENDERRESULT_NOMACHINE Machine was not found. Can only happen during Team Rendering.
RENDERRESULT_PROJECTNOTFOUND Project was not found. Can only be returned by Cinema 4D during command line rendering.
RENDERRESULT_ERRORLOADINGPROJECT There was an error while loading the project. Can only be returned by Cinema 4D during command line rendering.
RENDERRESULT_NOOUTPUTSPECIFIED Output was not specified. Can only be returned by Cinema 4D during command line rendering.

NetRenderService.InitRendering(doc, rdata, jobUuid, flags, machines)

New in version R16.021.

Initialiazes a render job.

Parameters:
  • doc (c4d.documents.BaseDocument) – The document.
  • rdata (c4d.BaseContainer) – The render data.
  • jobUuid (uuid.Uuid) – The job UUID.
  • flags (int) –

    The NET render flags:

    NETRENDERFLAGS_NONE None.
    NETRENDERFLAGS_OPEN_PICTUREVIEWER Open Picture Viewer.
    NETRENDERFLAGS_SHOWERRORS Show errors.
    NETRENDERFLAGS_DELETEAFTERRENDERING Delete after rendering.
    NETRENDERFLAGS_NOPEERTOPEERASSETDISTRIBUTION No peer-to-peer asset distribution. Automatically set by local preferences.
    NETRENDERFLAGS_NOREQUESTONDEMAND No request on demand. Automatically set by local preferences.
    NETRENDERFLAGS_EXCLUDECLIENTONRENDERINGERROR Exclude client on rendering error. Automatically set by local preferences.
    NETRENDERFLAGS_SAVERESULTSINREPOSITORY Save results in repository.
    NETRENDERFLAGS_ASSEMBLEB3DFILESIMMEDIATLEY Assemble BodyPaint 3D files immediately.
    NETRENDERFLAGS_NOWRITETEST No write test for BodyPaint 3D files.
    NETRENDERFLAGS_HANDLEWARNINGASERROR Handle warning as error.
    NETRENDERFLAGS_KEEPB3DFILESAFTERASSEMBLING Keep the BodyPaint 3D files on assembling.
  • machines (c4d.BaseContainer) – The machines container.
Return type:

int

Returns:

The result:

RENDERRESULT_OK Function was successful.
RENDERRESULT_OUTOFMEMORY Not enough memory.
RENDERRESULT_ASSETMISSING Assets (textures etc.) are missing.
RENDERRESULT_SAVINGFAILED Failed to save.
RENDERRESULT_USERBREAK User stopped the processing.
RENDERRESULT_GICACHEMISSING GI cache is missing.
RENDERRESULT_NOMACHINE Machine was not found. Can only happen during Team Rendering.
RENDERRESULT_PROJECTNOTFOUND Project was not found. Can only be returned by Cinema 4D during command line rendering.
RENDERRESULT_ERRORLOADINGPROJECT There was an error while loading the project. Can only be returned by Cinema 4D during command line rendering.
RENDERRESULT_NOOUTPUTSPECIFIED Output was not specified. Can only be returned by Cinema 4D during command line rendering.

NetRenderService.InitAndStartRenderingFullAsync(jobUuid)

New in version R16.021.

Starts a render job fully asynchronous.

Parameters:jobUuid (uuid.Uuid) – The job UUID.
Return type:bool
Returns:True if rendering was started, otherwise False.
NetRenderService.StopRendering(mode, jobUuid, result)

New in version R16.021.

Stops a render job.

Parameters:
  • mode (int) –

    The thread mode:

    THREADMODE_DEPRECATED_SYNCHRONOUS Synchronous thread. Deprecated.
    THREADMODE_ASYNC Asynchronous thread.
    THREADMODE_PRIVATE_OPENGL

    New in version R18.

    Private

  • jobUuid – The job UUID.
  • result (int) –

    The result:

    RENDERRESULT_OK Function was successful.
    RENDERRESULT_OUTOFMEMORY Not enough memory.
    RENDERRESULT_ASSETMISSING Assets (textures etc.) are missing.
    RENDERRESULT_SAVINGFAILED Failed to save.
    RENDERRESULT_USERBREAK User stopped the processing.
    RENDERRESULT_GICACHEMISSING GI cache is missing.
    RENDERRESULT_NOMACHINE Machine was not found. Can only happen during Team Rendering.
    RENDERRESULT_PROJECTNOTFOUND Project was not found. Can only be returned by Cinema 4D during command line rendering.
    RENDERRESULT_ERRORLOADINGPROJECT There was an error while loading the project. Can only be returned by Cinema 4D during command line rendering.
    RENDERRESULT_NOOUTPUTSPECIFIED Output was not specified. Can only be returned by Cinema 4D during command line rendering.
NetRenderService.DeleteRenderJob(jobUuid, informClients)

New in version R16.021.

Deletes a render job.

Parameters:
  • jobUuid – The job UUID.
  • informClients (bool) –
Return type:

bool

Returns:

True if the render job was deleted, otherwise False.

NetRenderService.InsertJobAfter(jobUuid1, jobUuid2)

New in version R16.021.

Inserts jobUuid1 after jobUuid2.

Parameters:
  • jobUuid1 – The job to insert after jobUuid2.
  • jobUuid2 – The job to insert jobUuid1 after.
Return type:

bool

Returns:

True if jobUuid1 was inserted after jobUuid2 otherwise False.

NetRenderService.InsertJobBefore(jobUuid1, jobUuid2)

New in version R16.021.

Inserts jobUuid1 before jobUuid2.

Parameters:
  • jobUuid1 – The job to insert before jobUuid2.
  • jobUuid2 – The job to insert jobUuid1 before.
Return type:

bool

Returns:

True if jobUuid1 was inserted before jobUuid2 otherwise False.

NetRenderService.SetDefaultSceneName(jobUuid, defaultSceneName)

New in version R16.021.

Sets the Default Scene Name.

Parameters:
  • jobUuid – The job UUID.
  • defaultSceneName (str) – The default scene name.
Return type:

bool

Returns:

True if successful, otherwise False.

NetRenderService.GetRepository()

New in version R16.021.

Retrieves the repository for the service.

Return type:c4d.modules.net.Repository
Returns:The repository.
NetRenderService.AddLogToJob(jobUuid, log, doLock, append=True)

New in version R16.021.

Add a string to the job log.

Parameters:
  • jobUuid – The job UUID.
  • log (str) – The string to add.
  • doLock (bool) –
  • append (bool) –
Return type:

bool

Returns:

True if successful, otherwise False.

NetRenderService.AddLogToMachine(jobUuid, log, doLock)

New in version R16.021.

Adds a string to the machine log.

Parameters:
  • machineUuid – The machine UUID.
  • log (str) – The string to add.
  • doLock (bool) –
Return type:

bool

Returns:

True if successful, otherwise False.

NetRenderService.GetName()

New in version R16.021.

Gets the name of the service.

Return type:str
Returns:The name of the service.
NetRenderService.NetConsoleOutput(flags, value)

New in version R16.021.

Prints a string to the service.

Parameters:
  • flags (int) –

    The console ouput flags:

    OUTPUT_DIAGNOSTIC Diagnostic output, shows up if a group of output is activated. This is the default.
    OUTPUT_WARNING Warning output, shows up if a group of output is activated.
    OUTPUT_CRITICAL Critical output, shows up if a group of output is activated.
    OUTPUT_NOLINEBREAK If set, no line break is added.
    OUTPUT_HEADER If set, header with line number and file name is added. C++ only.
  • value (str) – The string to ouput.