"""
Entry point for blender-mcp package (for direct execution).
Note: When installed via uvx, the entry point is defined in pyproject.toml:
[project.scripts]
blender-mcp = "blender_mcp.server:main"
This main.py is for local development/testing with `python main.py`
"""
if __name__ == "__main__":
import sys
from pathlib import Path
# For local development, add src to path and set it as the blender_mcp package
src_path = Path(__file__).parent / "src"
sys.path.insert(0, str(src_path.parent))
# Create blender_mcp module namespace pointing to src/
import sys
import types
# Load src/__init__.py as blender_mcp
blender_mcp = types.ModuleType("blender_mcp")
blender_mcp.__file__ = str(src_path / "__init__.py")
blender_mcp.__path__ = [str(src_path)]
blender_mcp.__package__ = "blender_mcp"
sys.modules["blender_mcp"] = blender_mcp
# Now we can import from blender_mcp
exec(open(src_path / "__init__.py").read(), blender_mcp.__dict__)
# Import and run the server
from blender_mcp.server import main
main()