Browse Source

Merge pull request #435 from Jrius/waveset_fix

Fix waveset export
master
Adam Johnson 2 weeks ago committed by GitHub
parent
commit
67b7b58e61
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      korman/properties/modifiers/water.py
  2. 5
      korman/ui/modifiers/water.py

6
korman/properties/modifiers/water.py

@ -186,9 +186,6 @@ class PlasmaWaterModifier(idprops.IDPropMixin, PlasmaModifierProperties, bpy.typ
description="Object whose Y axis represents the wind direction and whose Z axis represents the water height", description="Object whose Y axis represents the wind direction and whose Z axis represents the water height",
type=bpy.types.Object, type=bpy.types.Object,
poll=idprops.poll_empty_objects) poll=idprops.poll_empty_objects)
wind_speed = FloatProperty(name="Wind Speed",
description="Magnitude of the wind",
default=1.0)
envmap = PointerProperty(name="EnvMap", envmap = PointerProperty(name="EnvMap",
description="Texture defining an environment map for this water object", description="Texture defining an environment map for this water object",
type=bpy.types.Texture, type=bpy.types.Texture,
@ -247,6 +244,9 @@ class PlasmaWaterModifier(idprops.IDPropMixin, PlasmaModifierProperties, bpy.typ
if self.wind_object is not None: if self.wind_object is not None:
waveset.refObj = exporter.mgr.find_create_key(plSceneObject, bl=self.wind_object) waveset.refObj = exporter.mgr.find_create_key(plSceneObject, bl=self.wind_object)
waveset.setFlag(plWaveSet7.kHasRefObject, True) waveset.setFlag(plWaveSet7.kHasRefObject, True)
matrix = self.wind_object.matrix_world
# Store the wind direction to keep our PRP pretty. Plasma doesn't give a damn and will recompute this at runtime anyway.
wind_dir = hsVector3(matrix[1][0], matrix[1][1], matrix[1][2])
else: else:
# Stolen shamelessly from PyPRP # Stolen shamelessly from PyPRP
wind_dir = hsVector3(0.0871562, 0.996195, 0.0) wind_dir = hsVector3(0.0871562, 0.996195, 0.0)

5
korman/ui/modifiers/water.py

@ -59,10 +59,7 @@ def swimregion(modifier, layout, context):
def water_basic(modifier, layout, context): def water_basic(modifier, layout, context):
layout.prop(modifier, "wind_object") layout.prop(modifier, "wind_object")
layout.prop(modifier, "envmap") layout.prop(modifier, "envmap")
layout.prop(modifier, "envmap_radius")
row = layout.row()
row.prop(modifier, "wind_speed")
row.prop(modifier, "envmap_radius")
layout.separator() layout.separator()
split = layout.split() split = layout.split()

Loading…
Cancel
Save