2. Interfaces#

On this part, we explain the interface of Pohlke

layout

Our layout is composed of three main interfaces:

A set of functions can also be accessed from the text editor & Python console.

2.1. Configuration Panel#

configuration_panel

2.1.1. Description#

This panel is the first visible element that appears when using the add-on: it allows you to configure and create a camera.

2.1.2. Composition#

2.1.3. Details#

Component

Description

Pohlke_PT_projectionspanel

Class of type bpy.types.Panel defining the user interface panel displayed in Blender.

Pohlke_PT_CameraProperties

Class of type bpy.types.PropertyGroup defining the properties used to configure the camera. This class contains all the parameters used during camera creation.

Pohlke_OT_CreateCam.execute()

Operator of type bpy.types.Operator executed when the user presses the camera creation button. The properties defined by the user are passed to the operator, which runs its Pohlke_OT_CreateCam.execute() function to create the camera.

2.2. Post-Creation Adjustment Menu#

configuration_menu

2.2.1. Description#

This menu appears in the bottom-left corner of the screen once the camera has been created. It allows you to continue modifying the camera’s configuration parameters immediately after creation, with a real-time preview of the changes.

2.2.2. Composition#

2.2.3. Details#

Component

Description

Pohlke_OT_CreateCam

Custom bpy.types.Operator defining the camera creation logic and its user interface through the draw() function. Each time a parameter is modified, the operator re-executes its execute() function, recreating the camera with the updated configuration.

2.3. Quick Camera Creation#

shift_a_menu

2.3.1. Description#

This feature allows you to create a Pohlke camera directly from Blender’s creation menu, accessible via the shift + a keyboard shortcut.

2.3.2. Composition#

2.3.3. Details#

Component

Description

bpy.types.VIEW3D_MT_camera_add

Camera entry in Blender’s quick creation menu.

Pohlke_OT_CreateCam.execute()

Operator of type bpy.types.Operator executed when the user presses the camera creation button. The button is added to the menu via the add_menu_func() function. The operator runs execute() with the presets of an isometric camera.

2.4. Text Editor & Python Console#

2.4.1. Description#

The scripting interface provides a way to use the add-on in Python scripts within Blender. Check out the pohlke.scripting.Scriber object in the API documentation to have an overview of the available functionalities.

The interface is instantiated inside pohlke.register() with bpy.pohlke = scripting.Scriber() when the add-on is enabled in the preference menu. The user can then simply make use of bpy.pohlke in their scripts.

2.4.2. Composition#

2.4.3. Details#

Component

Description

Scriber

Object exposing a series of handy attributes and methods that can be used in scripts, amongst others: add_preset_camera(), add_axonometric_camera(), add_oblique_camera(). Scriber is instantiated when activating the add-on and exposed as bpy.pohlke.

Pohlke_OT_CreateCam.execute()

Wrapped in each add_* function and called with different parameters based on the chosen function.