nukescripts.applymaterial.ObjectNameChooserDialog

class nukescripts.applymaterial.ObjectNameChooserDialog(names)[source]

Bases: nukescripts.panels.PythonPanel

A dialog box with a SceneView_Knob for choosing from a tree of names.

The easiest way to use this is via the chooseObjectName function from this module, e.g.:

chooseObjectName([“/root/foo”, “/root/bar”, “/root/bar/baz”])

This will create and display the dialog as a modal popup and give you the selected name, or None if cancel was pressed.

Methods

accept

add

Add a child widget.

addCallback

addKnob

addToPane

cancel

close

Called when the widget is asked to be closed.

create

destroy

Destroy the widget.

finishModalDialog

height

Get the height.

hide

Hide the widget.

isEnabled

Return the enabled state.

isValid

Returns true if the widget still exists.

knobChanged

knobChangedCallback

knobs

ok

readKnobs

reject

removeCallback

removeKnob

selectedName

Get the name selected in the SceneView_Knob.

setEnabled

Enable or disable the widget.

setMaximumSize

Set the maximum size.

setMinimumSize

Set the minimum size.

setTooltip

Set the tooltip.

setVisible

Show or hide the widget.

show

Show the widget.

showModal

Show the dialog as modal, and wait for it to be dismissed.

showModalDialog

tooltip

Get the tooltip.

width

Get the width.

writeKnobs

add()

Add a child widget.

close()

Called when the widget is asked to be closed.

destroy()

Destroy the widget.

height()

Get the height.

hide()

Hide the widget.

isEnabled()

Return the enabled state.

isValid()

Returns true if the widget still exists. i.e. has not been closed by the user.

selectedName()[source]

Get the name selected in the SceneView_Knob.

setEnabled()

Enable or disable the widget.

setMaximumSize()

Set the maximum size.

setMinimumSize()

Set the minimum size.

setTooltip()

Set the tooltip.

setVisible()

Show or hide the widget.

show()

Show the widget.

showModal(defaultKnobText='')

Show the dialog as modal, and wait for it to be dismissed.

tooltip()

Get the tooltip.

width()

Get the width.