Skip to content

Commit

Permalink
Rename to amplitude and update defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
johnroper100 committed Jul 29, 2017
1 parent 6f1faaf commit cdc510d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions cm_bpyNodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ class NewInputNode(LogicNode):
("AGENTRANDOM", "Agent Random", "", 2),
("SINWAVE", "Sine Wave", "", 3)])

SineWaveSpeed = IntProperty(name="Sine Wave Speed", default=5)
SineWaveAmplitude = FloatProperty(name="Amplitude", default=5.0)

PathName = StringProperty(name="Path Name")
PathOptions = EnumProperty(name="Path Options",
Expand Down Expand Up @@ -285,7 +285,7 @@ def draw_buttons(self, context, layout):
elif self.InputSource == "NOISE":
layout.prop(self, "NoiseOptions")
if self.NoiseOptions == "SINWAVE":
layout.prop(self, "SineWaveSpeed")
layout.prop(self, "SineWaveAmplitude")
elif self.InputSource == "PATH":
layout.prop_search(
self, "PathName", context.scene.cm_paths, "coll")
Expand Down Expand Up @@ -342,7 +342,7 @@ def getSettings(self, node):
node.settings["GroundAheadOffset"] = self.GroundAheadOffset
elif self.InputSource == "NOISE":
node.settings["NoiseOptions"] = self.NoiseOptions
node.settings["SineWaveSpeed"] = self.SineWaveSpeed
node.settings["SineWaveAmplitude"] = self.SineWaveAmplitude
elif self.InputSource == "PATH":
node.settings["PathName"] = self.PathName
node.settings["PathOptions"] = self.PathOptions
Expand Down
4 changes: 2 additions & 2 deletions cm_channels/cm_noiseChannels.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ def agentRandom(self, offset=0):
return result

@timeChannel("Noise")
def sinWave(self, ss=5):
def sinWave(self, swa=5):
"""Returns a sine wave section in range -1 - 1 based on the current frame"""
return np.cos(bpy.context.scene.frame_current * 3.14 / ss)
return np.cos(bpy.context.scene.frame_current * 3.14 / swa)
2 changes: 1 addition & 1 deletion cm_nodeFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def core(self, inps, settings):
elif settings["NoiseOptions"] == "AGENTRANDOM":
return {"None": noise.agentRandom(offset=hash(self))}
elif settings["NoiseOptions"] == "SINWAVE":
return {"None": noise.sinWave(self.settings["SineWaveSpeed"])}
return {"None": noise.sinWave(self.settings["SineWaveAplitude"])}

elif settings["InputSource"] == "PATH":
if settings["PathOptions"] == "RZ":
Expand Down

0 comments on commit cdc510d

Please sign in to comment.