Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-07-24 18:30:13 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-07-24 18:30:13 +0300
commit5bf39c3cfb72f7b1b79c847ac9f6f0804f813868 (patch)
tree613e3a6edcc7a62c914c5e1c5a1aff0a5b05d021 /ant_landscape
parentc992b17be98e245d1d2c7a7ecb557241e10b6f32 (diff)
Cleanup: trailing spaces
Diffstat (limited to 'ant_landscape')
-rw-r--r--ant_landscape/__init__.py4
-rw-r--r--ant_landscape/ant_functions.py2
-rw-r--r--ant_landscape/ant_noise.py18
-rw-r--r--ant_landscape/eroder.py16
4 files changed, 20 insertions, 20 deletions
diff --git a/ant_landscape/__init__.py b/ant_landscape/__init__.py
index c8e9fb92..e4ae01d1 100644
--- a/ant_landscape/__init__.py
+++ b/ant_landscape/__init__.py
@@ -178,7 +178,7 @@ class AntNoiseSettingsPanel(bpy.types.Panel):
col.scale_y = 1.5
if ant.sphere_mesh:
col.operator('mesh.ant_landscape_regenerate', text="Regenerate", icon="LOOP_FORWARDS")
- else:
+ else:
col.operator('mesh.ant_landscape_refresh', text="Refresh", icon="FILE_REFRESH")
box.prop(ant, "noise_type")
@@ -376,7 +376,7 @@ class AntDisplaceSettingsPanel(bpy.types.Panel):
col.scale_y = 1.5
if ant.sphere_mesh:
col.operator('mesh.ant_landscape_regenerate', text="Regenerate", icon="LOOP_FORWARDS")
- else:
+ else:
col.operator('mesh.ant_landscape_refresh', text="Refresh", icon="FILE_REFRESH")
col = box.column(align=True)
diff --git a/ant_landscape/ant_functions.py b/ant_landscape/ant_functions.py
index c566617d..3b515933 100644
--- a/ant_landscape/ant_functions.py
+++ b/ant_landscape/ant_functions.py
@@ -316,7 +316,7 @@ class AntLandscapeRegenerate(bpy.types.Operator):
# Delete old object
new_ob.select = False
-
+
obj.select = True
scene.objects.active = obj
bpy.ops.object.delete(use_global=False)
diff --git a/ant_landscape/ant_noise.py b/ant_landscape/ant_noise.py
index 78c8b770..fdec9b87 100644
--- a/ant_landscape/ant_noise.py
+++ b/ant_landscape/ant_noise.py
@@ -165,7 +165,7 @@ def marble_noise(x, y, z, origin, size, shape, bias, sharpnes, turb, depth, hard
return value
-# vl_noise_turbulence:
+# vl_noise_turbulence:
def vlnTurbMode(coords, distort, basis, vlbasis, hardnoise):
# hard noise
if hardnoise:
@@ -348,10 +348,10 @@ def Effect_Basis_Function(coords, type, bias):
## zigzag:
elif type == 3:
effect = offset + iscale * Bias_Types[bias](offset + iscale * sin(x * pi + sin(y * pi)))
- ## wavy:
+ ## wavy:
elif type == 4:
effect = offset + iscale * (Bias_Types[bias](cos(x) + sin(y) + cos(x * 2 + y * 2) - sin(-x * 4 + y * 4)))
- ## sine bump:
+ ## sine bump:
elif type == 5:
effect = offset + iscale * 1 - Bias_Types[bias]((sin(x * pi) + sin(y * pi)))
## dots:
@@ -366,13 +366,13 @@ def Effect_Basis_Function(coords, type, bias):
## square / piramide:
elif type == 9:
effect = offset + iscale * Bias_Types[bias](1.0 - sqrt((x * x)**10 + (y * y)**10)**0.1)
- ## blocks:
+ ## blocks:
elif type == 10:
effect = (0.5 - max(Bias_Types[bias](x * pi) , Bias_Types[bias](y * pi)))
if effect > 0.0:
effect = 1.0
effect = offset + iscale * effect
- ## grid:
+ ## grid:
elif type == 11:
effect = (0.025 - min(Bias_Types[bias](x * pi), Bias_Types[bias](y * pi)))
if effect > 0.0:
@@ -446,7 +446,7 @@ def Effect_Basis_Function(coords, type, bias):
return effect
-# fractalize Effect_Basis_Function: ------------------------------
+# fractalize Effect_Basis_Function: ------------------------------
def Effect_Function(coords, type, bias, turb, depth, frequency, amplitude):
x, y, z = coords
@@ -457,7 +457,7 @@ def Effect_Function(coords, type, bias, turb, depth, frequency, amplitude):
y = y + t
z = z + t
- result = Effect_Basis_Function((x, y, z), type, bias) * amplitude
+ result = Effect_Basis_Function((x, y, z), type, bias) * amplitude
## fractalize:
if depth != 0:
i=0
@@ -594,7 +594,7 @@ def noise_gen(coords, props):
elif ntype in [7, 'marble_noise']:
value = marble_noise(
(ncoords[0] - origin_x + x_offset),
- (ncoords[1] - origin_y + y_offset),
+ (ncoords[1] - origin_y + y_offset),
(ncoords[2] - origin_z + z_offset),
(origin[0] + x_offset, origin[1] + y_offset, origin[2] + z_offset), nsize,
marbleshape, marblebias, marblesharpnes,
@@ -644,7 +644,7 @@ def noise_gen(coords, props):
fx_mixfactor = -1.0
fxval = val
else:
- fxcoords = Trans_Effect((x, y, z), fx_size, (fx_loc_x, fx_loc_y))
+ fxcoords = Trans_Effect((x, y, z), fx_size, (fx_loc_x, fx_loc_y))
effect = Effect_Function(fxcoords, fx_type, fx_bias, fx_turb, fx_depth, fx_frequency, fx_amplitude)
effect = Height_Scale(effect, fx_height, fx_offset, fx_invert)
fxval = Mix_Modes(val, effect, fx_mixfactor, fx_mix_mode)
diff --git a/ant_landscape/eroder.py b/ant_landscape/eroder.py
index 04e04bd7..96474f75 100644
--- a/ant_landscape/eroder.py
+++ b/ant_landscape/eroder.py
@@ -104,7 +104,7 @@ class Grid:
def toFile(self, filename, fmt="%.3f"):
- if filename == '-' :
+ if filename == '-' :
filename = sys.stdout.fileno()
with open(filename,"w") as f:
for line in self.__str_iter__(fmt):
@@ -168,7 +168,7 @@ class Grid:
self.maxy = max(y)
xscale = (self.maxx-self.minx)/(nx-1)
yscale = (self.maxy-self.miny)/(ny-1)
- # note: a purely flat plane cannot be scaled
+ # note: a purely flat plane cannot be scaled
if (yscale != 0.0) and (abs(xscale/yscale) - 1.0 > 1e-3):
raise ValueError("Mesh spacing not square %d x %d %.4f x %4.f"%(nx,ny,xscale,yscale))
self.zscale = 1.0
@@ -222,7 +222,7 @@ class Grid:
for col in range(ncol-1):
vi = row * ncol + col
yield (vi, vi+ncol, vi+1)
- yield (vi+1, vi+ncol, vi+ncol+1)
+ yield (vi+1, vi+ncol, vi+ncol+1)
def toBlenderMesh(self, me):
@@ -307,19 +307,19 @@ class Grid:
else:
sa = (
# incoming
- where((up -c) > delta ,(up -c -delta)/2, 0)
+ where((up -c) > delta ,(up -c -delta)/2, 0)
+ where((down -c) > delta ,(down -c -delta)/2, 0)
+ where((left -c) > delta ,(left -c -delta)/2, 0)
+ where((right-c) > delta ,(right-c -delta)/2, 0)
# outgoing
- + where((up -c) < -delta,(up -c +delta)/2, 0)
+ + where((up -c) < -delta,(up -c +delta)/2, 0)
+ where((down -c) < -delta,(down -c +delta)/2, 0)
+ where((left -c) < -delta,(left -c +delta)/2, 0)
+ where((right-c) < -delta,(right-c +delta)/2, 0)
)
randarray = np.random.randint(0,100,sa.shape) *0.01
sa = where(randarray < prob, sa, 0)
- self.avalanced[1:-1,1:-1] = self.avalanced[1:-1,1:-1] + sa/iterava
+ self.avalanced[1:-1,1:-1] = self.avalanced[1:-1,1:-1] + sa/iterava
self.center[1:-1,1:-1] = c + sa/iterava
self.maxrss = max(getmemsize(), self.maxrss)
@@ -327,7 +327,7 @@ class Grid:
def rain(self, amount=1, variance=0, userainmap=False):
- self.water += (1.0 - np.random.random(self.water.shape) * variance) * (amount if ((self.rainmap is None) or (not userainmap)) else self.rainmap * amount)
+ self.water += (1.0 - np.random.random(self.water.shape) * variance) * (amount if ((self.rainmap is None) or (not userainmap)) else self.rainmap * amount)
def spring(self, amount, px, py, radius):
@@ -435,7 +435,7 @@ class Grid:
center = (slice( 1, -1,None),slice( 1, -1,None))
rock = self.center
- ds = self.scour[center]
+ ds = self.scour[center]
rcc = rock[center]
rock[center] = rcc - ds * Kz
# there isn't really a bottom to the rock but negative values look ugly