2025-12-01

This commit is contained in:
2026-03-17 14:58:51 -06:00
parent 183e865f8b
commit 4b82b57113
6846 changed files with 954887 additions and 162606 deletions
+46 -13
View File
@@ -18,6 +18,7 @@
from bpy.props import (
EnumProperty,
FloatProperty,
PointerProperty,
StringProperty,
@@ -26,6 +27,17 @@ import bpy.utils.previews
from .modules.poliigon_core.multilingual import _t
from .preferences_map_prefs import MapPrefProperties
from . import ui
def update_thumb_size(self, context):
if ui.cTB:
ui.cTB.settings["thumbsize"] = self.thumbnail_size
def update_assets_per_page(self, context):
if ui.cTB:
ui.cTB.settings["page"] = int(self.assets_per_page)
class PoliigonUserProps(bpy.types.PropertyGroup):
@@ -45,22 +57,45 @@ class PoliigonUserProps(bpy.types.PropertyGroup):
options={"HIDDEN", "SKIP_SAVE"}, # noqa: F821
subtype="PASSWORD", # noqa: F821
)
search_poliigon: StringProperty(
search: StringProperty(
name="", # noqa: F722
default="", # noqa: F722
description=_t("Search Poliigon Assets"), # noqa: F722
description=_t("Search Assets"), # noqa: F722
options={"SKIP_SAVE"}, # noqa: F821
)
search_my_assets: StringProperty(
name="", # noqa: F722
default="", # noqa: F722
description=_t("Search My Assets"), # noqa: F722
options={"SKIP_SAVE"}, # noqa: F821
thumbnail_size: EnumProperty(
name="Thumbnail Size", # noqa: F722
description="Set the thumbnail size for assets in the asset browser", # noqa: F722
items=[
('Tiny', "Tiny", "Tiny thumbnail size", "_BLANK", 1), # noqa: F821, F722
('Small', "Small", "Small thumbnail size", "_BLANK", 2), # noqa: F821, F722
('Medium', "Medium", "Medium thumbnail size", "_BLANK", 3), # noqa: F821, F722
('Large', "Large", "Large thumbnail size", "_BLANK", 4), # noqa: F821, F722
('Huge', "Huge", "Huge thumbnail size", "_BLANK", 5), # noqa: F821, F722
],
default='Medium', # noqa: F821
update=update_thumb_size,
)
search_imported: StringProperty(
assets_per_page: EnumProperty(
name="Assets Per Page", # noqa: F722
description="Set the number of assets to display per page", # noqa: F722
items=[
('6', "6", "6 assets per page", "_BLANK", 1), # noqa: F821, F722
('8', "8", "8 assets per page", "_BLANK", 2), # noqa: F821, F722
('10', "10", "10 assets per page", "_BLANK", 3), # noqa: F821, F722
('20', "20", "20 assets per page", "_BLANK", 4), # noqa: F821, F722
],
default='10', # noqa: F821
update=update_assets_per_page,
)
# Onboarding survey properties
onboarding_email_preference: bpy.props.BoolProperty(
name="", # noqa: F722
default="", # noqa: F722
description=_t("Search Imported Assets"), # noqa: F722
default=True, # noqa: F722
description=_t("Send emails about new assets and product updates"), # noqa: F722
options={"SKIP_SAVE"}, # noqa: F821
)
@@ -169,12 +204,10 @@ def register():
bpy.types.Object.poliigon_lod = StringProperty(default="", options={"HIDDEN"})
bpy.types.Image.poliigon = StringProperty(default="", options={"HIDDEN"})
bpy.context.window_manager.poliigon_props.search = ""
bpy.context.window_manager.poliigon_props.vEmail = ""
bpy.context.window_manager.poliigon_props.vPassShow = ""
bpy.context.window_manager.poliigon_props.vPassHide = ""
bpy.context.window_manager.poliigon_props.search_poliigon = ""
bpy.context.window_manager.poliigon_props.search_my_assets = ""
bpy.context.window_manager.poliigon_props.search_imported = ""
def unregister():