1 # SPDX-License-Identifier: GPL-2.0-or-later
4 from bpy
.types
import Panel
6 from .operators
import get_rig_and_cam
8 class ADD_CAMERA_RIGS_PT_composition_guides(Panel
):
9 bl_label
= "Composition Guides"
10 bl_space_type
= 'VIEW_3D'
11 bl_region_type
= 'HEADER'
13 def draw(self
, context
):
16 rig
, cam
= get_rig_and_cam(context
.active_object
)
19 layout
.prop(cam
, "show_safe_areas")
20 layout
.row().separator()
21 layout
.prop(cam
, "show_composition_center")
22 layout
.prop(cam
, "show_composition_center_diagonal")
23 layout
.prop(cam
, "show_composition_golden")
24 layout
.prop(cam
, "show_composition_golden_tria_a")
25 layout
.prop(cam
, "show_composition_golden_tria_b")
26 layout
.prop(cam
, "show_composition_harmony_tri_a")
27 layout
.prop(cam
, "show_composition_harmony_tri_b")
28 layout
.prop(cam
, "show_composition_thirds")
32 bpy
.utils
.register_class(ADD_CAMERA_RIGS_PT_composition_guides
)
36 bpy
.utils
.unregister_class(ADD_CAMERA_RIGS_PT_composition_guides
)
39 if __name__
== "__main__":