Viewprovider

Introduction
Viewproviders are classes that define the way objects will look like in the tree view and the 3D view, and how they will interact with certain graphical actions such as selection.

They complement the scripted objects. While the base class of the scripted object defines its properties, the viewprovider defines it  properties. These view properties are not essential information of the object, as they only indicate superficial information like line width, line color, face color, etc. In a terminal only session, the viewprovider is not loaded because there will be no interface to manipulate those visible properties.

Python view providers
The viewproviders classes usually include in their name. They are assigned on the attribute of the base object.

The viewprovider can only be assigned when we have verified that the graphical interface is available, as otherwise the attribute doesn't exist, and it will be an error to use this element as input for our class.