Material Editor Widget

The Material Editor Widget is a control to add, remove, and modify materials.

Material editor widget.

Fig. 113 Material editor widget.

Material list

The material list displays all currently defined materials; it will always contain the default material if no other materials are defined. The two buttons at the top of the window allow you to create or delete materials.

Settings editor

Below the material list are controls that allow you to set some general properties of the selected material. Ambient Color, Diffuse Color, Emission Color, and Specular Color. You can also adjust the alpha and shininess of the material by entering a number between 0 and 1 or dragging the sliders.

Preview panel

This panel displays a sphere, shaded with the selected material.

API

class cmlibs.widgets.materialeditorwidget.MaterialEditorWidget(parent=None)
setMaterials(materials)

Sets the Argon materials object which supplies the zinc context and has utilities for managing materials.

Parameters:

materials – ArgonMaterials object

class cmlibs.widgets.materialeditorwidget.MaterialModel(parent=None)
removeData(index_list)

Only handling single selection, changes would be needed if multiple selection was enabled for any views.