Skip to content

Commit 67b7b58

Browse files
authored
Merge pull request #435 from Jrius/waveset_fix
Fix waveset export
2 parents edf4e0e + a9c5fcd commit 67b7b58

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

korman/properties/modifiers/water.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,6 @@ class PlasmaWaterModifier(idprops.IDPropMixin, PlasmaModifierProperties, bpy.typ
186186
description="Object whose Y axis represents the wind direction and whose Z axis represents the water height",
187187
type=bpy.types.Object,
188188
poll=idprops.poll_empty_objects)
189-
wind_speed = FloatProperty(name="Wind Speed",
190-
description="Magnitude of the wind",
191-
default=1.0)
192189
envmap = PointerProperty(name="EnvMap",
193190
description="Texture defining an environment map for this water object",
194191
type=bpy.types.Texture,
@@ -247,6 +244,9 @@ def export(self, exporter, bo, so):
247244
if self.wind_object is not None:
248245
waveset.refObj = exporter.mgr.find_create_key(plSceneObject, bl=self.wind_object)
249246
waveset.setFlag(plWaveSet7.kHasRefObject, True)
247+
matrix = self.wind_object.matrix_world
248+
# Store the wind direction to keep our PRP pretty. Plasma doesn't give a damn and will recompute this at runtime anyway.
249+
wind_dir = hsVector3(matrix[1][0], matrix[1][1], matrix[1][2])
250250
else:
251251
# Stolen shamelessly from PyPRP
252252
wind_dir = hsVector3(0.0871562, 0.996195, 0.0)

korman/ui/modifiers/water.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,7 @@ def swimregion(modifier, layout, context):
5959
def water_basic(modifier, layout, context):
6060
layout.prop(modifier, "wind_object")
6161
layout.prop(modifier, "envmap")
62-
63-
row = layout.row()
64-
row.prop(modifier, "wind_speed")
65-
row.prop(modifier, "envmap_radius")
62+
layout.prop(modifier, "envmap_radius")
6663
layout.separator()
6764

6865
split = layout.split()

0 commit comments

Comments
 (0)