pohlke.operators#
Defines camera operators and scene handlers for the Parallel Cameras add-on.
Classes#
Operator responsible for creating a parallel projection camera. |
|
Switch Alpha and Beta angle values |
Functions#
|
Automatically update pixel ratio when the scene updates. |
|
Register operator and handlers to Blender. |
|
Unregister operator and handlers from Blender. |
Module Contents#
- class pohlke.operators.Pohlke_OT_CreateCam[source]#
Bases:
bpy.types.OperatorOperator responsible for creating a parallel projection camera.
Attributes#
- projection_typeenum
Main projection category:
‘AXONOMETRIC’ : Axonometric projections.
‘OBLIQUE’ : Oblique projections.
- axonometric_typeenum
Sub-preset for axonometric cameras.
Available values are dynamically generated from the projection definitions declared in presets.toml and loaded via data.py. They are no longer hardcoded.
Each preset follows the naming pattern:
‘AXONOMETRIC_#<n>’
where <n> is the index of the preset as defined in presets.toml.
A ‘CUSTOM’ entry is automatically added when the current projection parameters do not match any predefined preset.
- oblique_typeenum
Sub-preset for oblique cameras.
Available values are dynamically generated from the projection definitions declared in presets.toml and loaded via data.py. They are no longer hardcoded.
Each preset follows the naming pattern:
‘OBLIQUE_#<n>’
where <n> is the index of the preset as defined in presets.toml.
A ‘CUSTOM’ entry is automatically added when the current projection parameters do not match any predefined preset.
- betafloat
The beta angle of the plan (in radians)
- alphafloat
The alpha angle of the plan (in radians)
- is_updatingbool
Internal flag to prevent infinite update loops during property sync.
- rotationfloat
Computed rotation around the vertical axis, derived from alpha and beta.
- altitudefloat
Computed altitude angle, derived from alpha and beta.
- altitude_obliquefloat
Complementary angle used specifically for oblique projections.
- x_valuefloat
Scaling factor for the X axis (0.0 to 1.0).
- normalized_x_valuefloat
Nomalized scaling factor for the X axis (0.0 to 1.0).
- y_valuefloat
Scaling factor for the Y axis (0.0 to 1.0).
- normalized_y_valuefloat
Nomalized scaling factor for the Y axis (0.0 to 1.0).
- z_valuefloat
Scaling factor for the Z axis (0.0 to 1.0).
- normalized_z_valuefloat
Nomalized scaling factor for the Z axis (0.0 to 1.0).
- positionenum
Vertical placement of the camera relative to the scene:
‘ABOVE’ : Standard view from top-down.
‘BELOW’ : View from bottom-up.
- orientationenum
The quadrant orientation (1 to 4) toward which the camera is facing.
- ortho_scalefloat
The camera’s orthographic scale.
- draw(context: bpy.types.Context) None[source]#
Draw the operator UI inside Blender popups or menus.
Parameters#
- contextbpy.types.Context
Blender context
- check(context: bpy.types.Context) None[source]#
Check if beta, alpha or isOblique values changed to update the camera settings
Parameters#
- contextbpy.types.Context
Blender context
- class pohlke.operators.Pohlke_OT_switch_angles[source]#
Bases:
bpy.types.OperatorSwitch Alpha and Beta angle values
- pohlke.operators.set_pixel_ratio(scene: bpy.types.Scene) None[source]#
Automatically update pixel ratio when the scene updates.
Ensures that orthographic distortion remains consistent when switching cameras or updating the dependency graph.
Parameters#
- scenebpy.types.Scene
Current Blender scene