Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add noise base frequency option #20

Merged
merged 1 commit into from
Nov 2, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add noise base frequency option
  • Loading branch information
jaelpark committed Nov 1, 2016
commit ceded05092e6193afc914167ce293d8f4725814c
5 changes: 3 additions & 2 deletions blender/addons/mira_tools/mi_noise.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class MI_Noise(bpy.types.Operator):
default = 'Turbulence'
)

frequency = FloatProperty(default=1.0)
intensity = FloatProperty(default=1.0)
offset_x = FloatProperty(default=0.0)
offset_y = FloatProperty(default=0.0)
Expand Down Expand Up @@ -86,7 +87,7 @@ def noise_obj(obj, context, self):
verts = [v for v in bm.verts if v.hide is False]

for vert in verts:
noise_pos = vert.co.copy()
noise_pos = self.frequency * vert.co.copy()
noise_pos.x += self.offset_x
noise_pos.z += self.offset_y
noise_pos.z += self.offset_z
Expand All @@ -103,4 +104,4 @@ def noise_obj(obj, context, self):
vert.co += vert_offset * self.intensity

bm.normal_update()
bmesh.update_edit_mesh(obj.data)
bmesh.update_edit_mesh(obj.data)