在blender的3D视图中,按下O键打开比例编辑工具。如果比例编辑面板仍然丢失,请按下N键打开属性编辑器,并确保在工具选项卡中启用了“显示比例编辑”选项。例如:
import bpy
# Enable proportional editing in the tool options tab of the active editor
bpy.context.space_data.show_region_toolbar = True
bpy.context.space_data.overlay.show_relationship_lines = True
bpy.context.scene.tool_settings.use_proportional_edit = True
# If using the 3D viewport, activate proportional editing by pressing O
bpy.ops.wm.context_set_enum(data_path="tool_settings.proportional_edit", value='ENABLED')