Browse Source

Fix #116

pull/125/head
Adam Johnson 6 years ago
parent
commit
742baf338e
Signed by: Hoikas
GPG Key ID: 0B6515D6FF6F271E
  1. 13
      korman/exporter/material.py

13
korman/exporter/material.py

@ -519,9 +519,10 @@ class MaterialConverter:
# It matters not whether or not the viewpoint object is a Plasma Object, it is exported as at # It matters not whether or not the viewpoint object is a Plasma Object, it is exported as at
# least a SceneObject and CoordInterface so that we can touch it... # 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 # NOTE: that harvest_actor makes sure everyone alread knows we're going to have a CI
root = self._mgr.find_create_key(plSceneObject, bl=viewpt) if isinstance(viewpt.data, bpy.types.Camera):
pl_env.rootNode = root # FIXME: DCM camera pl_env.camera = self._mgr.find_create_key(plCameraModifier, bl=viewpt)
# FIXME: DynamicCamMap Camera else:
pl_env.rootNode = self._mgr.find_create_key(plSceneObject, bl=viewpt)
pl_env.addTargetNode(self._mgr.find_key(plSceneObject, bl=bo)) pl_env.addTargetNode(self._mgr.find_key(plSceneObject, bl=bo))
pl_env.addMatLayer(layer.key) pl_env.addMatLayer(layer.key)
@ -542,6 +543,12 @@ class MaterialConverter:
else: else:
faces = pl_env.faces + (pl_env,) faces = pl_env.faces + (pl_env,)
# If the user specifies a camera object, this might be worthy of a notice.
if viewpt.type == "CAMERA":
warn = self._report.port if bl_env.mapping == "PLANE" else self._report.warn
warn("Environment Map '{}' is exporting as a cube map. The viewpoint '{}' is a camera, but only its position will be used.",
bl_env.name, viewpt.name)
# DEMs can do just a position vector. We actually prefer this because the WaveSet exporter # DEMs can do just a position vector. We actually prefer this because the WaveSet exporter
# will probably want to steal it for diabolical purposes... # will probably want to steal it for diabolical purposes...
pl_env.position = hsVector3(*viewpt.location) pl_env.position = hsVector3(*viewpt.location)

Loading…
Cancel
Save