c4d.modules.net.NetRenderService

class c4d.modules.net.NetRenderService

New in version R15.037.

Warning

This type cannot be instantiated.

Methods Signatures

NetRenderService.GetUuid()

Gets the UUID of the service.

NetRenderService.Message()

Sends a message to the render service.

NetRenderService.ClearResults()

Clears the results.

NetRenderService.RemoveResult()

Remove the result for the given job.

NetRenderService.GetNetPreferences()

Retrieves the NET preferences.

NetRenderService.CopyRenderTaskFrom()

Copy the Render Task matching the jobUuid.

NetRenderService.AddMachine()

Adds a machine.

NetRenderService.GetAllMachineUuids()

Retrieves the UUIDs of all machines (with default parameters).

NetRenderService.GetMachinesList()

Retrieves the information of all machines.

NetRenderService.GetUserPool()

Gets the user pool.

NetRenderService.GetJobsList()

Retrieves the render jobs.

NetRenderService.CreateRenderJob()

Creates a render job.

NetRenderService.StartRendering()

Starts a render job.

NetRenderService.InitRendering()

Initializes a render job.

NetRenderService.InitAndStartRenderingFullAsync()

Starts a render job fully asynchronous.

NetRenderService.StopRendering()

Stops a render job.

NetRenderService.DeleteRenderJob()

Deletes a render job.

NetRenderService.InsertJobAfter()

Inserts jobUuid1 after jobUuid2.

NetRenderService.InsertJobBefore()

Inserts jobUuid1 before jobUuid2.

NetRenderService.SetDefaultSceneName()

Sets the Default Scene Name.

NetRenderService.GetRepository()

Retrieves the repository for the service.

NetRenderService.AddLogToJob()

Add a string to the job log.

NetRenderService.AddLogToMachine()

Adds a string to the machine log.

NetRenderService.GetName()

Gets the name of the service.

NetRenderService.NetConsoleOutput()

Prints a string to the service.

Methods Documentation

NetRenderService.GetUuid(self)

Gets the UUID of the service.

Return type

UUID

Returns

The UUID of the service.

NetRenderService.Message(self, userUuid, op, isPrivate, msg, result=None)

Sends a message to the render service.

New in version R16.021.

See also

MSG_NETRENDER for the information on the messages type, data and input/output.

Parameters
  • userUuid – The user UUID.

  • op (object) –

  • isPrivate (bool) –

  • msg (c4d.BaseContainer) – The message container.

  • result (Optional[c4d.BaseContainer]) – The optional result container.

Return type

bool

Returns

NetRenderService.ClearResults(self, jobUuid)

Clears the results.

New in version R16.021.

Parameters

jobUuid – The job UUID.

Return type

bool

Returns

True if results were cleared, otherwise False.

NetRenderService.RemoveResult(self, jobUuid, relResultPath)

Remove the result for the given job.

Parameters
  • jobUuid – The job UUID.

  • relResultPath (str) – File Path of the result path?

Return type

bool

Returns

True if results were removed, otherwise False.

NetRenderService.GetNetPreferences(self)

Retrieves the NET preferences.

New in version R16.021.

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.CopyRenderTaskFrom(self, jobUuid, resolveMachineUuids=False)

Copy the Render Task matching the jobUuid.

Parameters
  • jobUuid – The job UUID.

  • resolveMachineUuids (bool) – Currently ignored.

Return type

List[dict{“_frame”: int, “_state”: int, “_renderTime”: int, “_machines”: List[uuid]}]

Returns

a list filled with dictionary representing each render task - _frame: The frame number. - _state: The render state. - _renderTime: The render time. - _machines: A list with all the machines assigned to the job.

NetRenderService.AddMachine(self, address, securityToken, allowGui, uuidOfMachineToOverwrite)

Adds a machine.

New in version R16.038.

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(self, list=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[UUID]

Returns

The list of all machine UUIDs.

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

Retrieves the information of all machines.

New in version R16.021.

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[c4d.BaseContainer]

Returns

The list of machines.

NetRenderService.GetUserPool(self)

Gets the user pool.

Return type

c4d.modules.net.UserPool

Returns

The user pool.

NetRenderService.GetJobsList(self, triggerWatchDog, rdata, assets, results, log, selectedJob=None, selectedJobOnly=False, user=None, settings=None)

Retrieves the render jobs.

New in version R16.021.

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 (Optional[c4d.BaseContainer]) –

    New in version R16.038: The settings container.

Return type

List[c4d.BaseContainer]

Returns

The render jobs.

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

Creates a render job.

New in version R16.021.

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 (Optional[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(self, mode, doc, jobUuid, bt)

Starts a render job.

New in version R16.021.

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(self, doc, rdata, jobUuid, flags, machines)

Initializes a render job.

New in version R16.021.

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(self, jobUuid)

Starts a render job fully asynchronous.

New in version R16.021.

Parameters

jobUuid (uuid.Uuid) – The job UUID.

Return type

bool

Returns

True if rendering was started, otherwise False.

NetRenderService.StopRendering(self, mode, jobUuid, result)

Stops a render job.

New in version R16.021.

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(self, jobUuid, informClients)

Deletes a render job.

New in version R16.021.

Parameters
  • jobUuid – The job UUID.

  • informClients (bool) –

Return type

bool

Returns

True if the render job was deleted, otherwise False.

NetRenderService.InsertJobAfter(self, jobUuid1, jobUuid2)

Inserts jobUuid1 after jobUuid2.

New in version R16.021.

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(self, jobUuid1, jobUuid2)

Inserts jobUuid1 before jobUuid2.

New in version R16.021.

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(self, jobUuid, defaultSceneName)

Sets the Default Scene Name.

New in version R16.021.

Parameters
  • jobUuid – The job UUID.

  • defaultSceneName (str) – The default scene name.

Return type

bool

Returns

True if successful, otherwise False.

NetRenderService.GetRepository(self)

Retrieves the repository for the service.

New in version R16.021.

Return type

c4d.modules.net.Repository

Returns

The repository.

NetRenderService.AddLogToJob(self, jobUuid, log, doLock, append=True)

Add a string to the job log.

New in version R16.021.

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(self, jobUuid, log, doLock)

Adds a string to the machine log.

New in version R16.021.

Parameters
  • machineUuid – The machine UUID.

  • log (str) – The string to add.

  • doLock (bool) –

Return type

bool

Returns

True if successful, otherwise False.

NetRenderService.GetName(self)

Gets the name of the service.

New in version R16.021.

Return type

str

Returns

The name of the service.

NetRenderService.NetConsoleOutput(self, flags, value)

Prints a string to the service.

New in version R16.021.

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 output.