diff --git a/korman/exporter/camera.py b/korman/exporter/camera.py index d2c5b5f..8c042cf 100644 --- a/korman/exporter/camera.py +++ b/korman/exporter/camera.py @@ -97,6 +97,10 @@ class CameraConverter: continue cam_trans = plCameraModifier.CamTrans() if manual_trans.camera: + # Don't even bother if a disabled camera is referenced. If we export camera modifier + # for a disabled camera, then it won't get a brain, and the client will crash. + if not manual_trans.camera.plasma_object.enabled: + continue cam_trans.transTo = self._mgr.find_create_key(plCameraModifier, bl=manual_trans.camera) cam_trans.ignore = manual_trans.mode == "ignore" diff --git a/korman/exporter/material.py b/korman/exporter/material.py index 04702fb..fd201bc 100644 --- a/korman/exporter/material.py +++ b/korman/exporter/material.py @@ -770,6 +770,8 @@ class MaterialConverter: # least a SceneObject and CoordInterface so that we can touch it... # NOTE: that harvest_actor makes sure everyone alread knows we're going to have a CI if isinstance(viewpt.data, bpy.types.Camera): + if not viewpt.plasma_object.enabled: + raise ExportError(f"DynamicCamMap '{texture.name} wants to use the camera '{viewpt.name}', but it is not a Plasma Object!") pl_env.camera = self._mgr.find_create_key(plCameraModifier, bl=viewpt) else: pl_env.rootNode = self._mgr.find_create_key(plSceneObject, bl=viewpt)