nukescripts.renderdialog.DialogState

class nukescripts.renderdialog.DialogState[source]

Bases: object

Methods

get

Return the given knob's stored last state value.

getValue

Recalls the value.

save

Store the knob's current value as the 'last state' for the next time the dialog is opened.

saveValue

Stores the value with the given id.

setKnob

Convenience method for setting a value straight on a knob.

get(knob, defaultValue=None)[source]

Return the given knob’s stored last state value. If none exists, defaultValue is returned. Values are stored in a dict referenced by knob name, so names must be unique!

getValue(id, defaultValue=None)[source]

Recalls the value. If it was not set before, it will return the defaultValue.

save(knob)[source]

Store the knob’s current value as the ‘last state’ for the next time the dialog is opened. Values are stored in a dict referenced by knob name, so names must be unique!

saveValue(id, value)[source]

Stores the value with the given id.

setKnob(knob, defaultValue=None)[source]

Convenience method for setting a value straight on a knob.