Cleanup: add trailing commas for multi-line collections
Avoid accidentally missing commas between strings, see: T101020. Also use single quotes for enum identifiers.
This commit is contained in:
parent
657a5f205a
commit
7571222a69
|
@ -92,7 +92,7 @@ class AddPresetPerformance(AddPresetBase, Operator):
|
|||
|
||||
preset_defines = [
|
||||
"render = bpy.context.scene.render",
|
||||
"cycles = bpy.context.scene.cycles"
|
||||
"cycles = bpy.context.scene.cycles",
|
||||
]
|
||||
|
||||
preset_values = [
|
||||
|
|
|
@ -159,7 +159,7 @@ def bake_action_iter(
|
|||
"bbone_curveinz", "bbone_curveoutz",
|
||||
"bbone_rollin", "bbone_rollout",
|
||||
"bbone_scalein", "bbone_scaleout",
|
||||
"bbone_easein", "bbone_easeout"
|
||||
"bbone_easein", "bbone_easeout",
|
||||
]
|
||||
BBONE_PROPS_LENGTHS = {
|
||||
"bbone_curveinx": 1,
|
||||
|
|
|
@ -12,7 +12,7 @@ __all__ = (
|
|||
"path_reference",
|
||||
"path_reference_copy",
|
||||
"path_reference_mode",
|
||||
"unique_name"
|
||||
"unique_name",
|
||||
)
|
||||
|
||||
import bpy
|
||||
|
|
|
@ -1028,7 +1028,7 @@ class CLIP_OT_track_settings_to_track(Operator):
|
|||
"use_red_channel",
|
||||
"use_green_channel",
|
||||
"use_blue_channel",
|
||||
"weight"
|
||||
"weight",
|
||||
)
|
||||
|
||||
_attrs_marker = (
|
||||
|
|
|
@ -776,7 +776,7 @@ class TransformsToDeltasAnim(Operator):
|
|||
"rotation_euler": "delta_rotation_euler",
|
||||
"rotation_quaternion": "delta_rotation_quaternion",
|
||||
# "rotation_axis_angle" : "delta_rotation_axis_angle",
|
||||
"scale": "delta_scale"
|
||||
"scale": "delta_scale",
|
||||
}
|
||||
DELTA_PATHS = STANDARD_TO_DELTA_PATHS.values()
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ class QuickFur(ObjectModeOperator, Operator):
|
|||
items=(
|
||||
('LIGHT', "Light", ""),
|
||||
('MEDIUM', "Medium", ""),
|
||||
('HEAVY', "Heavy", "")
|
||||
('HEAVY', "Heavy", ""),
|
||||
),
|
||||
default='MEDIUM',
|
||||
)
|
||||
|
|
|
@ -20,7 +20,7 @@ from bpy.app.translations import (
|
|||
WindowManager.preset_name = StringProperty(
|
||||
name="Preset Name",
|
||||
description="Name for new preset",
|
||||
default=data_("New Preset")
|
||||
default=data_("New Preset"),
|
||||
)
|
||||
|
||||
|
||||
|
@ -309,7 +309,7 @@ class AddPresetCamera(AddPresetBase, Operator):
|
|||
preset_values = [
|
||||
"cam.sensor_width",
|
||||
"cam.sensor_height",
|
||||
"cam.sensor_fit"
|
||||
"cam.sensor_fit",
|
||||
]
|
||||
if self.use_focal_length:
|
||||
preset_values.append("cam.lens")
|
||||
|
@ -439,7 +439,7 @@ class AddPresetTrackingCamera(AddPresetBase, Operator):
|
|||
"camera.pixel_aspect",
|
||||
"camera.k1",
|
||||
"camera.k2",
|
||||
"camera.k3"
|
||||
"camera.k3",
|
||||
]
|
||||
if self.use_focal_length:
|
||||
preset_values.append("camera.units")
|
||||
|
@ -459,7 +459,7 @@ class AddPresetTrackingTrackColor(AddPresetBase, Operator):
|
|||
|
||||
preset_values = [
|
||||
"track.color",
|
||||
"track.use_custom_color"
|
||||
"track.use_custom_color",
|
||||
]
|
||||
|
||||
preset_subdir = "tracking_track_color"
|
||||
|
@ -489,7 +489,7 @@ class AddPresetTrackingSettings(AddPresetBase, Operator):
|
|||
"settings.use_default_red_channel",
|
||||
"settings.use_default_green_channel",
|
||||
"settings.use_default_blue_channel",
|
||||
"settings.default_weight"
|
||||
"settings.default_weight",
|
||||
]
|
||||
|
||||
preset_subdir = "tracking_settings"
|
||||
|
@ -507,7 +507,7 @@ class AddPresetNodeColor(AddPresetBase, Operator):
|
|||
|
||||
preset_values = [
|
||||
"node.color",
|
||||
"node.use_custom_color"
|
||||
"node.use_custom_color",
|
||||
]
|
||||
|
||||
preset_subdir = "node_color"
|
||||
|
@ -616,7 +616,7 @@ class AddPresetGpencilBrush(AddPresetBase, Operator):
|
|||
|
||||
preset_defines = [
|
||||
"brush = bpy.context.tool_settings.gpencil_paint.brush",
|
||||
"settings = brush.gpencil_settings"
|
||||
"settings = brush.gpencil_settings",
|
||||
]
|
||||
|
||||
preset_values = [
|
||||
|
@ -650,7 +650,7 @@ class AddPresetGpencilMaterial(AddPresetBase, Operator):
|
|||
|
||||
preset_defines = [
|
||||
"material = bpy.context.object.active_material",
|
||||
"gpcolor = material.grease_pencil"
|
||||
"gpcolor = material.grease_pencil",
|
||||
]
|
||||
|
||||
preset_values = [
|
||||
|
|
|
@ -133,7 +133,7 @@ class PlayRenderedAnim(Operator):
|
|||
"-speed", str(fps_final),
|
||||
"-in_out", str(frame_start), str(frame_end),
|
||||
"-frame", str(scene.frame_current),
|
||||
"-time_units", "Frames"
|
||||
"-time_units", "Frames",
|
||||
]
|
||||
cmd.extend(opts)
|
||||
elif preset == 'FRAMECYCLER':
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import bpy
|
||||
from bpy.types import (
|
||||
Operator,
|
||||
OperatorFileListElement
|
||||
OperatorFileListElement,
|
||||
)
|
||||
from bpy.props import (
|
||||
BoolProperty,
|
||||
|
@ -981,7 +981,7 @@ class PREFERENCES_OT_studiolight_install(Operator):
|
|||
('MATCAP', "MatCap", "Install custom MatCaps"),
|
||||
('WORLD', "World", "Install custom HDRIs"),
|
||||
('STUDIO', "Studio", "Install custom Studio Lights"),
|
||||
)
|
||||
),
|
||||
)
|
||||
|
||||
def execute(self, context):
|
||||
|
|
|
@ -32,7 +32,7 @@ class VIEW3D_OT_edit_mesh_extrude_individual_move(Operator):
|
|||
TRANSFORM_OT_translate={
|
||||
"orient_type": 'NORMAL',
|
||||
"constraint_axis": (False, False, True),
|
||||
}
|
||||
},
|
||||
)
|
||||
elif select_mode[2] and totface > 1:
|
||||
bpy.ops.mesh.extrude_faces_move('INVOKE_REGION_WIN')
|
||||
|
@ -57,7 +57,7 @@ class VIEW3D_OT_edit_mesh_extrude_move(Operator):
|
|||
dissolve_and_intersect: BoolProperty(
|
||||
name="dissolve_and_intersect",
|
||||
default=False,
|
||||
description="Dissolves adjacent faces and intersects new geometry"
|
||||
description="Dissolves adjacent faces and intersects new geometry",
|
||||
)
|
||||
|
||||
@classmethod
|
||||
|
|
|
@ -1377,7 +1377,8 @@ class WM_OT_properties_edit(Operator):
|
|||
name="Array Length",
|
||||
default=3,
|
||||
min=1,
|
||||
max=32, # 32 is the maximum size for RNA array properties.
|
||||
# 32 is the maximum size for RNA array properties.
|
||||
max=32,
|
||||
)
|
||||
|
||||
# Integer properties.
|
||||
|
@ -1458,7 +1459,7 @@ class WM_OT_properties_edit(Operator):
|
|||
# Store the value converted to a string as a fallback for otherwise unsupported types.
|
||||
eval_string: StringProperty(
|
||||
name="Value",
|
||||
description="Python value for unsupported custom property types"
|
||||
description="Python value for unsupported custom property types",
|
||||
)
|
||||
|
||||
type_items = rna_custom_property_type_items
|
||||
|
@ -1904,7 +1905,7 @@ class WM_OT_properties_edit_value(Operator):
|
|||
# Store the value converted to a string as a fallback for otherwise unsupported types.
|
||||
eval_string: StringProperty(
|
||||
name="Value",
|
||||
description="Value for custom property types that can only be edited as a Python expression"
|
||||
description="Value for custom property types that can only be edited as a Python expression",
|
||||
)
|
||||
|
||||
def execute(self, context):
|
||||
|
@ -2470,11 +2471,11 @@ class BatchRenameAction(bpy.types.PropertyGroup):
|
|||
replace_match_case: BoolProperty(name="Case Sensitive")
|
||||
use_replace_regex_src: BoolProperty(
|
||||
name="Regular Expression Find",
|
||||
description="Use regular expressions to match text in the 'Find' field"
|
||||
description="Use regular expressions to match text in the 'Find' field",
|
||||
)
|
||||
use_replace_regex_dst: BoolProperty(
|
||||
name="Regular Expression Replace",
|
||||
description="Use regular expression for the replacement text (supporting groups)"
|
||||
description="Use regular expression for the replacement text (supporting groups)",
|
||||
)
|
||||
|
||||
# type: 'CASE'.
|
||||
|
|
|
@ -210,12 +210,12 @@ class GPENCIL_MT_snap_pie(Menu):
|
|||
pie.operator(
|
||||
"gpencil.snap_to_cursor",
|
||||
text="Selection to Cursor",
|
||||
icon='RESTRICT_SELECT_OFF'
|
||||
icon='RESTRICT_SELECT_OFF',
|
||||
).use_offset = False
|
||||
pie.operator(
|
||||
"gpencil.snap_to_cursor",
|
||||
text="Selection to Cursor (Keep Offset)",
|
||||
icon='RESTRICT_SELECT_OFF'
|
||||
icon='RESTRICT_SELECT_OFF',
|
||||
).use_offset = True
|
||||
pie.separator()
|
||||
pie.operator("view3d.snap_cursor_to_center", text="Cursor to World Origin", icon='CURSOR')
|
||||
|
|
|
@ -386,7 +386,7 @@ class RENDER_PT_encoding_video(RenderOutputButtonsPanel, Panel):
|
|||
'MKV',
|
||||
'OGG',
|
||||
'MPEG4',
|
||||
'WEBM'
|
||||
'WEBM',
|
||||
}
|
||||
if needs_codec:
|
||||
layout.prop(ffmpeg, "codec")
|
||||
|
@ -402,7 +402,7 @@ class RENDER_PT_encoding_video(RenderOutputButtonsPanel, Panel):
|
|||
'H264',
|
||||
'MPEG4',
|
||||
'WEBM',
|
||||
'AV1'
|
||||
'AV1',
|
||||
}
|
||||
if use_crf:
|
||||
layout.prop(ffmpeg, "constant_rate_factor")
|
||||
|
|
|
@ -1196,7 +1196,7 @@ def brush_basic_texpaint_settings(layout, context, brush, *, compact=False):
|
|||
unified_name="use_unified_size",
|
||||
slider=True,
|
||||
text="Radius",
|
||||
header=True
|
||||
header=True,
|
||||
)
|
||||
UnifiedPaintPanel.prop_unified(
|
||||
layout,
|
||||
|
@ -1205,7 +1205,7 @@ def brush_basic_texpaint_settings(layout, context, brush, *, compact=False):
|
|||
"strength",
|
||||
pressure_name="use_pressure_strength",
|
||||
unified_name="use_unified_strength",
|
||||
header=True
|
||||
header=True,
|
||||
)
|
||||
|
||||
|
||||
|
@ -1345,7 +1345,7 @@ def brush_basic_gpencil_paint_settings(layout, context, brush, *, compact=False)
|
|||
"builtin.line",
|
||||
"builtin.box",
|
||||
"builtin.circle",
|
||||
"builtin.polyline"
|
||||
"builtin.polyline",
|
||||
}:
|
||||
settings = context.tool_settings.gpencil_sculpt
|
||||
if compact:
|
||||
|
|
|
@ -422,7 +422,7 @@ class PHYSICS_PT_cloth_property_weights(PhysicButtonsPanel, Panel):
|
|||
col = flow.column()
|
||||
col.prop_search(
|
||||
cloth, "vertex_group_bending", ob, "vertex_groups",
|
||||
text="Bending Group"
|
||||
text="Bending Group",
|
||||
)
|
||||
col.prop(cloth, "bending_stiffness_max", text="Max Bending")
|
||||
|
||||
|
@ -431,7 +431,7 @@ class PHYSICS_PT_cloth_property_weights(PhysicButtonsPanel, Panel):
|
|||
col = flow.column()
|
||||
col.prop_search(
|
||||
cloth, "vertex_group_shrink", ob, "vertex_groups",
|
||||
text="Shrinking Group"
|
||||
text="Shrinking Group",
|
||||
)
|
||||
col.prop(cloth, "shrink_max", text="Max Shrinking")
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ class PHYSICS_PT_add(PhysicButtonsPanel, Panel):
|
|||
col, obj.rigid_body, "Rigid Body",
|
||||
"rigidbody.object_add",
|
||||
"rigidbody.object_remove",
|
||||
'RIGID_BODY'
|
||||
'RIGID_BODY',
|
||||
)
|
||||
|
||||
# all types of objects can have rigid body constraint.
|
||||
|
@ -94,7 +94,7 @@ class PHYSICS_PT_add(PhysicButtonsPanel, Panel):
|
|||
col, obj.rigid_body_constraint, "Rigid Body Constraint",
|
||||
"rigidbody.constraint_add",
|
||||
"rigidbody.constraint_remove",
|
||||
'RIGID_BODY_CONSTRAINT'
|
||||
'RIGID_BODY_CONSTRAINT',
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -1166,7 +1166,7 @@ from bl_ui.properties_mask_common import (
|
|||
MASK_PT_point,
|
||||
MASK_PT_display,
|
||||
MASK_PT_transforms,
|
||||
MASK_PT_tools
|
||||
MASK_PT_tools,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -41,14 +41,14 @@ class FILEBROWSER_HT_header(Header):
|
|||
layout.popover(
|
||||
panel="ASSETBROWSER_PT_filter",
|
||||
text="",
|
||||
icon='FILTER'
|
||||
icon='FILTER',
|
||||
)
|
||||
|
||||
layout.operator(
|
||||
"screen.region_toggle",
|
||||
text="",
|
||||
icon='PREFERENCES',
|
||||
depress=is_option_region_visible(context, space_data)
|
||||
depress=is_option_region_visible(context, space_data),
|
||||
).region_type = 'TOOL_PROPS'
|
||||
|
||||
def draw(self, context):
|
||||
|
@ -464,7 +464,7 @@ class FILEBROWSER_PT_directory_path(Panel):
|
|||
"screen.region_toggle",
|
||||
text="",
|
||||
icon='PREFERENCES',
|
||||
depress=is_option_region_visible(context, space)
|
||||
depress=is_option_region_visible(context, space),
|
||||
).region_type = 'TOOL_PROPS'
|
||||
|
||||
|
||||
|
|
|
@ -697,7 +697,7 @@ class _draw_tool_settings_context_mode:
|
|||
pressure_name="use_pressure_size",
|
||||
unified_name="use_unified_size",
|
||||
slider=True,
|
||||
header=True
|
||||
header=True,
|
||||
)
|
||||
UnifiedPaintPanel.prop_unified(
|
||||
layout,
|
||||
|
@ -707,7 +707,7 @@ class _draw_tool_settings_context_mode:
|
|||
pressure_name="use_pressure_strength",
|
||||
unified_name="use_unified_strength",
|
||||
slider=True,
|
||||
header=True
|
||||
header=True,
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
|
|
|
@ -14,7 +14,7 @@ from bl_ui.space_toolsystem_common import (
|
|||
)
|
||||
from bl_ui.properties_material import (
|
||||
EEVEE_MATERIAL_PT_settings,
|
||||
MATERIAL_PT_viewport
|
||||
MATERIAL_PT_viewport,
|
||||
)
|
||||
from bl_ui.properties_world import (
|
||||
WORLD_PT_viewport_display
|
||||
|
@ -496,18 +496,18 @@ class NODE_MT_context_menu(Menu):
|
|||
# If no nodes are selected.
|
||||
if selected_nodes_len == 0:
|
||||
layout.operator_context = 'INVOKE_DEFAULT'
|
||||
layout.menu("NODE_MT_add", icon="ADD")
|
||||
layout.operator("node.clipboard_paste", text="Paste", icon="PASTEDOWN")
|
||||
layout.menu("NODE_MT_add", icon='ADD')
|
||||
layout.operator("node.clipboard_paste", text="Paste", icon='PASTEDOWN')
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("node.find_node", text="Find...", icon="VIEWZOOM")
|
||||
layout.operator("node.find_node", text="Find...", icon='VIEWZOOM')
|
||||
|
||||
layout.separator()
|
||||
|
||||
if is_geometrynodes:
|
||||
layout.operator_context = 'INVOKE_DEFAULT'
|
||||
layout.operator("node.select", text="Clear Viewer", icon="HIDE_ON").clear_viewer = True
|
||||
layout.operator("node.select", text="Clear Viewer", icon='HIDE_ON').clear_viewer = True
|
||||
|
||||
layout.operator("node.links_cut")
|
||||
layout.operator("node.links_mute")
|
||||
|
@ -521,19 +521,19 @@ class NODE_MT_context_menu(Menu):
|
|||
|
||||
if is_geometrynodes:
|
||||
layout.operator_context = 'INVOKE_DEFAULT'
|
||||
layout.operator("node.link_viewer", text="Link to Viewer", icon="HIDE_OFF")
|
||||
layout.operator("node.link_viewer", text="Link to Viewer", icon='HIDE_OFF')
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("node.clipboard_copy", text="Copy", icon="COPYDOWN")
|
||||
layout.operator("node.clipboard_paste", text="Paste", icon="PASTEDOWN")
|
||||
layout.operator("node.clipboard_copy", text="Copy", icon='COPYDOWN')
|
||||
layout.operator("node.clipboard_paste", text="Paste", icon='PASTEDOWN')
|
||||
|
||||
layout.operator_context = 'INVOKE_DEFAULT'
|
||||
layout.operator("node.duplicate_move", icon="DUPLICATE")
|
||||
layout.operator("node.duplicate_move", icon='DUPLICATE')
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("node.delete", icon="X")
|
||||
layout.operator("node.delete", icon='X')
|
||||
layout.operator_context = 'EXEC_REGION_WIN'
|
||||
layout.operator("node.delete_reconnect", text="Dissolve")
|
||||
|
||||
|
@ -546,7 +546,7 @@ class NODE_MT_context_menu(Menu):
|
|||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("node.group_make", text="Make Group", icon="NODETREE")
|
||||
layout.operator("node.group_make", text="Make Group", icon='NODETREE')
|
||||
layout.operator("node.group_insert", text="Insert Into Group")
|
||||
|
||||
if active_node and active_node.type == 'GROUP':
|
||||
|
@ -878,7 +878,7 @@ class NodeTreeInterfacePanel(Panel):
|
|||
props = property_row.operator_menu_enum(
|
||||
"node.tree_socket_change_type",
|
||||
"socket_type",
|
||||
text=active_socket.bl_label if active_socket.bl_label else active_socket.bl_idname
|
||||
text=active_socket.bl_label if active_socket.bl_label else active_socket.bl_idname,
|
||||
)
|
||||
props.in_out = in_out
|
||||
|
||||
|
|
|
@ -732,7 +732,7 @@ class SEQUENCER_MT_add_scene(Menu):
|
|||
|
||||
layout = self.layout
|
||||
layout.operator_context = 'INVOKE_REGION_WIN'
|
||||
layout.operator("sequencer.scene_strip_add_new", text="New Scene", icon="ADD").type = 'NEW'
|
||||
layout.operator("sequencer.scene_strip_add_new", text="New Scene", icon='ADD').type = 'NEW'
|
||||
|
||||
bpy_data_scenes_len = len(bpy.data.scenes)
|
||||
if bpy_data_scenes_len > 10:
|
||||
|
@ -1378,7 +1378,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
|
|||
'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER',
|
||||
'CROSS', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP',
|
||||
'WIPE', 'GLOW', 'TRANSFORM', 'COLOR', 'SPEED',
|
||||
'MULTICAM', 'GAUSSIAN_BLUR', 'TEXT', 'COLORMIX'
|
||||
'MULTICAM', 'GAUSSIAN_BLUR', 'TEXT', 'COLORMIX',
|
||||
}
|
||||
|
||||
def draw(self, context):
|
||||
|
@ -2112,7 +2112,7 @@ class SEQUENCER_PT_adjust_video(SequencerButtonsPanel, Panel):
|
|||
'META', 'ADD', 'SUBTRACT', 'ALPHA_OVER',
|
||||
'ALPHA_UNDER', 'CROSS', 'GAMMA_CROSS', 'MULTIPLY',
|
||||
'OVER_DROP', 'WIPE', 'GLOW', 'TRANSFORM', 'COLOR',
|
||||
'MULTICAM', 'SPEED', 'ADJUSTMENT', 'COLORMIX'
|
||||
'MULTICAM', 'SPEED', 'ADJUSTMENT', 'COLORMIX',
|
||||
}
|
||||
|
||||
def draw(self, context):
|
||||
|
@ -2160,7 +2160,7 @@ class SEQUENCER_PT_adjust_color(SequencerButtonsPanel, Panel):
|
|||
'META', 'ADD', 'SUBTRACT', 'ALPHA_OVER',
|
||||
'ALPHA_UNDER', 'CROSS', 'GAMMA_CROSS', 'MULTIPLY',
|
||||
'OVER_DROP', 'WIPE', 'GLOW', 'TRANSFORM', 'COLOR',
|
||||
'MULTICAM', 'SPEED', 'ADJUSTMENT', 'COLORMIX'
|
||||
'MULTICAM', 'SPEED', 'ADJUSTMENT', 'COLORMIX',
|
||||
}
|
||||
|
||||
def draw(self, context):
|
||||
|
|
|
@ -272,7 +272,7 @@ class TEXT_MT_templates_py(Menu):
|
|||
bpy.utils.script_paths(subdir="templates_py"),
|
||||
"text.open",
|
||||
props_default={"internal": True},
|
||||
filter_ext=lambda ext: (ext.lower() == ".py")
|
||||
filter_ext=lambda ext: (ext.lower() == ".py"),
|
||||
)
|
||||
|
||||
|
||||
|
@ -284,7 +284,7 @@ class TEXT_MT_templates_osl(Menu):
|
|||
bpy.utils.script_paths(subdir="templates_osl"),
|
||||
"text.open",
|
||||
props_default={"internal": True},
|
||||
filter_ext=lambda ext: (ext.lower() == ".osl")
|
||||
filter_ext=lambda ext: (ext.lower() == ".osl"),
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -225,7 +225,7 @@ class ToolSelectPanelHelper:
|
|||
return next(
|
||||
(cls for cls in ToolSelectPanelHelper.__subclasses__()
|
||||
if cls.bl_space_type == space_type),
|
||||
None
|
||||
None,
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
|
@ -904,7 +904,8 @@ class ToolSelectPanelHelper:
|
|||
"workspace_tool_type",
|
||||
value='DEFAULT',
|
||||
text="Active Tool",
|
||||
icon='TOOL_SETTINGS', # Could use a less generic icon.
|
||||
# Could use a less generic icon.
|
||||
icon='TOOL_SETTINGS',
|
||||
)
|
||||
is_active_tool = (tool_settings.workspace_tool_type == 'DEFAULT')
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ def generate_from_enum_ex(
|
|||
attr,
|
||||
cursor='DEFAULT',
|
||||
tooldef_keywords={},
|
||||
exclude_filter={}
|
||||
exclude_filter={},
|
||||
):
|
||||
tool_defs = []
|
||||
for enum in type.bl_rna.properties[attr].enum_items_static:
|
||||
|
@ -49,8 +49,8 @@ def generate_from_enum_ex(
|
|||
cursor=cursor,
|
||||
data_block=idname,
|
||||
**tooldef_keywords,
|
||||
)
|
||||
)
|
||||
),
|
||||
),
|
||||
)
|
||||
return tuple(tool_defs)
|
||||
|
||||
|
@ -1633,7 +1633,7 @@ class _defs_weight_paint:
|
|||
cursor='EYEDROPPER',
|
||||
widget=None,
|
||||
keymap=(),
|
||||
draw_settings=draw_settings
|
||||
draw_settings=draw_settings,
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
|
@ -1660,7 +1660,7 @@ class _defs_weight_paint:
|
|||
"weight",
|
||||
unified_name="use_unified_weight",
|
||||
slider=True,
|
||||
header=True
|
||||
header=True,
|
||||
)
|
||||
UnifiedPaintPanel.prop_unified(
|
||||
layout,
|
||||
|
@ -1668,7 +1668,7 @@ class _defs_weight_paint:
|
|||
brush,
|
||||
"strength",
|
||||
unified_name="use_unified_strength",
|
||||
header=True
|
||||
header=True,
|
||||
)
|
||||
|
||||
props = tool.operator_properties("paint.weight_gradient")
|
||||
|
@ -2323,7 +2323,7 @@ class _defs_curves_sculpt:
|
|||
idname="builtin_brush.selection_paint",
|
||||
label="Selection Paint",
|
||||
icon="ops.generic.select_paint",
|
||||
data_block="SELECTION_PAINT"
|
||||
data_block="SELECTION_PAINT",
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
|
@ -2332,7 +2332,7 @@ class _defs_curves_sculpt:
|
|||
idname="builtin_brush.comb",
|
||||
label="Comb",
|
||||
icon="ops.curves.sculpt_comb",
|
||||
data_block='COMB'
|
||||
data_block='COMB',
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
|
@ -2341,7 +2341,7 @@ class _defs_curves_sculpt:
|
|||
idname="builtin_brush.add",
|
||||
label="Add",
|
||||
icon="ops.curves.sculpt_add",
|
||||
data_block='ADD'
|
||||
data_block='ADD',
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
|
@ -2350,7 +2350,7 @@ class _defs_curves_sculpt:
|
|||
idname="builtin_brush.delete",
|
||||
label="Delete",
|
||||
icon="ops.curves.sculpt_delete",
|
||||
data_block='DELETE'
|
||||
data_block='DELETE',
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
|
@ -2359,7 +2359,7 @@ class _defs_curves_sculpt:
|
|||
idname="builtin_brush.snake_hook",
|
||||
label="Snake Hook",
|
||||
icon="ops.curves.sculpt_snake_hook",
|
||||
data_block='SNAKE_HOOK'
|
||||
data_block='SNAKE_HOOK',
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
|
@ -2368,7 +2368,7 @@ class _defs_curves_sculpt:
|
|||
idname="builtin_brush.grow_shrink",
|
||||
label="Grow/Shrink",
|
||||
icon="ops.curves.sculpt_grow_shrink",
|
||||
data_block='GROW_SHRINK'
|
||||
data_block='GROW_SHRINK',
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
|
@ -2377,7 +2377,7 @@ class _defs_curves_sculpt:
|
|||
idname="builtin_brush.pinch",
|
||||
label="Pinch",
|
||||
icon="ops.curves.sculpt_pinch",
|
||||
data_block='PINCH'
|
||||
data_block='PINCH',
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
|
@ -2386,7 +2386,7 @@ class _defs_curves_sculpt:
|
|||
idname="builtin_brush.smooth",
|
||||
label="Smooth",
|
||||
icon="ops.curves.sculpt_smooth",
|
||||
data_block='SMOOTH'
|
||||
data_block='SMOOTH',
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
|
@ -2395,7 +2395,7 @@ class _defs_curves_sculpt:
|
|||
idname="builtin_brush.puff",
|
||||
label="Puff",
|
||||
icon="ops.curves.sculpt_puff",
|
||||
data_block='PUFF'
|
||||
data_block='PUFF',
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
|
@ -2404,7 +2404,7 @@ class _defs_curves_sculpt:
|
|||
idname="builtin_brush.density",
|
||||
label="Density",
|
||||
icon="ops.curves.sculpt_density",
|
||||
data_block="DENSITY"
|
||||
data_block="DENSITY",
|
||||
)
|
||||
|
||||
@ToolDef.from_fn
|
||||
|
@ -2413,7 +2413,7 @@ class _defs_curves_sculpt:
|
|||
idname="builtin_brush.slide",
|
||||
label="Slide",
|
||||
icon="ops.curves.sculpt_slide",
|
||||
data_block="SLIDE"
|
||||
data_block="SLIDE",
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -1131,7 +1131,7 @@ class PreferenceThemeSpacePanel:
|
|||
},
|
||||
'CLIP_EDITOR': {
|
||||
"handle_vertex_select",
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
# TODO theme_area should be deprecated
|
||||
|
@ -2289,7 +2289,7 @@ class USERPREF_PT_experimental_virtual_reality(ExperimentalPanel, Panel):
|
|||
context, (
|
||||
({"property": "use_virtual_reality_scene_inspection"}, "T71347"),
|
||||
({"property": "use_virtual_reality_immersive_drawing"}, "T71348"),
|
||||
)
|
||||
),
|
||||
)
|
||||
"""
|
||||
|
||||
|
|
|
@ -845,13 +845,13 @@ class VIEW3D_HT_header(Header):
|
|||
layout.popover(
|
||||
panel="VIEW3D_PT_gpencil_sculpt_automasking",
|
||||
text="",
|
||||
icon="MOD_MASK"
|
||||
icon='MOD_MASK',
|
||||
)
|
||||
elif object_mode == 'SCULPT':
|
||||
layout.popover(
|
||||
panel="VIEW3D_PT_sculpt_automasking",
|
||||
text="",
|
||||
icon="MOD_MASK"
|
||||
icon='MOD_MASK',
|
||||
)
|
||||
else:
|
||||
# Transform settings depending on tool header visibility
|
||||
|
@ -1254,12 +1254,21 @@ class VIEW3D_MT_view(Menu):
|
|||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("render.opengl", text="Viewport Render Image", icon='RENDER_STILL')
|
||||
layout.operator("render.opengl", text="Viewport Render Animation", icon='RENDER_ANIMATION').animation = True
|
||||
props = layout.operator("render.opengl",
|
||||
text="Viewport Render Keyframes",
|
||||
icon='RENDER_ANIMATION',
|
||||
)
|
||||
layout.operator(
|
||||
"render.opengl",
|
||||
text="Viewport Render Image",
|
||||
icon='RENDER_STILL',
|
||||
)
|
||||
layout.operator(
|
||||
"render.opengl",
|
||||
text="Viewport Render Animation",
|
||||
icon='RENDER_ANIMATION',
|
||||
).animation = True
|
||||
props = layout.operator(
|
||||
"render.opengl",
|
||||
text="Viewport Render Keyframes",
|
||||
icon='RENDER_ANIMATION',
|
||||
)
|
||||
props.animation = True
|
||||
props.render_keyed_only = True
|
||||
|
||||
|
@ -6218,7 +6227,7 @@ class VIEW3D_PT_shading_compositor(Panel):
|
|||
row.active = not is_macos
|
||||
row.prop(shading, "use_compositor", expand=True)
|
||||
if is_macos and shading.use_compositor != "DISABLED":
|
||||
self.layout.label(text="Compositor not supported on MacOS.", icon="ERROR")
|
||||
self.layout.label(text="Compositor not supported on MacOS.", icon='ERROR')
|
||||
|
||||
|
||||
class VIEW3D_PT_gizmo_display(Panel):
|
||||
|
|
|
@ -213,7 +213,7 @@ shader_node_categories = [
|
|||
NodeItem("ShaderNodeVolumeScatter", poll=eevee_cycles_shader_nodes_poll),
|
||||
NodeItem("ShaderNodeVolumePrincipled"),
|
||||
NodeItem("ShaderNodeEeveeSpecular", poll=object_eevee_shader_nodes_poll),
|
||||
NodeItem("ShaderNodeBsdfHairPrincipled", poll=object_cycles_shader_nodes_poll)
|
||||
NodeItem("ShaderNodeBsdfHairPrincipled", poll=object_cycles_shader_nodes_poll),
|
||||
]),
|
||||
ShaderNodeCategory("SH_NEW_TEXTURE", "Texture", items=[
|
||||
NodeItem("ShaderNodeTexImage"),
|
||||
|
|
|
@ -218,7 +218,7 @@ class TestBufferProtocol(TestHelper, unittest.TestCase):
|
|||
def assertEqualMemviews(self, view1, view2):
|
||||
props_to_compare = (
|
||||
"contiguous", "format", "itemsize", "nbytes", "ndim",
|
||||
"readonly", "shape", "strides", "suboffsets"
|
||||
"readonly", "shape", "strides", "suboffsets",
|
||||
)
|
||||
for attr in props_to_compare:
|
||||
self.assertEqual(getattr(view1, attr), getattr(view2, attr))
|
||||
|
|
Loading…
Reference in New Issue