When using the Panda3D loader to load .blend files, it would be nice to support a way to override the blend2bam.common.Settings properties for an app (e.g., to specify 'copy' textures mode as default, etc.).
This is possible with some monkeypatching, and this would have to be done from any entry point (a main.py as well as a setup.py, etc.), but maybe could be done by making Settings() act like a Singleton that can be configured before calling base.loader.loadModel().
Example of monkeypatching that seems to work:
from dataclasses import dataclass
import blend2bam.common
@dataclass
class Blend2BamSettings(blend2bam.common.Settings):
textures: str = "copy"
blend2bam.common.Settings = Blend2BamSettings
When using the Panda3D loader to load .blend files, it would be nice to support a way to override the blend2bam.common.Settings properties for an app (e.g., to specify 'copy' textures mode as default, etc.).
This is possible with some monkeypatching, and this would have to be done from any entry point (a main.py as well as a setup.py, etc.), but maybe could be done by making Settings() act like a Singleton that can be configured before calling base.loader.loadModel().
Example of monkeypatching that seems to work: