2026-02-16
This commit is contained in:
@@ -109,8 +109,10 @@ def get_addon_installation_status(asset_data):
|
||||
if not is_enabled:
|
||||
extension_module_name = f"bl_ext.www_blenderkit_com.{extension_id}"
|
||||
is_enabled = extension_module_name in enabled_addons
|
||||
bk_logger.info(
|
||||
f"Checking extension format: {extension_module_name} -> enabled: {is_enabled}"
|
||||
bk_logger.debug(
|
||||
"Checking extension format: %s -> enabled: %s",
|
||||
extension_module_name,
|
||||
is_enabled,
|
||||
)
|
||||
|
||||
# Also try other possible repository name formats
|
||||
@@ -210,10 +212,15 @@ def get_addon_installation_status(asset_data):
|
||||
if "blenderkit" in addon.lower() or addon.endswith(extension_id)
|
||||
]
|
||||
if blenderkit_addons:
|
||||
bk_logger.info(f"Found BlenderKit-related enabled addons: {blenderkit_addons}")
|
||||
bk_logger.debug(
|
||||
"Found BlenderKit-related enabled addons: %s", blenderkit_addons
|
||||
)
|
||||
|
||||
bk_logger.info(
|
||||
f"Addon status check for '{extension_id}': installed={is_installed}, enabled={is_enabled}"
|
||||
bk_logger.debug(
|
||||
"Addon status check for '%s': installed=%s, enabled=%s",
|
||||
extension_id,
|
||||
is_installed,
|
||||
is_enabled,
|
||||
)
|
||||
|
||||
return {
|
||||
@@ -877,8 +884,13 @@ def append_asset(asset_data, **kwargs): # downloaders=[], location=None,
|
||||
if asset_blender_version < (4, 3, 0) and bpy.app.version >= (4, 3, 0):
|
||||
brush.asset_clear()
|
||||
brush.asset_mark()
|
||||
brush.icon_filepath = asset_thumb_path
|
||||
|
||||
if bpy.app.version <= (4, 5, 0):
|
||||
brush.icon_filepath = asset_thumb_path
|
||||
else:
|
||||
# load asset thumbnail into brush if it's not already present
|
||||
if brush.preview is None:
|
||||
with bpy.context.temp_override(id=brush):
|
||||
bpy.ops.ed.lib_id_load_custom_preview(filepath=asset_thumb_path)
|
||||
# set the brush active
|
||||
if bpy.context.view_layer.objects.active.mode == "SCULPT":
|
||||
if bpy.app.version < (4, 3, 0):
|
||||
@@ -897,7 +909,6 @@ def append_asset(asset_data, **kwargs): # downloaders=[], location=None,
|
||||
relative_asset_identifier=f"Brush{os.sep}{brush.name}"
|
||||
)
|
||||
# TODO add grease pencil brushes!
|
||||
|
||||
# bpy.context.tool_settings.image_paint.brush = brush
|
||||
asset_main = brush
|
||||
|
||||
|
||||
Reference in New Issue
Block a user