[Bf-extensions-cvs] [c81a6e1b] master: ant landscape: fix z noise size, various fixes

Jimmy Hazevoet noreply at git.blender.org
Mon Jun 19 03:32:04 CEST 2017


Commit: c81a6e1b2c8cb7e4b73123068961c430ae14126e
Author: Jimmy Hazevoet
Date:   Mon Jun 19 11:31:44 2017 +1000
Branches: master
https://developer.blender.org/rBAc81a6e1b2c8cb7e4b73123068961c430ae14126e

ant landscape: fix z noise size, various fixes

===================================================================

M	ant_landscape/__init__.py
M	ant_landscape/ant_functions.py
M	ant_landscape/ant_landscape_refresh.py

===================================================================

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']:



More information about the Bf-extensions-cvs mailing list