BatchRender Class Reference

#include <lib_batchrender.h>

Detailed Description

A class to access the Render Queue.

Public Member Functions

Bool Open ()
 
Bool AddFile (const Filename &File, Int32 number)
 
Bool DelFile (const Filename &File)
 
Bool IsRendering ()
 
void SetRendering (Int32 set)
 
Bool SetNetError (Int32 n, const String &machineName, const String &errorString, Bool isWarning)
 
Bool SetNetError (const C4DUuid &uuid, const String &machineName, const String &errorString, Bool isWarning)
 
Int32 GetElementCount ()
 
Filename GetElement (Int32 n)
 
void EnableElement (Int32 n, Bool bSet)
 
Bool GetEnableElement (Int32 n)
 
Int32 GetElementStatus (Int32 n)
 
void GetJsonJobs (PyList *list)
 
BaseBitmapGetFrameBitmap (const C4DUuid &nodeUuid, const C4DUuid &frameUuid)
 
void SetUseNet (Int32 n, Bool on)
 
Bool GetTextureError ()
 
void SetTextureError (Bool state)
 
Bool GetCheckTexture ()
 
void SetCheckTexture (Bool state)
 
Int32 GetTakeCount (Int32 n)
 
void GetAllTakeNames (Int32 n, maxon::BaseArray< String > &names)
 
Int32 GetActiveTakeIndex (Int32 n)
 
String GetActiveTakeName (Int32 n)
 
void SetActiveTakeIndex (Int32 n, Int32 index, Bool takeOnly)
 
Int32 GetRenderSettingsCount (Int32 n)
 
void GetAllRenderSettingsNames (Int32 n, maxon::BaseArray< String > &names)
 
Int32 GetActiveRenderSettingsIndex (Int32 n)
 
String GetActiveRenderSettingsName (Int32 n)
 
void SetActiveRenderSettingsIndex (Int32 n, Int32 index)
 
void GetAllCameraNames (Int32 n, maxon::BaseArray< String > &names)
 
Int32 GetCameraCount (Int32 n)
 
Int32 GetActiveCameraIndex (Int32 n)
 
String GetActiveCameraName (Int32 n, Bool filename)
 
void SetActiveCameraIndex (Int32 n, Int32 index)
 

Private Member Functions

 BatchRender ()
 
 ~BatchRender ()
 

Constructor & Destructor Documentation

◆ BatchRender()

BatchRender ( )
private

◆ ~BatchRender()

~BatchRender ( )
private

Member Function Documentation

◆ Open()

Bool Open ( )

Opens the Render Queue window.

Returns
true if successful, otherwise false.

◆ AddFile()

Bool AddFile ( const Filename File,
Int32  number 
)

Adds a Cinema 4D file to the Render Queue.

Parameters
[in]FileThe filename of the Cinema 4D file.
[in]numberThe position within the Render Queue. If this is greater than the current number of entries it will be added at the end of the list.
Returns
true if successful, otherwise false.

◆ DelFile()

Bool DelFile ( const Filename File)

Removes a Cinema 4D file from the Render Queue.

Parameters
[in]FileThe Cinema 4D file to be removed from the list.
Returns
true if successful, otherwise false.

◆ IsRendering()

Bool IsRendering ( )

Checks if the render Queue is rendering.

Returns
true if the render Queue is rendering, otherwise false.

◆ SetRendering()

void SetRendering ( Int32  set)

Sets the render status of the Render Queue.

Parameters
[in]setThe render status: BR_RENDER

◆ SetNetError() [1/2]

Bool SetNetError ( Int32  n,
const String machineName,
const String errorString,
Bool  isWarning 
)

Private.

◆ SetNetError() [2/2]

Bool SetNetError ( const C4DUuid uuid,
const String machineName,
const String errorString,
Bool  isWarning 
)

Private.

◆ GetElementCount()

Int32 GetElementCount ( )

Retrieves the number of Cinema 4D scene files in the Render Queue.

Returns
The number of Cinema 4D scene files.

◆ GetElement()

Filename GetElement ( Int32  n)

Retrieves the filename of the Cinema 4D scene file with the index n.

Parameters
[in]nThe position within the Render Queue: 0 < n < GetElementCount()
Returns
The filename of the Cinema 4D scene file.

◆ EnableElement()

void EnableElement ( Int32  n,
Bool  bSet 
)

Enables or disables the Cinema 4D scene file at the index n for rendering.

Parameters
[in]nThe position within the Render Queue: 0 < n < GetElementCount()
[in]bSettrue to enable the scene file for rendering, false to disable it.

◆ GetEnableElement()

Bool GetEnableElement ( Int32  n)

Checks if a Cinema 4D scene file from the Render Queue is enabled for rendering.

Parameters
[in]nThe position within the Render Queue: 0 < n < GetElementCount()
Returns
true if the scene file is enabled for rendering, otherwise false.

◆ GetElementStatus()

Int32 GetElementStatus ( Int32  n)

Retrieves the current status of the Cinema 4D scene file at the index n.

Parameters
[in]nThe position within the Render Queue: 0 < n < GetElementCount()
Returns
The status: RM_RENDER

◆ GetJsonJobs()

void GetJsonJobs ( PyList *  list)

Private.

◆ GetFrameBitmap()

BaseBitmap* GetFrameBitmap ( const C4DUuid nodeUuid,
const C4DUuid frameUuid 
)

Private.

◆ SetUseNet()

void SetUseNet ( Int32  n,
Bool  on 
)

Private.

