c4d.plugins.GeResource

class c4d.plugins.GeResource

This class is used for accessing resource files on the hard drive, for example to load dialog resources or to access string tables.

Methods Signatures

GeResource.__init__(self)

Creates a new resource object.

GeResource.Init(self, path)

Initializes the resources from their files in the ‘res’ folder.

GeResource.InitAsGlobal(self)

Lets access the Cinema 4D main application string resource.

GeResource.LoadString(self, id)

Loads a string from the string resource file.

Methods Documentation

GeResource.__init__(self)

Creates a new resource object.

Return type

c4d.plugins.GeResource

Returns

The new resource object.

GeResource.Init(self, path)

Initializes the resources from their files in the ‘res’ folder.

Parameters

path (str) – The root directory of the plugin’s folder to find the ‘res’ folder.

Return type

bool

Returns

True if successful, otherwise False.

GeResource.InitAsGlobal(self)

Lets access the Cinema 4D main application string resource.

Return type

bool

Returns

True if successful, otherwise False.

GeResource.LoadString(self, id)

Loads a string from the string resource file.

See also

GeLoadString()

Parameters

id (int) – The ID for the string in the resource file.

Return type

str

Returns

The string from the resource file for the passed id.