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:
authorJimmy Hazevoet <jimhazevoet@gmail.com>2017-06-19 04:31:44 +0300
committermeta-androcto <meta.androcto1@gmail.com>2017-06-19 04:31:44 +0300
commitc81a6e1b2c8cb7e4b73123068961c430ae14126e (patch)
tree62df873dc64f588fe70ad3eb94c91f422af3d632 /ant_landscape
parent63fdae4bbd2ace15a6ec439e5a4588cd34a8e809 (diff)
ant landscape: fix z noise size, various fixes
Diffstat (limited to 'ant_landscape')
-rw-r--r--ant_landscape/__init__.py12
-rw-r--r--ant_landscape/ant_functions.py11
-rw-r--r--ant_landscape/ant_landscape_refresh.py2
3 files changed, 13 insertions, 12 deletions
diff --git a/ant_landscape/__init__.py b/ant_landscape/__init__.py
index 4b389184..9d5c6e21 100644
--- a/ant_landscape/__init__.py
+++ b/ant_landscape/__init__.py
@@ -127,8 +127,8 @@ class AntMainSettingsPanel(bpy.types.Panel):
@classmethod
def poll(cls, context):
- ob = bpy.context.active_object.ant_landscape.keys()
- return ob
+ ob = bpy.context.active_object
+ return ob.ant_landscape.keys() if ob else False
def draw(self, context):
layout = self.layout
@@ -174,8 +174,8 @@ class AntNoiseSettingsPanel(bpy.types.Panel):
@classmethod
def poll(cls, context):
- ob = bpy.context.active_object.ant_landscape.keys()
- return ob
+ ob = bpy.context.active_object
+ return ob.ant_landscape.keys() if ob else False
def draw(self, context):
layout = self.layout
@@ -342,8 +342,8 @@ class AntDisplaceSettingsPanel(bpy.types.Panel):
@classmethod
def poll(cls, context):
- ob = bpy.context.active_object.ant_landscape.keys()
- return ob
+ ob = bpy.context.active_object
+ return ob.ant_landscape.keys() if ob else False
def draw(self, context):
layout = self.layout
diff --git a/ant_landscape/ant_functions.py b/ant_landscape/ant_functions.py
index 3c3091ac..826d693e 100644
--- a/ant_landscape/ant_functions.py
+++ b/ant_landscape/ant_functions.py
@@ -713,7 +713,8 @@ def draw_ant_noise(self, context):
col.prop(self, "noise_offset_z")
col.prop(self, "noise_size_x")
col.prop(self, "noise_size_y")
- col.prop(self, "noise_size_z")
+ if self.sphere_mesh:
+ col.prop(self, "noise_size_z")
col = box.column(align=True)
col.prop(self, "noise_size")
@@ -966,28 +967,28 @@ class Eroder(bpy.types.Operator):
name="Iterations",
description="Number of overall iterations",
default=1,
- min=0,
+ min=1,
soft_max=100
)
IterRiver = IntProperty(
name="River Iterations",
description="Number of river iterations",
default=30,
- min=0,
+ min=1,
soft_max=1000
)
IterAva = IntProperty(
name="Avalanche Iterations",
description="Number of avalanche iterations",
default=5,
- min=0,
+ min=1,
soft_max=10
)
IterDiffuse = IntProperty(
name="Diffuse Iterations",
description="Number of diffuse iterations",
default=5,
- min=0,
+ min=1,
soft_max=10
)
diff --git a/ant_landscape/ant_landscape_refresh.py b/ant_landscape/ant_landscape_refresh.py
index 5518f2db..010bbd1f 100644
--- a/ant_landscape/ant_landscape_refresh.py
+++ b/ant_landscape/ant_landscape_refresh.py
@@ -125,7 +125,7 @@ class AntLandscapeRegenerate(bpy.types.Operator):
for i in range(len(obi)):
ant_props.append(obi[i][1])
- new_name = ob.ant_terrain_name
+ new_name = obj.name #ob.ant_terrain_name
# Main function, create landscape mesh object
if ob['sphere_mesh']: