From 69d77f77ec4ee67c7d4f67fb6286cd0a32526107 Mon Sep 17 00:00:00 2001 From: Jrius <2261279+Jrius@users.noreply.github.com> Date: Thu, 9 Jan 2025 14:21:34 +0100 Subject: [PATCH 1/2] Fix waveset export --- korman/properties/modifiers/water.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/korman/properties/modifiers/water.py b/korman/properties/modifiers/water.py index 45f8196..82605c3 100644 --- a/korman/properties/modifiers/water.py +++ b/korman/properties/modifiers/water.py @@ -247,6 +247,9 @@ class PlasmaWaterModifier(idprops.IDPropMixin, PlasmaModifierProperties, bpy.typ if self.wind_object is not None: waveset.refObj = exporter.mgr.find_create_key(plSceneObject, bl=self.wind_object) waveset.setFlag(plWaveSet7.kHasRefObject, True) + speed = self.wind_speed + matrix = self.wind_object.matrix_world + wind_dir = hsVector3(matrix[1][0] * speed, matrix[1][1] * speed, matrix[1][2] * speed) else: # Stolen shamelessly from PyPRP wind_dir = hsVector3(0.0871562, 0.996195, 0.0) From a9c5fcd4feb18ec09e0d1acd93f14d3a862620a3 Mon Sep 17 00:00:00 2001 From: Jrius <2261279+Jrius@users.noreply.github.com> Date: Thu, 9 Jan 2025 20:00:42 +0100 Subject: [PATCH 2/2] Remove unused wind speed --- korman/properties/modifiers/water.py | 7 ++----- korman/ui/modifiers/water.py | 5 +---- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/korman/properties/modifiers/water.py b/korman/properties/modifiers/water.py index 82605c3..0bc83e4 100644 --- a/korman/properties/modifiers/water.py +++ b/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", type=bpy.types.Object, poll=idprops.poll_empty_objects) - wind_speed = FloatProperty(name="Wind Speed", - description="Magnitude of the wind", - default=1.0) envmap = PointerProperty(name="EnvMap", description="Texture defining an environment map for this water object", type=bpy.types.Texture, @@ -247,9 +244,9 @@ class PlasmaWaterModifier(idprops.IDPropMixin, PlasmaModifierProperties, bpy.typ if self.wind_object is not None: waveset.refObj = exporter.mgr.find_create_key(plSceneObject, bl=self.wind_object) waveset.setFlag(plWaveSet7.kHasRefObject, True) - speed = self.wind_speed matrix = self.wind_object.matrix_world - wind_dir = hsVector3(matrix[1][0] * speed, matrix[1][1] * speed, matrix[1][2] * speed) + # 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: # Stolen shamelessly from PyPRP wind_dir = hsVector3(0.0871562, 0.996195, 0.0) diff --git a/korman/ui/modifiers/water.py b/korman/ui/modifiers/water.py index 08313b9..d041f8f 100644 --- a/korman/ui/modifiers/water.py +++ b/korman/ui/modifiers/water.py @@ -59,10 +59,7 @@ def swimregion(modifier, layout, context): def water_basic(modifier, layout, context): layout.prop(modifier, "wind_object") layout.prop(modifier, "envmap") - - row = layout.row() - row.prop(modifier, "wind_speed") - row.prop(modifier, "envmap_radius") + layout.prop(modifier, "envmap_radius") layout.separator() split = layout.split()