nr.c4d.gui

Functions

nr.c4d.gui.handle_file_select(dialog, param, type=0, title='', flags=0, force_suffix='')[source]

Opens a file selection dialog for which the result will be filled into the parameter in the dialog identified with paramid. The Cinema 4D filename widget is a little buggy, and using this function is convenient if your dialog uses a string and button widget instead.

Parameters:
Returns:

True if the file selection was handled and the parameter set, False if not.

Rect Objects

class nr.c4d.gui.Rect(x1, y1, x2=None, y2=None, w=None, h=None)[source]

Represents an axis-aligned rectangle in two dimensional space represented as four integer numbers. For floating-point precision pixel-arithmetic, compute the components manually.

center()[source]
copy(**overrides)
get_height()[source]
get_normalized()[source]
get_width()[source]
h
height
set_height(h)[source]
set_width(w)[source]
tup(grow=0, relative=False)[source]
w
width

ExtendedUserArea Objects

class nr.c4d.gui.ExtendedUserArea[source]

The ExtendedUserArea provides a bunch of helper functions and pre-implemented overrides of the GeUserArea class to make it easier to implement custom user interfaces.

DragEvent(msg, dragtype, data, dropped)[source]
GenerateMouseDrag(msg, state=None, only_mouse_change=False)[source]
GetMouse(msg, drag=False)[source]
GetMouseLocal(msg, drag=False)[source]
InputEvent(msg)[source]
KeyboardEvent(msg, channel)[source]
Message(msg, result)[source]
MouseEvent(msg, channel)[source]
SendAction(bc=None)[source]

IconView Objects

class nr.c4d.gui.IconView(icon, alignh='center', alignv='center', width=None, height=None, bgcol=None, cursor=None)[source]

Bases: nr.c4d.gui.ExtendedUserArea

Simple User Area to present an icon. If the icon is clicked, it will send a c4d.gui.GeDialog.Command() event with the ID of the user area.

AlignBottom = 'bottom'
AlignCenter = 'center'
AlignLeft = 'left'
AlignRight = 'right'
AlignTop = 'top'
DrawMsg(x1, y1, x2, y2, msg)[source]
GetMinSize()[source]
Message(msg, result)[source]
MouseEvent(msg, channel)[source]
get_icon()[source]