[Bf-extensions-cvs] [fcab90a6] master: ANT landscape: complete update, folder system
Jimmy Hazevoet
noreply at git.blender.org
Wed Jun 14 08:54:40 CEST 2017
Commit: fcab90a6a0042b29ec9ffcb5e2ece224ea78e1c1
Author: Jimmy Hazevoet
Date: Wed Jun 14 16:54:07 2017 +1000
Branches: master
https://developer.blender.org/rBAfcab90a6a0042b29ec9ffcb5e2ece224ea78e1c1
ANT landscape: complete update, folder system
===================================================================
A ant_landscape/__init__.py
A ant_landscape/add_mesh_ant_landscape.py
A ant_landscape/ant_functions.py
A ant_landscape/ant_landscape_refresh.py
A ant_landscape/mesh_ant_displace.py
A mesh_tissue/lattice.py
M presets/operator/mesh.landscape_add/abstract.py
M presets/operator/mesh.landscape_add/canion.py
M presets/operator/mesh.landscape_add/cauliflower_hills.py
M presets/operator/mesh.landscape_add/cristaline.py
M presets/operator/mesh.landscape_add/default.py
M presets/operator/mesh.landscape_add/default_large.py
M presets/operator/mesh.landscape_add/flatstone.py
D presets/operator/mesh.landscape_add/land_and_water.py
M presets/operator/mesh.landscape_add/mountain.py
M presets/operator/mesh.landscape_add/planet_noise.py
M presets/operator/mesh.landscape_add/plateau.py
A presets/operator/mesh.landscape_add/slick_rock.py
M presets/operator/mesh.landscape_add/smooth_terrain.py
M presets/operator/mesh.landscape_add/techno_grid.py
M presets/operator/mesh.landscape_add/terrain_large.py
A presets/operator/mesh.landscape_add/vlnoise_turbulence.py
M presets/operator/mesh.landscape_add/voronoi_hills.py
M presets/operator/mesh.landscape_add/vulcano.py
===================================================================
diff --git a/ant_landscape/__init__.py b/ant_landscape/__init__.py
new file mode 100644
index 00000000..02f66ec4
--- /dev/null
+++ b/ant_landscape/__init__.py
@@ -0,0 +1,757 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+# Another Noise Tool - Suite
+# Jim Hazevoet 5/2017
+
+bl_info = {
+ "name": "A.N.T.Landscape",
+ "author": "Jim Hazevoet",
+ "version": (0, 1, 6),
+ "blender": (2, 77, 0),
+ "location": "View3D > Tool Shelf",
+ "description": "Another Noise Tool: Landscape and Displace",
+ "warning": "",
+ "wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6/Py/"
+ "Scripts/Add_Mesh/ANT_Landscape",
+ "category": "Add Mesh",
+}
+
+if "bpy" in locals():
+ import importlib
+ importlib.reload(add_mesh_ant_landscape)
+ importlib.reload(ant_landscape_refresh)
+ importlib.reload(mesh_ant_displace)
+ importlib.reload(ant_functions)
+else:
+ from ant_landscape import add_mesh_ant_landscape
+ from ant_landscape import ant_landscape_refresh
+ from ant_landscape import mesh_ant_displace
+ from ant_landscape import ant_functions
+
+import bpy
+
+from bpy.props import (
+ BoolProperty,
+ FloatProperty,
+ IntProperty,
+ StringProperty,
+ PointerProperty,
+ EnumProperty,
+ )
+'''
+from .ant_functions import (
+ draw_ant_refresh,
+ draw_ant_main,
+ draw_ant_noise,
+ draw_ant_displace,
+ )
+'''
+
+# ------------------------------------------------------------
+# Menu and panels
+
+# Define "Landscape" menu
+def menu_func_landscape(self, context):
+ self.layout.operator('mesh.landscape_add', text="Landscape", icon="RNDCURVE")
+
+
+# Landscape Add Panel
+class panel_func_add_landscape(bpy.types.Panel):
+ bl_space_type = "VIEW_3D"
+ bl_context = "objectmode"
+ bl_region_type = "TOOLS"
+ bl_label = "ANT Landscape"
+ bl_category = "Create"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ def draw(self, context):
+ col = self.layout.column()
+ col.operator('mesh.landscape_add', text="Landscape", icon="RNDCURVE")
+
+
+# Landscape Tools:
+class AntLandscapeToolsPanel(bpy.types.Panel):
+ bl_space_type = "VIEW_3D"
+ bl_context = "objectmode"
+ bl_region_type = "TOOLS"
+ bl_label = "ANT Displace/Slopemap"
+ bl_category = "Tools"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ def draw(self, context):
+ layout = self.layout
+ ob = context.active_object
+ if ob and ob.type == 'MESH':
+ box = layout.box()
+ col = box.column()
+ col.label("Mesh:")
+ col.operator('mesh.ant_displace', text="Displace", icon="RNDCURVE")
+ col = box.column()
+ col.operator('mesh.ant_slope_map', icon='GROUP_VERTEX')
+ else:
+ box = layout.box()
+ col = box.column()
+ col.label("Select a Mesh Object")
+
+
+# Landscape Settings:
+class AntLandscapeSettingsPanel(bpy.types.Panel):
+ bl_space_type = "VIEW_3D"
+ bl_context = "objectmode"
+ bl_region_type = "TOOLS"
+ bl_category = "Create"
+ bl_options = {'DEFAULT_CLOSED'}
+ bl_label = "ANT Landscape Settings"
+ # bl_space_type = 'PROPERTIES'
+ # bl_region_type = 'WINDOW'
+ # bl_context = "world"
+
+ def draw(self, context):
+ layout = self.layout
+ scene = context.scene
+ ob = bpy.context.active_object
+
+ if ob and ob.ant_landscape.keys():
+ ant = ob.ant_landscape
+ box = layout.box()
+ split = box.column().row().split()
+ split.scale_y = 1.5
+ split.operator('mesh.ant_landscape_regenerate', text="", icon="LOOP_FORWARDS")
+ split.operator('mesh.ant_landscape_refresh', text="", icon="FILE_REFRESH")
+
+ box = layout.box()
+ box.prop(ant, "show_main_settings", toggle=True)
+ if ant.show_main_settings:
+ #row = box.row(align=True)
+ #split = row.split(align=True)
+ #split.prop(ant, "at_cursor", toggle=True, icon_only=True, icon='CURSOR')
+ #split.prop(ant, "smooth_mesh", toggle=True, icon_only=True, icon='SOLID')
+ #split.prop(ant, "sphere_mesh", toggle=True)
+ #split.prop(ant, "tri_face", toggle=True, icon_only=True, icon='MESH_DATA')
+ #box.prop(ant, "ant_terrain_name")
+ #box.prop_search(ant, "land_material", bpy.data, "materials")
+ col = box.column(align=True)
+ col.prop(ant, "subdivision_x")
+ col.prop(ant, "subdivision_y")
+ col = box.column(align=True)
+ if ant.sphere_mesh:
+ col.prop(ant, "mesh_size")
+ else:
+ col.prop(ant, "mesh_size_x")
+ col.prop(ant, "mesh_size_y")
+
+ box = layout.box()
+ box.prop(ant, "show_noise_settings", toggle=True)
+ if ant.show_noise_settings:
+ box.prop(ant, "noise_type")
+ if ant.noise_type == "blender_texture":
+ box.prop_search(ant, "texture_block", bpy.data, "textures")
+ else:
+ box.prop(ant, "basis_type")
+
+ col = box.column(align=True)
+ col.prop(ant, "random_seed")
+ col = box.column(align=True)
+ col.prop(ant, "noise_offset_x")
+ col.prop(ant, "noise_offset_y")
+ col.prop(ant, "noise_offset_z")
+ col.prop(ant, "noise_size_x")
+ col.prop(ant, "noise_size_y")
+ col.prop(ant, "noise_size_z")
+ col = box.column(align=True)
+ col.prop(ant, "noise_size")
+
+ col = box.column(align=True)
+ if ant.noise_type == "multi_fractal":
+ col.prop(ant, "noise_depth")
+ col.prop(ant, "dimension")
+ col.prop(ant, "lacunarity")
+ elif ant.noise_type == "ridged_multi_fractal":
+ col.prop(ant, "noise_depth")
+ col.prop(ant, "dimension")
+ col.prop(ant, "lacunarity")
+ col.prop(ant, "offset")
+ col.prop(ant, "gain")
+ elif ant.noise_type == "hybrid_multi_fractal":
+ col.prop(ant, "noise_depth")
+ col.prop(ant, "dimension")
+ col.prop(ant, "lacunarity")
+ col.prop(ant, "offset")
+ col.prop(ant, "gain")
+ elif ant.noise_type == "hetero_terrain":
+ col.prop(ant, "noise_depth")
+ col.prop(ant, "dimension")
+ col.prop(ant, "lacunarity")
+ col.prop(ant, "offset")
+ elif ant.noise_type == "fractal":
+ col.prop(ant, "noise_depth")
+ col.prop(ant, "dimension")
+ col.prop(ant, "lacunarity")
+ elif ant.noise_type == "turbulence_vector":
+ col.prop(ant, "noise_depth")
+ col.prop(ant, "amplitude")
+ col.prop(ant, "frequency")
+ col.separator()
+ row = col.row(align=True)
+ row.prop(ant, "hard_noise", expand=True)
+ elif ant.noise_type == "variable_lacunarity":
+ box.prop(ant, "vl_basis_type")
+ box.prop(ant, "distortion")
+ elif ant.noise_type == "marble_noise":
+ box.prop(ant, "marble_shape")
+ box.prop(ant, "marble_bias")
+ box.prop(ant, "marble_sharp")
+ col = box.column(align=True)
+ col.prop(ant, "distortion")
+ col.prop(ant, "noise_depth")
+ col.separator()
+ row = col.row(align=True)
+ row.prop(ant, "hard_noise", expand=True)
+ elif ant.noise_type == "shattered_hterrain":
+ col.prop(ant, "noise_depth")
+ col.prop(ant, "dimension")
+ col.prop(ant, "lacunarity")
+ col.prop(ant, "offset")
+ col.prop(ant, "distortion")
+ elif ant.noise_type == "strata_hterrain":
+ col.prop(ant, "noise_depth")
+ col.prop(ant, "dimension")
+ col.prop(ant, "lacunarity")
+ col.prop(ant, "offset")
+ col.prop(ant, "distortion", text="Strata")
+ elif ant.noise_type == "ant_turbulence":
+ col.prop(ant, "noise_depth")
+ col.prop(ant, "amplitude")
+ col.prop(ant, "frequency")
+ col.prop(ant, "distortion")
+ col.separator()
+ row = col.row(align=True)
+ row.prop(ant, "hard_noise", expand=True)
+ elif ant.noise_type == "vl_noise_turbulence":
+ col.prop(ant, "noise_depth")
+ col.prop(ant, "amplitude")
+ col.prop(ant, "frequency")
+ col.prop(ant, "distortion")
+ col.separator()
+ col.prop(ant,
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list