ビューポート/シェーディング/オーバーレイの操作
ドキュメント:
View3DShading | Blender Python API [Official]
View3DOverlay | Blender Python API [Official]
bpy.types.SpaceView3D.shading | Blender Python API [Official]
bpy.types.SpaceView3D.overlay | Blender Python API [Official]
参考:
「Lock Camera to View」を1発で有効にする方法 | CGrad Project
Operator for toggling checkboxes | Interplanety
Assign shortcut to Lock Camera to View – Blender Stack Exchange
Toggle Overlays shortcut? – Blender Stack Exchange
ギズモ (Gizmos)
ドキュメント:
SpaceView3D | Blender Python API [Official]
コード:
VIEW3D_PT_gizmo_display – space_view3d.py at v3.0.1 – GitHub
参考:
How to toggle the new transform gizmos using python – Blender Developer Talk
サイドバーあるいはツールバーを開く
オペレータークラスの execute
メソッドから space_data.show_region_ui
に対して wm.context_toggle
関数を実行する。
class MYTOOLS_OT_open_panel(bpy.types.Operator):
# ...
def execute(self, context):
bpy.ops.wm.context_toggle(data_path="space_data.show_region_ui")
return {'FINISHED'}
Code language: Python (python)
参考:
How to toggle (Open / Close) T or N Panel using Python – Blender Stack Exchange
Only Render
「Only Render」は 2.80 で廃止された。代わりに「Overlay」を非表示に切り替える。
アドオン
ドキュメント:
View3DOverlay.show_overlays | Blender Python API [Official]
参考:
How to add shortcut for ‘Only Render’? – Blender Stack Exchange
Changing settings of the 3D View with Python – Blender Stack Exchange
Where is the option ‘Display>Only Render” in the latest 2.8 builds? – Blender Stack Exchange
コンテキストアクセスで UI の設定を変更する
- context_collection_boolean_set
- context_cycle_array
- context_cycle_enum
- context_cycle_int
- context_menu_enum
- context_modal_mouse
- context_pie_enum
- context_scale_float
- context_scale_int
- context_set_boolean
- context_set_enum
- context_set_float
- context_set_id
- context_set_int
- context_set_string
- context_set_value
- context_toggle
- context_toggle_enum
ドキュメント:
WM Operators | Blender Python API [Official]
参考:
about wm.context_toggle confused – Blender Artists Community
ToolSettings
- annotation_stroke_placement_view2d
- annotation_stroke_placement_view3d
- annotation_thickness
- auto_keying_mode
- curve_paint_settings
- custom_bevel_profile_preset
- double_threshold
- gpencil_interpolate
- gpencil_paint
- gpencil_sculpt
- gpencil_sculpt_paint
- gpencil_selectmode_edit
- gpencil_stroke_placement_view3d
- gpencil_stroke_snap_mode
- gpencil_vertex_paint
- gpencil_weight_paint
- image_paint
- keyframe_type
- lock_markers
- lock_object_mode
- mesh_select_mode
- normal_vector
- particle_edit
- proportional_edit_falloff
- proportional_size
- sculpt
- sequencer_tool_settings
- show_uv_local_view
- snap_elements
- snap_node_element
- snap_target
- snap_uv_element
- statvis
- transform_pivot_point
- unified_paint_settings
- use_auto_normalize
- use_edge_path_live_unwrap
- use_gpencil_automerge_strokes
- use_gpencil_draw_additive
- use_gpencil_draw_onback
- use_gpencil_select_mask_point
- use_gpencil_select_mask_segment
- use_gpencil_select_mask_stroke
- use_gpencil_stroke_endpoints
- use_gpencil_thumbnail_list
- use_gpencil_vertex_select_mask_point
- use_gpencil_vertex_select_mask_segment
- use_gpencil_vertex_select_mask_stroke
- use_gpencil_weight_data_add
- use_keyframe_cycle_aware
- use_keyframe_insert_auto
- use_keyframe_insert_keyingset
- use_lock_relative
- use_mesh_automerge
- use_mesh_automerge_and_split
- use_multipaint
- use_proportional_action
- use_proportional_connected
- use_proportional_edit
- use_proportional_edit_mask
- use_proportional_edit_objects
- use_proportional_fcurve
- use_proportional_projected
- use_record_with_nla
- use_snap
- use_snap_align_rotation
- use_snap_backface_culling
- use_snap_grid_absolute
- use_snap_peel_object
- use_snap_project
- use_snap_rotate
- use_snap_scale
- use_snap_self
- use_snap_sequencer
- use_snap_translate
- use_snap_uv_grid_absolute
- use_transform_correct_face_attributes
- use_transform_correct_keep_connected
- use_transform_data_origin
- use_transform_pivot_point_align
- use_transform_skip_children
- use_uv_select_sync
- uv_relax_method
- uv_sculpt
- uv_sculpt_all_islands
- uv_sculpt_lock_borders
- uv_select_mode
- vertex_group_subset
- vertex_group_user
- vertex_group_weight
- vertex_paint
- weight_paint
- workspace_tool_type
ドキュメント:
ToolSettings | Blender Python API [Official]
ツール設定
詳細
- CurvePaintSettings
- CurveProfile
- GPencilInterpolateSettings
- GPencilSculptSettings
- GpPaint
- GpSculptPaint
- GpVertexPaint
- GpWeightPaint
- ImagePaint
- MeshStatVis
- Paint
- ParticleEdit
- Sculpt
- SequencerToolSettings
- UnifiedPaintSettings
- UvSculpt
- VertexPaint
ドキュメント:
ToolSettings | Blender Python API [Official]