FreeCAD workbench for Silo PLM integration. Uses shared silo-client package (submodule) for API communication. Changes from monorepo version: - SiloClient class removed, imported from silo_client package - FreeCADSiloSettings adapter wraps FreeCAD.ParamGet() preferences - Init.py adds silo-client to sys.path at startup - All command classes and UI unchanged
16 lines
527 B
Python
16 lines
527 B
Python
"""Silo FreeCAD Workbench - Console initialization.
|
|
|
|
This file is loaded when FreeCAD starts (even in console mode).
|
|
The GUI-specific initialization is in InitGui.py.
|
|
"""
|
|
|
|
import os
|
|
import sys
|
|
|
|
# Add the shared silo-client package to sys.path so that
|
|
# ``import silo_client`` works from silo_commands.py.
|
|
_mod_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
_client_dir = os.path.join(_mod_dir, "silo-client")
|
|
if os.path.isdir(_client_dir) and _client_dir not in sys.path:
|
|
sys.path.insert(0, _client_dir)
|