Cleanup: use double-quotes for non-enum strings
This commit is contained in:
parent
cb7f97891d
commit
706b13959e
|
@ -81,8 +81,8 @@ class ASSET_OT_open_containing_blend_file(Operator):
|
|||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
asset_file_handle = getattr(context, 'asset_file_handle', None)
|
||||
asset_library_ref = getattr(context, 'asset_library_ref', None)
|
||||
asset_file_handle = getattr(context, "asset_file_handle", None)
|
||||
asset_library_ref = getattr(context, "asset_library_ref", None)
|
||||
|
||||
if not asset_library_ref:
|
||||
cls.poll_message_set("No asset library selected")
|
||||
|
|
|
@ -620,7 +620,7 @@ class CLIP_OT_setup_tracking_scene(Operator):
|
|||
if not view_layers.get("Foreground"):
|
||||
if len(view_layers) == 1:
|
||||
fg = view_layers[0]
|
||||
fg.name = 'Foreground'
|
||||
fg.name = "Foreground"
|
||||
else:
|
||||
fg = view_layers.new("Foreground")
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ class SCENE_OT_freestyle_add_edge_marks_to_keying_set(Operator):
|
|||
bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
|
||||
for i, edge in enumerate(mesh.edges):
|
||||
if not edge.hide and edge.select:
|
||||
path = 'edges[%d].use_freestyle_mark' % i
|
||||
path = "edges[%d].use_freestyle_mark" % i
|
||||
ks.paths.add(mesh, path, index=0)
|
||||
bpy.ops.object.mode_set(mode=ob_mode, toggle=False)
|
||||
return {'FINISHED'}
|
||||
|
@ -173,7 +173,7 @@ class SCENE_OT_freestyle_add_face_marks_to_keying_set(Operator):
|
|||
bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
|
||||
for i, polygon in enumerate(mesh.polygons):
|
||||
if not polygon.hide and polygon.select:
|
||||
path = 'polygons[%d].use_freestyle_mark' % i
|
||||
path = "polygons[%d].use_freestyle_mark" % i
|
||||
ks.paths.add(mesh, path, index=0)
|
||||
bpy.ops.object.mode_set(mode=ob_mode, toggle=False)
|
||||
return {'FINISHED'}
|
||||
|
|
|
@ -223,7 +223,7 @@ class SequencerFadesAdd(Operator):
|
|||
if not self.is_long_enough(sequence, duration):
|
||||
continue
|
||||
|
||||
animated_property = 'volume' if hasattr(sequence, 'volume') else 'blend_alpha'
|
||||
animated_property = "volume" if hasattr(sequence, "volume") else "blend_alpha"
|
||||
fade_fcurve = self.fade_find_or_create_fcurve(context, sequence, animated_property)
|
||||
fades = self.calculate_fades(sequence, fade_fcurve, animated_property, duration)
|
||||
self.fade_animation_clear(fade_fcurve, fades)
|
||||
|
|
|
@ -2507,7 +2507,7 @@ class WM_OT_batch_rename(Operator):
|
|||
('COLLECTION', "Collections", ""),
|
||||
('MATERIAL', "Materials", ""),
|
||||
None,
|
||||
# Enum identifiers are compared with 'object.type'.
|
||||
# Enum identifiers are compared with `object.type`.
|
||||
# Follow order in "Add" menu.
|
||||
('MESH', "Meshes", ""),
|
||||
('CURVE', "Curves", ""),
|
||||
|
|
|
@ -66,7 +66,7 @@ class MotionPathButtonsPanel:
|
|||
col.operator(op_category + ".paths_calculate", text="Calculate...", icon=icon)
|
||||
|
||||
# Update All & Clear All.
|
||||
# Note that 'col' is from inside the preceeding `if` or `else` block.
|
||||
# Note that `col` is from inside the preceding `if` or `else` block.
|
||||
row = col.row(align=True)
|
||||
row.operator("object.paths_update_visible", text="Update All Paths", icon='WORLD')
|
||||
row.operator(op_category + ".paths_clear", text="", icon='X').only_selected = False
|
||||
|
|
|
@ -87,7 +87,7 @@ class ConstraintButtonsPanel:
|
|||
@staticmethod
|
||||
def target_template(layout, con, subtargets=True):
|
||||
col = layout.column()
|
||||
col.prop(con, "target") # XXX limiting settings for only 'curves' or some type of object
|
||||
col.prop(con, "target") # XXX: limiting settings for only `curves` or some type of object.
|
||||
|
||||
if con.target and subtargets:
|
||||
if con.target.type == 'ARMATURE':
|
||||
|
|
|
@ -87,7 +87,7 @@ class BONE_PT_transform(BoneButtonsPanel, Panel):
|
|||
row.use_property_decorate = False
|
||||
row.prop(pchan, "lock_rotation", text="", emboss=False, icon='DECORATE_UNLOCKED')
|
||||
row = layout.row(align=True)
|
||||
row.prop(pchan, "rotation_mode", text='Mode')
|
||||
row.prop(pchan, "rotation_mode", text="Mode")
|
||||
row.label(text="", icon='BLANK1')
|
||||
|
||||
col = layout.column()
|
||||
|
@ -403,9 +403,9 @@ class BONE_PT_inverse_kinematics(BoneButtonsPanel, Panel):
|
|||
col.prop(pchan, "ik_rotation_weight", text="IK Rotation Weight", slider=True)
|
||||
col.active = active
|
||||
# not supported yet
|
||||
#row = layout.row()
|
||||
#row.prop(pchan, "use_ik_linear_control", text="Joint Size")
|
||||
#row.prop(pchan, "ik_linear_weight", text="Weight", slider=True)
|
||||
# row = layout.row()
|
||||
# row.prop(pchan, "use_ik_linear_control", text="Joint Size")
|
||||
# row.prop(pchan, "ik_linear_weight", text="Weight", slider=True)
|
||||
|
||||
|
||||
class BONE_PT_deform(BoneButtonsPanel, Panel):
|
||||
|
|
|
@ -12,7 +12,7 @@ class DataButtonsPanel:
|
|||
@classmethod
|
||||
def poll(cls, context):
|
||||
engine = context.scene.render.engine
|
||||
return hasattr(context, 'curves') and context.curves and (engine in cls.COMPAT_ENGINES)
|
||||
return hasattr(context, "curves") and context.curves and (engine in cls.COMPAT_ENGINES)
|
||||
|
||||
|
||||
class DATA_PT_context_curves(DataButtonsPanel, Panel):
|
||||
|
@ -73,8 +73,8 @@ class CURVES_MT_add_attribute(Menu):
|
|||
layout = self.layout
|
||||
curves = context.curves
|
||||
|
||||
self.add_standard_attribute(layout, curves, 'radius', 'FLOAT', 'POINT')
|
||||
self.add_standard_attribute(layout, curves, 'color', 'FLOAT_COLOR', 'POINT')
|
||||
self.add_standard_attribute(layout, curves, "radius", 'FLOAT', 'POINT')
|
||||
self.add_standard_attribute(layout, curves, "color", 'FLOAT_COLOR', 'POINT')
|
||||
|
||||
layout.separator()
|
||||
|
||||
|
@ -102,8 +102,8 @@ class CURVES_UL_attributes(UIList):
|
|||
return flags, indices
|
||||
|
||||
def draw_item(self, _context, layout, _data, attribute, _icon, _active_data, _active_propname, _index):
|
||||
data_type = attribute.bl_rna.properties['data_type'].enum_items[attribute.data_type]
|
||||
domain = attribute.bl_rna.properties['domain'].enum_items[attribute.domain]
|
||||
data_type = attribute.bl_rna.properties["data_type"].enum_items[attribute.data_type]
|
||||
domain = attribute.bl_rna.properties["domain"].enum_items[attribute.domain]
|
||||
|
||||
split = layout.split(factor=0.5)
|
||||
split.emboss = 'NONE'
|
||||
|
|
|
@ -551,7 +551,7 @@ class MESH_UL_attributes(UIList):
|
|||
return flags, indices
|
||||
|
||||
def draw_item(self, _context, layout, _data, attribute, _icon, _active_data, _active_propname, _index):
|
||||
data_type = attribute.bl_rna.properties['data_type'].enum_items[attribute.data_type]
|
||||
data_type = attribute.bl_rna.properties["data_type"].enum_items[attribute.data_type]
|
||||
|
||||
domain_name = self.display_domain_names.get(attribute.domain, "")
|
||||
|
||||
|
@ -658,7 +658,7 @@ class ColorAttributesListBase():
|
|||
|
||||
class MESH_UL_color_attributes(UIList, ColorAttributesListBase):
|
||||
def draw_item(self, _context, layout, data, attribute, _icon, _active_data, _active_propname, _index):
|
||||
data_type = attribute.bl_rna.properties['data_type'].enum_items[attribute.data_type]
|
||||
data_type = attribute.bl_rna.properties["data_type"].enum_items[attribute.data_type]
|
||||
|
||||
domain_name = self.display_domain_names.get(attribute.domain, "")
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ class DataButtonsPanel:
|
|||
@classmethod
|
||||
def poll(cls, context):
|
||||
engine = context.scene.render.engine
|
||||
return hasattr(context, 'pointcloud') and context.pointcloud and (engine in cls.COMPAT_ENGINES)
|
||||
return hasattr(context, "pointcloud") and context.pointcloud and (engine in cls.COMPAT_ENGINES)
|
||||
|
||||
|
||||
class DATA_PT_context_pointcloud(DataButtonsPanel, Panel):
|
||||
|
@ -53,10 +53,10 @@ class POINTCLOUD_MT_add_attribute(Menu):
|
|||
layout = self.layout
|
||||
pointcloud = context.pointcloud
|
||||
|
||||
self.add_standard_attribute(layout, pointcloud, 'radius', 'FLOAT', 'POINT')
|
||||
self.add_standard_attribute(layout, pointcloud, 'color', 'FLOAT_COLOR', 'POINT')
|
||||
self.add_standard_attribute(layout, pointcloud, 'id', 'INT', 'POINT')
|
||||
self.add_standard_attribute(layout, pointcloud, 'velocity', 'FLOAT_VECTOR', 'POINT')
|
||||
self.add_standard_attribute(layout, pointcloud, "radius", 'FLOAT', 'POINT')
|
||||
self.add_standard_attribute(layout, pointcloud, "color", 'FLOAT_COLOR', 'POINT')
|
||||
self.add_standard_attribute(layout, pointcloud, "id", 'INT', 'POINT')
|
||||
self.add_standard_attribute(layout, pointcloud, "velocity", 'FLOAT_VECTOR', 'POINT')
|
||||
|
||||
layout.separator()
|
||||
|
||||
|
@ -84,7 +84,7 @@ class POINTCLOUD_UL_attributes(UIList):
|
|||
return flags, indices
|
||||
|
||||
def draw_item(self, _context, layout, _data, attribute, _icon, _active_data, _active_propname, _index):
|
||||
data_type = attribute.bl_rna.properties['data_type'].enum_items[attribute.data_type]
|
||||
data_type = attribute.bl_rna.properties["data_type"].enum_items[attribute.data_type]
|
||||
|
||||
split = layout.split(factor=0.75)
|
||||
split.emboss = 'NONE'
|
||||
|
|
|
@ -68,7 +68,7 @@ class DATA_PT_volume_file(DataButtonsPanel, Panel):
|
|||
class VOLUME_UL_grids(UIList):
|
||||
def draw_item(self, _context, layout, _data, grid, _icon, _active_data, _active_propname, _index):
|
||||
name = grid.name
|
||||
data_type = grid.bl_rna.properties['data_type'].enum_items[grid.data_type]
|
||||
data_type = grid.bl_rna.properties["data_type"].enum_items[grid.data_type]
|
||||
|
||||
layout.emboss = 'NONE'
|
||||
layout.label(text=name)
|
||||
|
|
|
@ -324,7 +324,7 @@ class RENDER_PT_output_color_management(RenderOutputButtonsPanel, Panel):
|
|||
col = flow.column()
|
||||
|
||||
if image_settings.has_linear_colorspace:
|
||||
if hasattr(owner, 'linear_colorspace_settings'):
|
||||
if hasattr(owner, "linear_colorspace_settings"):
|
||||
col.prop(owner.linear_colorspace_settings, "name", text="Color Space")
|
||||
else:
|
||||
col.prop(owner.display_settings, "display_device")
|
||||
|
|
|
@ -31,10 +31,10 @@ class CONSOLE_MT_view(Menu):
|
|||
layout = self.layout
|
||||
|
||||
props = layout.operator("wm.context_cycle_int", text="Zoom In")
|
||||
props.data_path = 'space_data.font_size'
|
||||
props.data_path = "space_data.font_size"
|
||||
props.reverse = False
|
||||
props = layout.operator("wm.context_cycle_int", text="Zoom Out")
|
||||
props.data_path = 'space_data.font_size'
|
||||
props.data_path = "space_data.font_size"
|
||||
props.reverse = True
|
||||
|
||||
layout.separator()
|
||||
|
@ -62,7 +62,7 @@ class CONSOLE_MT_language(Menu):
|
|||
layout = self.layout
|
||||
layout.column()
|
||||
|
||||
# Collect modules with 'console_*.execute'
|
||||
# Collect modules with `console_*.execute`.
|
||||
languages = []
|
||||
for modname, mod in sys.modules.items():
|
||||
if modname.startswith("console_") and hasattr(mod, "execute"):
|
||||
|
|
|
@ -550,7 +550,7 @@ class DOPESHEET_PT_custom_props_action(PropertyPanel, Panel):
|
|||
bl_space_type = 'DOPESHEET_EDITOR'
|
||||
bl_category = "Action"
|
||||
bl_region_type = 'UI'
|
||||
bl_context = 'data'
|
||||
bl_context = "data"
|
||||
_context_path = "active_action"
|
||||
_property_type = bpy.types.Action
|
||||
|
||||
|
|
|
@ -742,7 +742,7 @@ class IMAGE_HT_header(Header):
|
|||
|
||||
# Snap.
|
||||
snap_uv_element = tool_settings.snap_uv_element
|
||||
act_snap_uv_element = tool_settings.bl_rna.properties['snap_uv_element'].enum_items[snap_uv_element]
|
||||
act_snap_uv_element = tool_settings.bl_rna.properties["snap_uv_element"].enum_items[snap_uv_element]
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.prop(tool_settings, "use_snap_uv", text="")
|
||||
|
|
|
@ -41,7 +41,7 @@ class NODE_HT_header(Header):
|
|||
|
||||
layout.template_header()
|
||||
|
||||
# Now expanded via the 'ui_type'
|
||||
# Now expanded via the `ui_type`.
|
||||
# layout.prop(snode, "tree_type", text="")
|
||||
|
||||
if snode.tree_type == 'ShaderNodeTree':
|
||||
|
@ -661,7 +661,7 @@ class NODE_PT_active_node_properties(Panel):
|
|||
)
|
||||
|
||||
def show_socket_input(self, socket):
|
||||
return hasattr(socket, 'draw') and socket.enabled and not socket.is_linked
|
||||
return hasattr(socket, "draw") and socket.enabled and not socket.is_linked
|
||||
|
||||
|
||||
class NODE_PT_texture_mapping(Panel):
|
||||
|
@ -961,7 +961,7 @@ def node_panel(cls):
|
|||
node_cls.bl_space_type = 'NODE_EDITOR'
|
||||
node_cls.bl_region_type = 'UI'
|
||||
node_cls.bl_category = "Options"
|
||||
if hasattr(node_cls, 'bl_parent_id'):
|
||||
if hasattr(node_cls, "bl_parent_id"):
|
||||
node_cls.bl_parent_id = 'NODE_' + node_cls.bl_parent_id
|
||||
|
||||
return node_cls
|
||||
|
|
|
@ -51,8 +51,8 @@ ToolDef = namedtuple(
|
|||
"idname",
|
||||
# The name to display in the interface.
|
||||
"label",
|
||||
# Description (for tool-tip), when not set, use the description of 'operator',
|
||||
# may be a string or a 'function(context, item, key-map) -> string'.
|
||||
# Description (for tool-tip), when not set, use the description of `operator`,
|
||||
# may be a string or a `function(context, item, key-map) -> string`.
|
||||
"description",
|
||||
# The name of the icon to use (found in `release/datafiles/icons`) or None for no icon.
|
||||
"icon",
|
||||
|
@ -88,7 +88,7 @@ ToolDef = namedtuple(
|
|||
# Note that this isn't used for Blender's built in tools which use the built-in key-map.
|
||||
# Keep this functionality since it's likely useful for add-on key-maps.
|
||||
#
|
||||
# Warning: currently 'from_dict' this is a list of one item,
|
||||
# Warning: currently `from_dict` this is a list of one item,
|
||||
# so internally we can swap the key-map function for the key-map itself.
|
||||
# This isn't very nice and may change, tool definitions shouldn't care about this.
|
||||
"keymap",
|
||||
|
@ -256,7 +256,7 @@ class ToolSelectPanelHelper:
|
|||
|
||||
# tool flattening
|
||||
#
|
||||
# usually 'tools' is already expanded into ToolDef
|
||||
# usually 'tools' is already expanded into `ToolDef`
|
||||
# but when registering a tool, this can still be a function
|
||||
# (_tools_flatten is usually called with cls.tools_from_context(context)
|
||||
# [that already yields from the function])
|
||||
|
@ -792,7 +792,7 @@ class ToolSelectPanelHelper:
|
|||
item, tool, icon_value = cls._tool_get_active(context, space_type, mode, with_icon=True)
|
||||
if item is None:
|
||||
return None
|
||||
# Note: we could show 'item.text' here but it makes the layout jitter when switching tools.
|
||||
# NOTE: we could show `item.text` here but it makes the layout jitter when switching tools.
|
||||
# Add some spacing since the icon is currently assuming regular small icon size.
|
||||
if show_tool_icon_always:
|
||||
layout.label(text=" " + iface_(item.label, "Operator"), icon_value=icon_value)
|
||||
|
|
|
@ -2706,7 +2706,7 @@ class IMAGE_PT_tools_active(ToolSelectPanelHelper, Panel):
|
|||
)
|
||||
|
||||
# Private tools dictionary, store data to implement `tools_all` & `tools_from_context`.
|
||||
# The keys match image spaces modes: 'context.space_data.mode'.
|
||||
# The keys match image spaces modes: `context.space_data.mode`.
|
||||
# The values represent the tools, see `ToolSelectPanelHelper` for details.
|
||||
_tools = {
|
||||
None: [
|
||||
|
@ -2892,7 +2892,7 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
|
|||
)
|
||||
|
||||
# Private tools dictionary, store data to implement `tools_all` & `tools_from_context`.
|
||||
# The keys match object-modes from: 'context.mode'.
|
||||
# The keys match object-modes from: `context.mode`.
|
||||
# The values represent the tools, see `ToolSelectPanelHelper` for details.
|
||||
_tools = {
|
||||
None: [
|
||||
|
@ -3230,7 +3230,7 @@ class SEQUENCER_PT_tools_active(ToolSelectPanelHelper, Panel):
|
|||
)
|
||||
|
||||
# Private tools dictionary, store data to implement `tools_all` & `tools_from_context`.
|
||||
# The keys match sequence editors view type: 'context.space_data.view_type'.
|
||||
# The keys match sequence editors view type: `context.space_data.view_type`.
|
||||
# The values represent the tools, see `ToolSelectPanelHelper` for details.
|
||||
_tools = {
|
||||
None: [
|
||||
|
|
|
@ -1286,7 +1286,7 @@ class ThemeGenericClassGenerator:
|
|||
def generate_panel_classes_from_theme_areas():
|
||||
from bpy.types import Theme
|
||||
|
||||
for theme_area in Theme.bl_rna.properties['theme_area'].enum_items_static:
|
||||
for theme_area in Theme.bl_rna.properties["theme_area"].enum_items_static:
|
||||
if theme_area.identifier in {'USER_INTERFACE', 'STYLE', 'BONE_COLOR_SETS'}:
|
||||
continue
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ class VIEW3D_HT_tool_header(Header):
|
|||
layout.popover("VIEW3D_PT_tools_brush_falloff")
|
||||
layout.popover("VIEW3D_PT_tools_brush_display")
|
||||
|
||||
# Note: general mode options should be added to 'draw_mode_settings'.
|
||||
# NOTE: general mode options should be added to `draw_mode_settings`.
|
||||
if tool_mode == 'SCULPT':
|
||||
if is_valid_context:
|
||||
draw_3d_brush_settings(layout, tool_mode)
|
||||
|
@ -889,7 +889,7 @@ class VIEW3D_HT_header(Header):
|
|||
row = layout.row()
|
||||
row.active = (object_mode == 'EDIT') or (shading.type in {'WIREFRAME', 'SOLID'})
|
||||
|
||||
# While exposing 'shading.show_xray(_wireframe)' is correct.
|
||||
# While exposing `shading.show_xray(_wireframe)` is correct.
|
||||
# this hides the key shortcut from users: T70433.
|
||||
if has_pose_mode:
|
||||
draw_depressed = overlay.show_xray_bone
|
||||
|
@ -2290,9 +2290,9 @@ class VIEW3D_MT_add(Menu):
|
|||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
# note, don't use 'EXEC_SCREEN' or operators won't get the 'v3d' context.
|
||||
# NOTE: don't use 'EXEC_SCREEN' or operators won't get the `v3d` context.
|
||||
|
||||
# Note: was EXEC_AREA, but this context does not have the 'rv3d', which prevents
|
||||
# NOTE: was `EXEC_AREA`, but this context does not have the `rv3d`, which prevents
|
||||
# "align_view" to work on first call (see T32719).
|
||||
layout.operator_context = 'EXEC_REGION_WIN'
|
||||
|
||||
|
@ -3291,23 +3291,23 @@ class VIEW3D_MT_mask(Menu):
|
|||
|
||||
layout.separator()
|
||||
|
||||
props = layout.operator("sculpt.mask_filter", text='Smooth Mask')
|
||||
props = layout.operator("sculpt.mask_filter", text="Smooth Mask")
|
||||
props.filter_type = 'SMOOTH'
|
||||
|
||||
props = layout.operator("sculpt.mask_filter", text='Sharpen Mask')
|
||||
props = layout.operator("sculpt.mask_filter", text="Sharpen Mask")
|
||||
props.filter_type = 'SHARPEN'
|
||||
|
||||
props = layout.operator("sculpt.mask_filter", text='Grow Mask')
|
||||
props = layout.operator("sculpt.mask_filter", text="Grow Mask")
|
||||
props.filter_type = 'GROW'
|
||||
|
||||
props = layout.operator("sculpt.mask_filter", text='Shrink Mask')
|
||||
props = layout.operator("sculpt.mask_filter", text="Shrink Mask")
|
||||
props.filter_type = 'SHRINK'
|
||||
|
||||
props = layout.operator("sculpt.mask_filter", text='Increase Contrast')
|
||||
props = layout.operator("sculpt.mask_filter", text="Increase Contrast")
|
||||
props.filter_type = 'CONTRAST_INCREASE'
|
||||
props.auto_iteration_count = False
|
||||
|
||||
props = layout.operator("sculpt.mask_filter", text='Decrease Contrast')
|
||||
props = layout.operator("sculpt.mask_filter", text="Decrease Contrast")
|
||||
props.filter_type = 'CONTRAST_DECREASE'
|
||||
props.auto_iteration_count = False
|
||||
|
||||
|
@ -3352,13 +3352,13 @@ class VIEW3D_MT_face_sets(Menu):
|
|||
def draw(self, _context):
|
||||
layout = self.layout
|
||||
|
||||
op = layout.operator("sculpt.face_sets_create", text='Face Set from Masked')
|
||||
op = layout.operator("sculpt.face_sets_create", text="Face Set from Masked")
|
||||
op.mode = 'MASKED'
|
||||
|
||||
op = layout.operator("sculpt.face_sets_create", text='Face Set from Visible')
|
||||
op = layout.operator("sculpt.face_sets_create", text="Face Set from Visible")
|
||||
op.mode = 'VISIBLE'
|
||||
|
||||
op = layout.operator("sculpt.face_sets_create", text='Face Set from Edit Mode Selection')
|
||||
op = layout.operator("sculpt.face_sets_create", text="Face Set from Edit Mode Selection")
|
||||
op.mode = 'SELECTION'
|
||||
|
||||
layout.separator()
|
||||
|
@ -3367,10 +3367,10 @@ class VIEW3D_MT_face_sets(Menu):
|
|||
|
||||
layout.separator()
|
||||
|
||||
op = layout.operator("sculpt.face_set_edit", text='Grow Face Set')
|
||||
op = layout.operator("sculpt.face_set_edit", text="Grow Face Set")
|
||||
op.mode = 'GROW'
|
||||
|
||||
op = layout.operator("sculpt.face_set_edit", text='Shrink Face Set')
|
||||
op = layout.operator("sculpt.face_set_edit", text="Shrink Face Set")
|
||||
op.mode = 'SHRINK'
|
||||
|
||||
layout.separator()
|
||||
|
@ -3389,18 +3389,18 @@ class VIEW3D_MT_face_sets(Menu):
|
|||
|
||||
layout.separator()
|
||||
|
||||
op = layout.operator("mesh.face_set_extract", text='Extract Face Set')
|
||||
op = layout.operator("mesh.face_set_extract", text="Extract Face Set")
|
||||
|
||||
layout.separator()
|
||||
|
||||
op = layout.operator("sculpt.face_set_change_visibility", text='Invert Visible Face Sets')
|
||||
op = layout.operator("sculpt.face_set_change_visibility", text="Invert Visible Face Sets")
|
||||
op.mode = 'INVERT'
|
||||
|
||||
op = layout.operator("sculpt.reveal_all", text='Show All Face Sets')
|
||||
op = layout.operator("sculpt.reveal_all", text="Show All Face Sets")
|
||||
|
||||
layout.separator()
|
||||
|
||||
op = layout.operator("sculpt.face_sets_randomize_colors", text='Randomize Colors')
|
||||
op = layout.operator("sculpt.face_sets_randomize_colors", text="Randomize Colors")
|
||||
|
||||
|
||||
class VIEW3D_MT_sculpt_set_pivot(Menu):
|
||||
|
@ -3431,31 +3431,31 @@ class VIEW3D_MT_face_sets_init(Menu):
|
|||
def draw(self, _context):
|
||||
layout = self.layout
|
||||
|
||||
op = layout.operator("sculpt.face_sets_init", text='By Loose Parts')
|
||||
op = layout.operator("sculpt.face_sets_init", text="By Loose Parts")
|
||||
op.mode = 'LOOSE_PARTS'
|
||||
|
||||
op = layout.operator("sculpt.face_sets_init", text='By Face Set Boundaries')
|
||||
op = layout.operator("sculpt.face_sets_init", text="By Face Set Boundaries")
|
||||
op.mode = 'FACE_SET_BOUNDARIES'
|
||||
|
||||
op = layout.operator("sculpt.face_sets_init", text='By Materials')
|
||||
op = layout.operator("sculpt.face_sets_init", text="By Materials")
|
||||
op.mode = 'MATERIALS'
|
||||
|
||||
op = layout.operator("sculpt.face_sets_init", text='By Normals')
|
||||
op = layout.operator("sculpt.face_sets_init", text="By Normals")
|
||||
op.mode = 'NORMALS'
|
||||
|
||||
op = layout.operator("sculpt.face_sets_init", text='By UV Seams')
|
||||
op = layout.operator("sculpt.face_sets_init", text="By UV Seams")
|
||||
op.mode = 'UV_SEAMS'
|
||||
|
||||
op = layout.operator("sculpt.face_sets_init", text='By Edge Creases')
|
||||
op = layout.operator("sculpt.face_sets_init", text="By Edge Creases")
|
||||
op.mode = 'CREASES'
|
||||
|
||||
op = layout.operator("sculpt.face_sets_init", text='By Edge Bevel Weight')
|
||||
op = layout.operator("sculpt.face_sets_init", text="By Edge Bevel Weight")
|
||||
op.mode = 'BEVEL_WEIGHT'
|
||||
|
||||
op = layout.operator("sculpt.face_sets_init", text='By Sharp Edges')
|
||||
op = layout.operator("sculpt.face_sets_init", text="By Sharp Edges")
|
||||
op.mode = 'SHARP_EDGES'
|
||||
|
||||
op = layout.operator("sculpt.face_sets_init", text='By Face Maps')
|
||||
op = layout.operator("sculpt.face_sets_init", text="By Face Maps")
|
||||
op.mode = 'FACE_MAPS'
|
||||
|
||||
|
||||
|
@ -3465,13 +3465,13 @@ class VIEW3D_MT_random_mask(Menu):
|
|||
def draw(self, _context):
|
||||
layout = self.layout
|
||||
|
||||
op = layout.operator("sculpt.mask_init", text='Per Vertex')
|
||||
op = layout.operator("sculpt.mask_init", text="Per Vertex")
|
||||
op.mode = 'RANDOM_PER_VERTEX'
|
||||
|
||||
op = layout.operator("sculpt.mask_init", text='Per Face Set')
|
||||
op = layout.operator("sculpt.mask_init", text="Per Face Set")
|
||||
op.mode = 'RANDOM_PER_FACE_SET'
|
||||
|
||||
op = layout.operator("sculpt.mask_init", text='Per Loose Part')
|
||||
op = layout.operator("sculpt.mask_init", text="Per Loose Part")
|
||||
op.mode = 'RANDOM_PER_LOOSE_PART'
|
||||
|
||||
|
||||
|
@ -5500,23 +5500,23 @@ class VIEW3D_MT_sculpt_mask_edit_pie(Menu):
|
|||
layout = self.layout
|
||||
pie = layout.menu_pie()
|
||||
|
||||
op = pie.operator("paint.mask_flood_fill", text='Invert Mask')
|
||||
op = pie.operator("paint.mask_flood_fill", text="Invert Mask")
|
||||
op.mode = 'INVERT'
|
||||
op = pie.operator("paint.mask_flood_fill", text='Clear Mask')
|
||||
op = pie.operator("paint.mask_flood_fill", text="Clear Mask")
|
||||
op.mode = 'VALUE'
|
||||
op.value = 0.0
|
||||
op = pie.operator("sculpt.mask_filter", text='Smooth Mask')
|
||||
op = pie.operator("sculpt.mask_filter", text="Smooth Mask")
|
||||
op.filter_type = 'SMOOTH'
|
||||
op = pie.operator("sculpt.mask_filter", text='Sharpen Mask')
|
||||
op = pie.operator("sculpt.mask_filter", text="Sharpen Mask")
|
||||
op.filter_type = 'SHARPEN'
|
||||
op = pie.operator("sculpt.mask_filter", text='Grow Mask')
|
||||
op = pie.operator("sculpt.mask_filter", text="Grow Mask")
|
||||
op.filter_type = 'GROW'
|
||||
op = pie.operator("sculpt.mask_filter", text='Shrink Mask')
|
||||
op = pie.operator("sculpt.mask_filter", text="Shrink Mask")
|
||||
op.filter_type = 'SHRINK'
|
||||
op = pie.operator("sculpt.mask_filter", text='Increase Contrast')
|
||||
op = pie.operator("sculpt.mask_filter", text="Increase Contrast")
|
||||
op.filter_type = 'CONTRAST_INCREASE'
|
||||
op.auto_iteration_count = False
|
||||
op = pie.operator("sculpt.mask_filter", text='Decrease Contrast')
|
||||
op = pie.operator("sculpt.mask_filter", text="Decrease Contrast")
|
||||
op.filter_type = 'CONTRAST_DECREASE'
|
||||
op.auto_iteration_count = False
|
||||
|
||||
|
@ -5565,16 +5565,16 @@ class VIEW3D_MT_sculpt_face_sets_edit_pie(Menu):
|
|||
layout = self.layout
|
||||
pie = layout.menu_pie()
|
||||
|
||||
op = pie.operator("sculpt.face_sets_create", text='Face Set from Masked')
|
||||
op = pie.operator("sculpt.face_sets_create", text="Face Set from Masked")
|
||||
op.mode = 'MASKED'
|
||||
|
||||
op = pie.operator("sculpt.face_sets_create", text='Face Set from Visible')
|
||||
op = pie.operator("sculpt.face_sets_create", text="Face Set from Visible")
|
||||
op.mode = 'VISIBLE'
|
||||
|
||||
op = pie.operator("sculpt.face_set_change_visibility", text='Invert Visible')
|
||||
op = pie.operator("sculpt.face_set_change_visibility", text="Invert Visible")
|
||||
op.mode = 'INVERT'
|
||||
|
||||
op = pie.operator("sculpt.reveal_all", text='Show All')
|
||||
op = pie.operator("sculpt.reveal_all", text="Show All")
|
||||
|
||||
|
||||
class VIEW3D_MT_wpaint_vgroup_lock_pie(Menu):
|
||||
|
@ -6974,9 +6974,9 @@ class VIEW3D_PT_snapping(Panel):
|
|||
col.prop(tool_settings, "use_snap_project")
|
||||
|
||||
if 'FACE_NEAREST' in snap_elements:
|
||||
col.prop(tool_settings, 'use_snap_to_same_target')
|
||||
col.prop(tool_settings, "use_snap_to_same_target")
|
||||
if object_mode == 'EDIT':
|
||||
col.prop(tool_settings, 'snap_face_nearest_steps')
|
||||
col.prop(tool_settings, "snap_face_nearest_steps")
|
||||
|
||||
if 'VOLUME' in snap_elements:
|
||||
col.prop(tool_settings, "use_snap_peel_object")
|
||||
|
|
|
@ -1084,7 +1084,7 @@ class VIEW3D_PT_tools_weightpaint_symmetry(Panel, View3DPaintPanel):
|
|||
wpaint = tool_settings.weight_paint
|
||||
mesh = context.object.data
|
||||
|
||||
layout.prop(mesh, 'use_mirror_vertex_groups')
|
||||
layout.prop(mesh, "use_mirror_vertex_groups")
|
||||
|
||||
draw_vpaint_symmetry(layout, wpaint, context.object)
|
||||
|
||||
|
|
|
@ -597,7 +597,7 @@ class BUILTIN_KSI_DeltaRotation(KeyingSetInfo):
|
|||
path = keyingsets_utils.path_add_property(base_path, "delta_rotation_quaternion")
|
||||
elif data.rotation_mode == 'AXIS_ANGLE':
|
||||
# XXX: for now, this is not available yet
|
||||
#path = path_add_property(base_path, "delta_rotation_axis_angle")
|
||||
# path = path_add_property(base_path, "delta_rotation_axis_angle")
|
||||
return
|
||||
else:
|
||||
path = keyingsets_utils.path_add_property(base_path, "delta_rotation_euler")
|
||||
|
@ -637,7 +637,7 @@ class BUILTIN_KSI_DeltaScale(KeyingSetInfo):
|
|||
###############################
|
||||
|
||||
|
||||
# Note that this controls order of options in 'insert keyframe' menu.
|
||||
# Note that this controls order of options in `insert keyframe` menu.
|
||||
# Better try to keep some logical order here beyond mere alphabetical one, also because of menu entries shortcut.
|
||||
# See also T51867.
|
||||
classes = (
|
||||
|
|
Loading…
Reference in New Issue