diff options
Diffstat (limited to 'release/scripts')
31 files changed, 171 insertions, 53 deletions
diff --git a/release/scripts/freestyle/modules/freestyle/shaders.py b/release/scripts/freestyle/modules/freestyle/shaders.py index 28b8aa9b23e..95e1c873657 100644 --- a/release/scripts/freestyle/modules/freestyle/shaders.py +++ b/release/scripts/freestyle/modules/freestyle/shaders.py @@ -1153,11 +1153,9 @@ class RoundCapShader(StrokeShader): return # calculate the number of additional vertices to form caps thickness_beg = sum(stroke[0].attribute.thickness) - caplen_beg = thickness_beg / 2.0 nverts_beg = max(5, int(thickness_beg)) thickness_end = sum(stroke[-1].attribute.thickness) - caplen_end = (thickness_end) / 2.0 nverts_end = max(5, int(thickness_end)) # adjust the total number of stroke vertices @@ -1169,7 +1167,7 @@ class RoundCapShader(StrokeShader): # reshape the cap at the beginning of the stroke q, attr = buffer[1] p, attr = buffer[0] - direction = (p - q).normalized() * caplen_beg + direction = (p - q).normalized() * thickness_beg n = 1.0 / nverts_beg R, L = attr.thickness for t, svert in zip(range(nverts_beg, 0, -1), stroke): @@ -1180,7 +1178,7 @@ class RoundCapShader(StrokeShader): # reshape the cap at the end of the stroke q, attr = buffer[-2] p, attr = buffer[-1] - direction = (p - q).normalized() * caplen_beg + direction = (p - q).normalized() * thickness_end n = 1.0 / nverts_end R, L = attr.thickness for t, svert in zip(range(nverts_end, 0, -1), reversed(stroke)): diff --git a/release/scripts/modules/bl_i18n_utils/utils.py b/release/scripts/modules/bl_i18n_utils/utils.py index f63b6990cdd..fda93682dc5 100644 --- a/release/scripts/modules/bl_i18n_utils/utils.py +++ b/release/scripts/modules/bl_i18n_utils/utils.py @@ -781,7 +781,6 @@ class I18nMessages: print("Could not import bpy, find_best_messages_matches must be run from whithin Blender.") return - # Build helper mappings. # Note it's user responsibility to know when to invalidate (and hence force rebuild) this cache! if self._reverse_cache is None: diff --git a/release/scripts/modules/bl_i18n_utils/utils_cli.py b/release/scripts/modules/bl_i18n_utils/utils_cli.py index d3750d5e9a4..e18491fa042 100644 --- a/release/scripts/modules/bl_i18n_utils/utils_cli.py +++ b/release/scripts/modules/bl_i18n_utils/utils_cli.py @@ -140,6 +140,7 @@ def main(): args.func(args=args, settings=settings) + if __name__ == "__main__": print("\n\n *** Running {} *** \n".format(__file__)) main() diff --git a/release/scripts/modules/bl_keymap_utils/keymap_from_toolbar.py b/release/scripts/modules/bl_keymap_utils/keymap_from_toolbar.py index aff1108568b..26f38cf09fc 100644 --- a/release/scripts/modules/bl_keymap_utils/keymap_from_toolbar.py +++ b/release/scripts/modules/bl_keymap_utils/keymap_from_toolbar.py @@ -449,6 +449,5 @@ def generate(context, space_type, *, use_fallback_keys=True, use_reset=True): ) kmi.properties.skip_depressed = True - wm.keyconfigs.update() return keymap diff --git a/release/scripts/modules/bl_previews_utils/bl_previews_render.py b/release/scripts/modules/bl_previews_utils/bl_previews_render.py index 51ea53c0eba..17577a9a9f2 100644 --- a/release/scripts/modules/bl_previews_utils/bl_previews_render.py +++ b/release/scripts/modules/bl_previews_utils/bl_previews_render.py @@ -37,6 +37,7 @@ OBJECT_TYPES_RENDER = {'MESH', 'CURVE', 'SURFACE', 'META', 'FONT'} def ids_nolib(bids): return (bid for bid in bids if not bid.library) + def ids_nolib_with_preview(bids): return (bid for bid in bids if (not bid.library and bid.preview)) diff --git a/release/scripts/modules/bl_rna_utils/data_path.py b/release/scripts/modules/bl_rna_utils/data_path.py index 42942b7a295..439dfcae12a 100644 --- a/release/scripts/modules/bl_rna_utils/data_path.py +++ b/release/scripts/modules/bl_rna_utils/data_path.py @@ -23,6 +23,7 @@ __all__ = ( "decompose_data_path", ) + class _TokenizeDataPath: """ Class to split up tokens of a data-path. diff --git a/release/scripts/modules/bpy/utils/__init__.py b/release/scripts/modules/bpy/utils/__init__.py index e6c7bca3e3c..58b20d9e3c8 100644 --- a/release/scripts/modules/bpy/utils/__init__.py +++ b/release/scripts/modules/bpy/utils/__init__.py @@ -155,6 +155,7 @@ def _test_import(module_name, loaded_modules): # This supports the case of loading a new preferences file which may reset scripts path. _sys_path_ensure_paths = set() + def _sys_path_ensure_prepend(path): if path not in _sys.path: _sys.path.insert(0, path) diff --git a/release/scripts/modules/bpy_extras/asset_utils.py b/release/scripts/modules/bpy_extras/asset_utils.py index 1656c21a137..e41eeeed4fa 100644 --- a/release/scripts/modules/bpy_extras/asset_utils.py +++ b/release/scripts/modules/bpy_extras/asset_utils.py @@ -31,6 +31,7 @@ __all__ = ( "SpaceAssetInfo", ) + class SpaceAssetInfo: @classmethod def is_asset_browser(cls, space_data: bpy.types.Space): @@ -46,6 +47,7 @@ class SpaceAssetInfo: active_file = context.active_file return active_file.asset_data if active_file else None + class AssetBrowserPanel: bl_space_type = 'FILE_BROWSER' @@ -53,6 +55,7 @@ class AssetBrowserPanel: def poll(cls, context): return SpaceAssetInfo.is_asset_browser_poll(context) + class AssetMetaDataPanel: bl_space_type = 'FILE_BROWSER' bl_region_type = 'TOOL_PROPS' diff --git a/release/scripts/modules/bpy_extras/node_shader_utils.py b/release/scripts/modules/bpy_extras/node_shader_utils.py index 54124fd4ca6..e37c1a17152 100644 --- a/release/scripts/modules/bpy_extras/node_shader_utils.py +++ b/release/scripts/modules/bpy_extras/node_shader_utils.py @@ -681,7 +681,10 @@ class ShaderImageTextureWrapper(): tree = self.owner_shader.material.node_tree node_image = tree.nodes.new(type='ShaderNodeTexImage') - self.owner_shader._grid_to_location(-1, 0 + self.grid_row_diff, dst_node=node_image, ref_node=self.node_dst) + self.owner_shader._grid_to_location( + -1, 0 + self.grid_row_diff, + dst_node=node_image, ref_node=self.node_dst, + ) tree.links.new(node_image.outputs["Alpha" if self.use_alpha else "Color"], self.socket_dst) if self.use_alpha: @@ -778,7 +781,7 @@ class ShaderImageTextureWrapper(): socket_dst = self.node_image.inputs["Vector"] # If not already existing, we need to create texcoords -> mapping link (from UV). socket_src = (socket_dst.links[0].from_socket if socket_dst.is_linked - else self.owner_shader.node_texcoords.outputs['UV']) + else self.owner_shader.node_texcoords.outputs['UV']) tree = self.owner_shader.material.node_tree node_mapping = tree.nodes.new(type='ShaderNodeMapping') diff --git a/release/scripts/modules/console/complete_calltip.py b/release/scripts/modules/console/complete_calltip.py index 706af67905b..60daa1d2045 100644 --- a/release/scripts/modules/console/complete_calltip.py +++ b/release/scripts/modules/console/complete_calltip.py @@ -41,7 +41,7 @@ RE_DEF_COMPLETE = re.compile( # allow empty string '''|)''' # allow opening bracket(s) - '''(?:\(|\s)*)$''') + r'''(?:\(|\s)*)$''') def reduce_newlines(text): diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index 7f1039a975b..0af7493ed47 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -4113,7 +4113,7 @@ def km_pose(params): ("pose.bone_layers", {"type": 'M', "value": 'PRESS'}, None), ("transform.bbone_resize", {"type": 'S', "value": 'PRESS', "ctrl": True, "alt": True}, None), ("anim.keyframe_insert_menu", {"type": 'I', "value": 'PRESS'}, None), - ("anim.keyframe_delete", {"type": 'I', "value": 'PRESS', "alt": True}, None), + ("anim.keyframe_delete_v3d", {"type": 'I', "value": 'PRESS', "alt": True}, None), ("anim.keying_set_active_set", {"type": 'I', "value": 'PRESS', "shift": True, "ctrl": True, "alt": True}, None), ("poselib.browse_interactive", {"type": 'L', "value": 'PRESS', "alt": True}, None), ("poselib.pose_add", {"type": 'L', "value": 'PRESS', "shift": True}, None), @@ -4185,7 +4185,7 @@ def km_object_mode(params): ("wm.context_toggle", {"type": 'PERIOD', "value": 'PRESS', "ctrl": True}, {"properties": [("data_path", 'tool_settings.use_transform_data_origin')]}), ("anim.keyframe_insert_menu", {"type": 'I', "value": 'PRESS'}, None), - ("anim.keyframe_delete", {"type": 'I', "value": 'PRESS', "alt": True}, None), + ("anim.keyframe_delete_v3d", {"type": 'I', "value": 'PRESS', "alt": True}, None), ("anim.keying_set_active_set", {"type": 'I', "value": 'PRESS', "shift": True, "ctrl": True, "alt": True}, None), ("collection.create", {"type": 'G', "value": 'PRESS', "ctrl": True}, None), ("collection.objects_remove", {"type": 'G', "value": 'PRESS', "ctrl": True, "alt": True}, None), @@ -5551,6 +5551,7 @@ def km_view3d_walk_modal(_params): ("DECELERATE", {"type": 'NUMPAD_MINUS', "value": 'PRESS', "any": True, "repeat": True}, None), ("ACCELERATE", {"type": 'WHEELUPMOUSE', "value": 'PRESS', "any": True}, None), ("DECELERATE", {"type": 'WHEELDOWNMOUSE', "value": 'PRESS', "any": True}, None), + ("AXIS_LOCK_Z", {"type": 'Z', "value": 'PRESS'}, None), ]) return keymap diff --git a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py index b0144672745..714126903d8 100644 --- a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py +++ b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py @@ -3015,7 +3015,7 @@ def km_pose(params): ("anim.keyframe_insert_by_name", {"type": 'R', "value": 'PRESS', "shift": True}, {"properties": [("type", 'Scaling')]}), - ("anim.keyframe_delete", {"type": 'S', "value": 'PRESS', "alt": True}, None), + ("anim.keyframe_delete_v3d", {"type": 'S', "value": 'PRESS', "alt": True}, None), ("anim.keying_set_active_set", {"type": 'S', "value": 'PRESS', "shift": True, "ctrl": True, "alt": True}, None), *_template_items_context_menu("VIEW3D_MT_pose_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}), # Tools @@ -3086,7 +3086,7 @@ def km_object_mode(params): {"properties": [("type", 'Rotation')]}), ("anim.keyframe_insert_by_name", {"type": 'R', "value": 'PRESS', "shift": True}, {"properties": [("type", 'Scaling')]}), - ("anim.keyframe_delete", {"type": 'S', "value": 'PRESS', "alt": True}, None), + ("anim.keyframe_delete_v3d", {"type": 'S', "value": 'PRESS', "alt": True}, None), ("anim.keying_set_active_set", {"type": 'S', "value": 'PRESS', "shift": True, "ctrl": True, "alt": True}, None), *_template_items_context_menu("VIEW3D_MT_object_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}), ("object.move_to_collection", {"type": 'G', "value": 'PRESS', "ctrl": True}, None), diff --git a/release/scripts/startup/bl_operators/spreadsheet.py b/release/scripts/startup/bl_operators/spreadsheet.py index 1907a69a3d3..b5098d63dac 100644 --- a/release/scripts/startup/bl_operators/spreadsheet.py +++ b/release/scripts/startup/bl_operators/spreadsheet.py @@ -20,6 +20,7 @@ from __future__ import annotations from bpy.types import Operator + class SPREADSHEET_OT_toggle_pin(Operator): '''Turn on or off pinning''' bl_idname = "spreadsheet.toggle_pin" diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index 2cc7b828c11..6a3830ad1e4 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -135,7 +135,7 @@ def context_path_decompose(data_path): if base_path: assert(base_path.startswith(".")) - base_path= base_path[1:] + base_path = base_path[1:] if prop_attr: assert(prop_attr.startswith(".")) prop_attr = prop_attr[1:] diff --git a/release/scripts/startup/bl_ui/properties_collection.py b/release/scripts/startup/bl_ui/properties_collection.py index 27de80bb88d..b51d7157c06 100644 --- a/release/scripts/startup/bl_ui/properties_collection.py +++ b/release/scripts/startup/bl_ui/properties_collection.py @@ -35,7 +35,7 @@ def lineart_make_line_type_entry(col, line_type, text_disp, expand, search_from) if line_type.use and expand: col.prop_search(line_type, "layer", search_from, "layers", icon='GREASEPENCIL') - col.prop_search(line_type, "material", search_from, + col.prop_search(line_type, "material", search_from, "materials", icon='SHADING_TEXTURE') @@ -90,7 +90,7 @@ class COLLECTION_PT_lineart_collection(CollectionButtonsPanel, Panel): row = layout.row(align=True, heading="Masks") row.active = collection.lineart_use_intersection_mask - for i in range(0,8): + for i in range(8): row.prop(collection, "lineart_intersection_mask", index=i, text=str(i), toggle=True) diff --git a/release/scripts/startup/bl_ui/properties_data_gpencil.py b/release/scripts/startup/bl_ui/properties_data_gpencil.py index e71ea2f31a4..b273eee4e19 100644 --- a/release/scripts/startup/bl_ui/properties_data_gpencil.py +++ b/release/scripts/startup/bl_ui/properties_data_gpencil.py @@ -93,8 +93,8 @@ class GPENCIL_MT_layer_context_menu(Menu): gpd = ob.data gpl = gpd.layers.active - layout.operator("gpencil.layer_duplicate", text="Duplicate", icon='DUPLICATE').mode='ALL' - layout.operator("gpencil.layer_duplicate", text="Duplicate Empty Keyframes").mode='EMPTY' + layout.operator("gpencil.layer_duplicate", text="Duplicate", icon='DUPLICATE').mode = 'ALL' + layout.operator("gpencil.layer_duplicate", text="Duplicate Empty Keyframes").mode = 'EMPTY' layout.separator() @@ -113,8 +113,8 @@ class GPENCIL_MT_layer_context_menu(Menu): layout.operator("gpencil.layer_merge", icon='SORT_ASC', text="Merge Down") layout.separator() - layout.operator("gpencil.layer_duplicate_object", text="Copy Layer to Selected").only_active=True - layout.operator("gpencil.layer_duplicate_object", text="Copy All Layers to Selected").only_active=False + layout.operator("gpencil.layer_duplicate_object", text="Copy Layer to Selected").only_active = True + layout.operator("gpencil.layer_duplicate_object", text="Copy All Layers to Selected").only_active = False class DATA_PT_gpencil_layers(DataButtonsPanel, Panel): diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py index 0da0716e850..de743033036 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -847,6 +847,7 @@ class GreasePencilLayerRelationsPanel: col.enabled = bool(gpl.viewlayer_render) col.prop(gpl, "use_viewlayer_masks") + class GreasePencilLayerDisplayPanel: def draw(self, context): diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index 96920af1c7e..afbc3abf302 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -72,8 +72,9 @@ class CLIP_PT_marker_display(Panel): col.prop(view, "show_marker_pattern", text="Pattern") col.prop(view, "show_marker_search", text="Search") - col.active = view.show_track_path col.prop(view, "show_track_path", text="Path") + col = col.column() + col.active = view.show_track_path col.prop(view, "path_length", text="Length") col = row.column() @@ -113,7 +114,6 @@ class CLIP_PT_clip_display(Panel): row = layout.row() col = row.column() col.prop(sc.clip_user, "use_render_undistorted", text="Render Undistorted") - col.prop(sc, "lock_selection", text="Lock to Selection") col = row.column() col.prop(sc, "show_stable", text="Show Stable") col.prop(sc, "show_grid", text="Grid") @@ -190,7 +190,7 @@ class CLIP_HT_header(Header): row.prop(sc, "pivot_point", text="", icon_only=True) row = layout.row(align=True) icon = 'LOCKED' if sc.lock_selection else 'UNLOCKED' - row.prop(sc, "lock_selection", icon=icon, text="") + row.operator("clip.lock_selection_toggle", icon=icon, text="", depress=sc.lock_selection) row.popover(panel='CLIP_PT_display') elif sc.view == 'GRAPH': @@ -250,7 +250,7 @@ class CLIP_HT_header(Header): row.popover(panel='CLIP_PT_mask_display') row = layout.row(align=True) icon = 'LOCKED' if sc.lock_selection else 'UNLOCKED' - row.prop(sc, "lock_selection", icon=icon, text="") + row.operator("clip.lock_selection_toggle", icon=icon, text="", depress=sc.lock_selection) row.popover(panel='CLIP_PT_display') def draw(self, context): @@ -1477,9 +1477,13 @@ class CLIP_MT_track(Menu): layout.separator() - layout.operator("clip.solve_camera", - text="Solve Camera Motion" if tracking_object.is_camera - else "Solve Object Motion") + layout.operator( + "clip.solve_camera", + text=( + "Solve Camera Motion" if tracking_object.is_camera else + "Solve Object Motion" + ), + ) layout.separator() diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py index ffb7b9e5c20..84d1c36c53d 100644 --- a/release/scripts/startup/bl_ui/space_dopesheet.py +++ b/release/scripts/startup/bl_ui/space_dopesheet.py @@ -609,9 +609,9 @@ class DOPESHEET_MT_context_menu(Menu): layout.operator_menu_enum("action.keyframe_type", "type", text="Keyframe Type") if st.mode != 'GPENCIL': - layout.operator_menu_enum("action.handle_type", "type", text="Handle Type") - layout.operator_menu_enum("action.interpolation_type", "type", text="Interpolation Mode") - layout.operator_menu_enum("action.easing_type", "type", text="Easing Mode") + layout.operator_menu_enum("action.handle_type", "type", text="Handle Type") + layout.operator_menu_enum("action.interpolation_type", "type", text="Interpolation Mode") + layout.operator_menu_enum("action.easing_type", "type", text="Easing Mode") layout.separator() @@ -625,8 +625,8 @@ class DOPESHEET_MT_context_menu(Menu): layout.operator("action.delete") if st.mode == 'GPENCIL': - layout.operator("gpencil.interpolate_reverse") - layout.operator("gpencil.frame_clean_duplicate", text="Delete Duplicate Frames") + layout.operator("gpencil.interpolate_reverse") + layout.operator("gpencil.frame_clean_duplicate", text="Delete Duplicate Frames") layout.separator() diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 31a4aa5da48..0fceb864ac2 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -260,6 +260,7 @@ class IMAGE_MT_image_flip(Menu): layout.operator("image.flip", text="Horizontally").use_flip_x = True layout.operator("image.flip", text="Vertically").use_flip_y = True + class IMAGE_MT_image_invert(Menu): bl_label = "Invert" diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index 1208ca0a64a..fba86676ad4 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -694,6 +694,97 @@ class NODE_UL_interface_sockets(bpy.types.UIList): layout.template_node_socket(color=color) +class NodeTreeInterfacePanel: + def draw_socket_list(self, context, in_out, sockets_propname, active_socket_propname): + layout = self.layout + + snode = context.space_data + tree = snode.edit_tree + sockets = getattr(tree, sockets_propname) + active_socket_index = getattr(tree, active_socket_propname) + active_socket = sockets[active_socket_index] if active_socket_index >= 0 else None + + split = layout.row() + + split.template_list("NODE_UL_interface_sockets", in_out, tree, sockets_propname, tree, active_socket_propname) + + ops_col = split.column() + + add_remove_col = ops_col.column(align=True) + props = add_remove_col.operator("node.tree_socket_add", icon='ADD', text="") + props.in_out = in_out + props = add_remove_col.operator("node.tree_socket_remove", icon='REMOVE', text="") + props.in_out = in_out + + ops_col.separator() + + up_down_col = ops_col.column(align=True) + props = up_down_col.operator("node.tree_socket_move", icon='TRIA_UP', text="") + props.in_out = in_out + props.direction = 'UP' + props = up_down_col.operator("node.tree_socket_move", icon='TRIA_DOWN', text="") + props.in_out = in_out + props.direction = 'DOWN' + + if active_socket is not None: + # Mimicking property split. + layout.use_property_split = False + layout.use_property_decorate = False + layout_row = layout.row(align=True) + layout_split = layout_row.split(factor=0.4, align=True) + + label_column = layout_split.column(align=True) + label_column.alignment = 'RIGHT' + # Menu to change the socket type. + label_column.label(text="Type") + + property_row = layout_split.row(align=True) + 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 + ) + props.in_out = in_out + + layout.use_property_split = True + layout.use_property_decorate = False + + layout.prop(active_socket, "name") + # Display descriptions only for Geometry Nodes, since it's only used in the modifier panel. + if tree.type == 'GEOMETRY': + layout.prop(active_socket, "description") + active_socket.draw(context, layout) + + +class NODE_PT_node_tree_interface_inputs(NodeTreeInterfacePanel, Panel): + bl_space_type = 'NODE_EDITOR' + bl_region_type = 'UI' + bl_category = "Group" + bl_label = "Inputs" + + @classmethod + def poll(cls, context): + snode = context.space_data + return snode.edit_tree is not None + + def draw(self, context): + self.draw_socket_list(context, "IN", "inputs", "active_input") + +class NODE_PT_node_tree_interface_outputs(NodeTreeInterfacePanel, Panel): + bl_space_type = 'NODE_EDITOR' + bl_region_type = 'UI' + bl_category = "Group" + bl_label = "Outputs" + + @classmethod + def poll(cls, context): + snode = context.space_data + return snode.edit_tree is not None + + def draw(self, context): + self.draw_socket_list(context, "OUT", "outputs", "active_output") + + # Grease Pencil properties class NODE_PT_annotation(AnnotationDataPanel, Panel): bl_space_type = 'NODE_EDITOR' @@ -752,6 +843,8 @@ classes = ( NODE_PT_quality, NODE_PT_annotation, NODE_UL_interface_sockets, + NODE_PT_node_tree_interface_inputs, + NODE_PT_node_tree_interface_outputs, node_panel(EEVEE_MATERIAL_PT_settings), node_panel(MATERIAL_PT_viewport), diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py index 7a694108e14..ba91b6e8d50 100644 --- a/release/scripts/startup/bl_ui/space_outliner.py +++ b/release/scripts/startup/bl_ui/space_outliner.py @@ -442,7 +442,6 @@ class OUTLINER_PT_filter(Panel): row.prop(space, "use_filter_lib_override_system", text="System Overrides") - classes = ( OUTLINER_HT_header, OUTLINER_MT_editor_menus, diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 99384ac713d..55714e0b0a5 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -400,7 +400,7 @@ class SEQUENCER_MT_view(Menu): layout.menu("SEQUENCER_MT_proxy") layout.operator_context = 'INVOKE_DEFAULT' - + layout.separator() layout.operator_context = 'INVOKE_REGION_WIN' layout.operator("sequencer.refresh_all", icon='FILE_REFRESH', text="Refresh All") @@ -467,6 +467,7 @@ class SEQUENCER_MT_select_handle(Menu): layout.operator("sequencer.select_handles", text="Left Neighbor").side = 'LEFT_NEIGHBOR' layout.operator("sequencer.select_handles", text="Right Neighbor").side = 'RIGHT_NEIGHBOR' + class SEQUENCER_MT_select_channel(Menu): bl_label = "Select Channel" @@ -1415,7 +1416,7 @@ class SEQUENCER_PT_source(SequencerButtonsPanel, Panel): split.label(text="%dx%d" % size, translate=False) else: split.label(text="None") - #FPS + # FPS if elem.orig_fps: split = col.split(factor=0.5, align=False) split.alignment = 'RIGHT' @@ -1424,7 +1425,6 @@ class SEQUENCER_PT_source(SequencerButtonsPanel, Panel): split.label(text="%.2f" % elem.orig_fps, translate=False) - class SEQUENCER_PT_scene(SequencerButtonsPanel, Panel): bl_label = "Scene" bl_category = "Strip" @@ -1857,7 +1857,7 @@ class SEQUENCER_PT_cache_settings(SequencerButtonsPanel, Panel): @classmethod def poll(cls, context): show_developer_ui = context.preferences.view.show_developer_ui - return cls.has_sequencer(context) and context.scene.sequence_editor and show_developer_ui + return cls.has_sequencer(context) and context.scene.sequence_editor and show_developer_ui def draw(self, context): layout = self.layout @@ -2286,12 +2286,15 @@ class SEQUENCER_PT_snapping(Panel): layout.use_property_decorate = False col = layout.column(heading="Snap to", align=True) - col.prop(sequencer_tool_settings, "snap_to_current_frame" ) + col.prop(sequencer_tool_settings, "snap_to_current_frame") col.prop(sequencer_tool_settings, "snap_to_hold_offset") col = layout.column(heading="Ignore", align=True) col.prop(sequencer_tool_settings, "snap_ignore_muted", text="Muted Strips") - col.prop(sequencer_tool_settings, "snap_ignore_sound",text="Sound Strips") + col.prop(sequencer_tool_settings, "snap_ignore_sound", text="Sound Strips") + + col = layout.column() + col.prop(sequencer_tool_settings, "use_snap_current_frame_to_strips") classes = ( diff --git a/release/scripts/startup/bl_ui/space_spreadsheet.py b/release/scripts/startup/bl_ui/space_spreadsheet.py index ad696f23db4..afdbfea5091 100644 --- a/release/scripts/startup/bl_ui/space_spreadsheet.py +++ b/release/scripts/startup/bl_ui/space_spreadsheet.py @@ -58,7 +58,7 @@ class SPREADSHEET_HT_header(bpy.types.Header): layout.label(text="No active viewer node.", icon='INFO') layout.separator_spacer() - + row = layout.row(align=True) sub = row.row(align=True) sub.active = self.selection_filter_available(space) @@ -115,6 +115,7 @@ class SPREADSHEET_HT_header(bpy.types.Header): return False return True + classes = ( SPREADSHEET_HT_header, ) diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index f9359a8b4a0..7e6fde1ebaf 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -1391,7 +1391,6 @@ class USERPREF_PT_file_paths_asset_libraries(FilePathsPanel, Panel): row.separator() row.label(text="Path") - for i, library in enumerate(paths.asset_libraries): name_col.prop(library, "name", text="") row = path_col.row() diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 80cede9ee5a..df41445ee6f 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -2765,23 +2765,27 @@ class VIEW3D_MT_make_single_user(Menu): props = layout.operator("object.make_single_user", text="Object") props.object = True - props.obdata = props.material = props.animation = False + props.obdata = props.material = props.animation = props.obdata_animation = False props = layout.operator("object.make_single_user", text="Object & Data") props.object = props.obdata = True - props.material = props.animation = False + props.material = props.animation = props.obdata_animation = False props = layout.operator("object.make_single_user", text="Object & Data & Materials") props.object = props.obdata = props.material = True - props.animation = False + props.animation = props.obdata_animation = False props = layout.operator("object.make_single_user", text="Materials") props.material = True - props.object = props.obdata = props.animation = False + props.object = props.obdata = props.animation = props.obdata_animation = False props = layout.operator("object.make_single_user", text="Object Animation") props.animation = True - props.object = props.obdata = props.material = False + props.object = props.obdata = props.material = props.obdata_animation = False + + props = layout.operator("object.make_single_user", text="Object Data Animation") + props.obdata_animation = props.obdata = True + props.object = props.material = props.animation = False class VIEW3D_MT_object_convert(Menu): @@ -3129,7 +3133,6 @@ class VIEW3D_MT_mask(Menu): layout.menu("VIEW3D_MT_random_mask", text="Random Mask") - class VIEW3D_MT_face_sets(Menu): bl_label = "Face Sets" @@ -3259,6 +3262,7 @@ class VIEW3D_MT_random_mask(Menu): op = layout.operator("sculpt.mask_init", text='Per Loose Part') op.mode = 'RANDOM_PER_LOOSE_PART' + class VIEW3D_MT_particle(Menu): bl_label = "Particle" diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index bc385faf378..46fed79332d 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1731,7 +1731,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_paint_falloff(GreasePencilBrushFalloff from bl_ui.space_toolsystem_common import ToolSelectPanelHelper tool = ToolSelectPanelHelper.tool_active_from_context(context) - if tool and tool.idname != 'builtin_brush.Tint': + if tool and tool.idname != 'builtin_brush.Tint': return False gptool = brush.gpencil_tool @@ -2057,7 +2057,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_mixcolor(View3DPanel, Panel): from bl_ui.space_toolsystem_common import ToolSelectPanelHelper tool = ToolSelectPanelHelper.tool_active_from_context(context) - if tool and tool.idname in('builtin.cutter', 'builtin.eyedropper', 'builtin.interpolate'): + if tool and tool.idname in {'builtin.cutter', 'builtin.eyedropper', 'builtin.interpolate'}: return False if brush.gpencil_tool == 'TINT': @@ -2118,7 +2118,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_mix_palette(View3DPanel, Panel): from bl_ui.space_toolsystem_common import ToolSelectPanelHelper tool = ToolSelectPanelHelper.tool_active_from_context(context) - if tool and tool.idname in('builtin.cutter', 'builtin.eyedropper', 'builtin.interpolate'): + if tool and tool.idname in {'builtin.cutter', 'builtin.eyedropper', 'builtin.interpolate'}: return False if brush.gpencil_tool == 'TINT': diff --git a/release/scripts/startup/keyingsets_builtins.py b/release/scripts/startup/keyingsets_builtins.py index 2fc2d966ea9..ceffeaaff6c 100644 --- a/release/scripts/startup/keyingsets_builtins.py +++ b/release/scripts/startup/keyingsets_builtins.py @@ -383,6 +383,7 @@ class BUILTIN_KSI_Available(KeyingSetInfo): ############################### + class WholeCharacterMixin: # these prefixes should be avoided, as they are not really bones # that animators should be touching (or need to touch) diff --git a/release/scripts/startup/nodeitems_builtins.py b/release/scripts/startup/nodeitems_builtins.py index b25d2be7de0..d617cfab988 100644 --- a/release/scripts/startup/nodeitems_builtins.py +++ b/release/scripts/startup/nodeitems_builtins.py @@ -506,6 +506,7 @@ geometry_node_categories = [ NodeItem("GeometryNodeCurveResample"), NodeItem("GeometryNodeMeshToCurve"), NodeItem("GeometryNodeCurveToPoints"), + NodeItem("GeometryNodeCurveEndpoints"), NodeItem("GeometryNodeCurveLength"), NodeItem("GeometryNodeCurveReverse"), ]), @@ -515,6 +516,7 @@ geometry_node_categories = [ NodeItem("GeometryNodeCurveStar"), NodeItem("GeometryNodeCurveSpiral"), NodeItem("GeometryNodeCurveQuadraticBezier"), + NodeItem("GeometryNodeCurvePrimitiveQuadrilateral"), NodeItem("GeometryNodeCurvePrimitiveBezierSegment"), ]), GeometryNodeCategory("GEO_GEOMETRY", "Geometry", items=[ @@ -546,7 +548,7 @@ geometry_node_categories = [ NodeItem("GeometryNodeTriangulate"), NodeItem("GeometryNodeEdgeSplit"), NodeItem("GeometryNodeSubdivisionSurface"), - NodeItem("GeometryNodeSubdivide"), + NodeItem("GeometryNodeMeshSubdivide"), ]), GeometryNodeCategory("GEO_PRIMITIVES_MESH", "Mesh Primitives", items=[ NodeItem("GeometryNodeMeshCircle"), @@ -558,6 +560,7 @@ geometry_node_categories = [ NodeItem("GeometryNodeMeshLine"), NodeItem("GeometryNodeMeshUVSphere"), ]), + GeometryNodeCategory("GEO_POINT", "Point", items=[ NodeItem("GeometryNodePointDistribute"), NodeItem("GeometryNodePointInstance"), diff --git a/release/scripts/templates_py/image_processing.py b/release/scripts/templates_py/image_processing.py index 2392faf440c..ab14436ad8e 100644 --- a/release/scripts/templates_py/image_processing.py +++ b/release/scripts/templates_py/image_processing.py @@ -20,9 +20,9 @@ input_image.pixels.foreach_get(pixel_data.ravel()) # Do whatever image processing you want using numpy here: # Example 1: Inverse red green and blue channels. -pixel_data[:,:,:3] = 1.0 - pixel_data[:,:,:3] +pixel_data[:, :, :3] = 1.0 - pixel_data[:, :, :3] # Example 2: Change gamma on the red channel. -pixel_data[:,:,0] = np.power(pixel_data[:,:,0], 1.5) +pixel_data[:, :, 0] = np.power(pixel_data[:, :, 0], 1.5) # Create output image. if output_image_name in bpy.data.images: diff --git a/release/scripts/templates_py/operator_mesh_add.py b/release/scripts/templates_py/operator_mesh_add.py index aa5b9ebf880..3fc7636459b 100644 --- a/release/scripts/templates_py/operator_mesh_add.py +++ b/release/scripts/templates_py/operator_mesh_add.py @@ -6,6 +6,7 @@ from bpy.props import ( FloatProperty, ) + def add_box(width, height, depth): """ This function takes inputs and returns vertex and face arrays. |