◆ GetTextureError()

Bool GetTextureError ( )

Checks if there is a texture error.

Returns
true if there is a texture error, otherwise false.

◆ SetTextureError()

void SetTextureError ( Bool  state)

Sets the texture error state.

Parameters
[in]statetrue to set a texture error, false to clear it.

◆ GetCheckTexture()

Bool GetCheckTexture ( )

Checks if texture checking is enabled.

Returns
true if texture checking is enabled, otherwise false.

◆ SetCheckTexture()

void SetCheckTexture ( Bool  state)

Enables or disables texture checking.

Parameters
[in]statetrue to enable texture checking, false to disable it.

◆ GetTakeCount()

Int32 GetTakeCount ( Int32  n)

Retrieves the number of takes for the Cinema 4D scene file at the index n.

Parameters
[in]nThe position within the Render Queue: 0 < n < GetElementCount()
Returns
The number of takes.

◆ GetAllTakeNames()

void GetAllTakeNames ( Int32  n,
maxon::BaseArray< String > &  names 
)

Retrieves the names of all takes for the Cinema 4D scene file at the index n.

Parameters
[in]nThe position within the Render Queue: 0 < n < GetElementCount()
[out]namesAn array to store the names of all takes. Indexes can be used directly with SetActiveTakeIndex.

◆ GetActiveTakeIndex()

Int32 GetActiveTakeIndex ( Int32  n)

Retrieves the active take index for the Cinema 4D scene file at the index n.

Parameters
[in]nThe position within the Render Queue: 0 < n < GetElementCount()
Returns
The active take index.

◆ GetActiveTakeName()

String GetActiveTakeName ( Int32  n)

Retrieves the active take name for the Cinema 4D scene file at the index n.

Parameters
[in]nThe position within the Render Queue: 0 < n < GetElementCount()
Returns
The active take name.

◆ SetActiveTakeIndex()

void SetActiveTakeIndex ( Int32  n,
Int32  index,
Bool  takeOnly 
)

Sets the active take index for the Cinema 4D scene file at the index n.

Parameters
[in]nThe position within the Render Queue: 0 < n < GetElementCount()
[in]indexThe index of the take to set as active.
[in]takeOnlytrue to set only the take, false to also set the take and camera and render settings.

◆ GetRenderSettingsCount()

Int32 GetRenderSettingsCount ( Int32  n)

Retrieves the number of render settings for the Cinema 4D scene file at the index n.

Parameters
[in]nThe position within the Render Queue: 0 < n < GetElementCount()
Returns
The number of render settings.

◆ GetAllRenderSettingsNames()

void GetAllRenderSettingsNames ( Int32  n,
maxon::BaseArray< String > &  names 
)

Retrieves the names of all render settings for the Cinema 4D scene file at the index n.

Parameters
[in]nThe position within the Render Queue: 0 < n < GetElementCount()
[out]namesAn array to store the names of all render settings. Indexes can be used directly with SetActiveRenderSettingsIndex.

◆ GetActiveRenderSettingsIndex()

Int32 GetActiveRenderSettingsIndex ( Int32  n)

Retrieves the active render settings index for the Cinema 4D scene file at the index n.

Parameters
[in]nThe position within the Render Queue: 0 < n < GetElementCount()
Returns
The active render settings index.

◆ GetActiveRenderSettingsName()

String GetActiveRenderSettingsName ( Int32  n)

Retrieves the active render settings name for the Cinema 4D scene file at the index n.

Parameters
[in]nThe position within the Render Queue: 0 < n < GetElementCount()
Returns
The active render settings name.

◆ SetActiveRenderSettingsIndex()

void SetActiveRenderSettingsIndex ( Int32  n,
Int32  index 
)

Sets the active render settings index for the Cinema 4D scene file at the index n.

Parameters
[in]nThe position within the Render Queue: 0 < n < GetElementCount()
[in]indexThe index of the render settings to set as active.

◆ GetAllCameraNames()

void GetAllCameraNames ( Int32  n,
maxon::BaseArray< String > &  names 
)

Retrieves the names of all cameras for the Cinema 4D scene file at the index n.

Parameters
[in]nThe position within the Render Queue: 0 < n < GetElementCount()
[out]namesAn array to store the names of all cameras. Indexes can be used with SetActiveCameraIndex by adding 1.

◆ GetCameraCount()

Int32 GetCameraCount ( Int32  n)

Retrieves the number of cameras for the Cinema 4D scene file at the index n.

Parameters
[in]nThe position within the Render Queue: 0 < n < GetElementCount()
Returns
The number of cameras.

◆ GetActiveCameraIndex()

Int32 GetActiveCameraIndex ( Int32  n)

Retrieves the active camera index for the Cinema 4D scene file at the index n.

Parameters
[in]nThe position within the Render Queue: 0 < n < GetElementCount()
Returns
The active camera index.

◆ GetActiveCameraName()

String GetActiveCameraName ( Int32  n,
Bool  filename 
)

Retrieves the active camera name for the Cinema 4D scene file at the index n.

Parameters
[in]nThe position within the Render Queue: 0 < n < GetElementCount()
[in]filenametrue to retrieve the filename, false to retrieve the camera name.
Returns
The active camera name.

◆ SetActiveCameraIndex()

void SetActiveCameraIndex ( Int32  n,
Int32  index 
)

Sets the active camera index for the Cinema 4D scene file at the index n.

Parameters
[in]nThe position within the Render Queue: 0 < n < GetElementCount()
[in]indexThe index of the camera to set as active.