Move operators and preferences out of __init__.py into dedicated modules. Fix cyclic import by using proper AddonPreferences pattern. Replace implicit .zip extension detection in CLI with explicit -z/--zip flag. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
28 lines
740 B
Python
28 lines
740 B
Python
import bpy
|
|
from bpy.types import AddonPreferences
|
|
from bpy.props import BoolProperty, StringProperty
|
|
|
|
|
|
class BATPreferences(AddonPreferences):
|
|
bl_idname = "blender_asset_tracer"
|
|
|
|
use_env_root: BoolProperty(
|
|
name="Use Environment Variable for Root",
|
|
description="Read the project root from ZIP_ROOT or PROJECT_ROOT environment variables",
|
|
default=False,
|
|
)
|
|
|
|
root_default: StringProperty(
|
|
name="Default Root",
|
|
description="Fallback project root when the environment variable is not set",
|
|
default="",
|
|
subtype="DIR_PATH",
|
|
)
|
|
|
|
def draw(self, context):
|
|
layout = self.layout
|
|
layout.prop(self, "use_env_root")
|
|
layout.prop(self, "root_default")
|
|
|
|
|