4.3 Compatibility & Editable Hotkeys #1

Merged
Demeter Dzadik merged 4 commits from demeters_branch into main 2024-08-15 12:47:59 +02:00
4 changed files with 13 additions and 7 deletions
Showing only changes of commit 8cc8b274ca - Show all commits

View File

@ -2,12 +2,10 @@
#
# SPDX-License-Identifier: GPL-2.0-or-later
# Contributed to by meta-androcto, pitiwazou, chromoly, italic, kc98
bl_info = {
"name":"3D Viewport Pie Menus",
"description": "A set of handy pie menus to enhance various workflows",
"author": "pitiwazou, meta-androcto",
"author": "pitiwazou, meta-androcto, Demeter Dzadik",
"version": (1, 4, 1),
"blender": (2, 8, 0),
"location": "See Add-on Preferences for shortcut list",

View File

@ -9,6 +9,14 @@ tags = ["User Interface"]
blender_version_min = "4.2.0"
license = ["SPDX:GPL-2.0-or-later"]
website = "https://projects.blender.org/extensions/space_view3d_pie_menus"
copyright = ["2024 meta-androcto"]
copyright = [
"2024 Demeter Dzadik",
"2016-2022 meta-androcto",
"2016-2022 pitiwazou",
"2016-2022 chromoly",
"2016-2022 italic",
"2016-2022 kc98",
"2016-2022 saidenka",
]
[permissions]
files = "To load brush icons from disk"

View File

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: GPL-2.0-or-later
import os
import bpy
from bpy.types import Menu
from pathlib import Path
@ -105,7 +105,7 @@ def draw_brush_operator(layout, brush_name: str, brush_icon: str):
)
op.asset_library_type = 'ESSENTIALS'
op.relative_asset_identifier = (
"brushes\\essentials_brushes.blend\\Brush\\" + brush_name
os.path.join("brushes", "essentials_brushes.blend", "Brush", brush_name)
Mets marked this conversation as resolved Outdated

Non-portable backslashes here as well. Causes incorrect filepaths on some systems.

Use os here and let it handle that

os.path.join("brushes", "essentials_brushes.blend", "Brush")

Not sure but I THINK it should recognize blend file as a directory, I remember that being the case.

Non-portable backslashes here as well. Causes incorrect filepaths on some systems. Use `os` here and let it handle that ``` os.path.join("brushes", "essentials_brushes.blend", "Brush") ``` Not sure but I THINK it should recognize blend file as a directory, I remember that being the case.

Great point, fixed!

Great point, fixed!
)
else:
# Pre-4.3

View File

@ -224,7 +224,7 @@ def register():
)
register_hotkey(
'wm.call_menu_pie',
op_kwargs={'name': 'PIE_MT_selectionsom'},
op_kwargs={'name': 'PIE_MT_selectionsem'},
hotkey_kwargs={'type': "A", 'value': "PRESS"},
key_cat="Mesh",
)