1 # ##### BEGIN GPL LICENSE BLOCK #####
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; either version 2
6 # of the License, or (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software Foundation,
15 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 # ##### END GPL LICENSE BLOCK #####
19 # Another Noise Tool - Suite (W.I.P.)
20 # Jimmy Hazevoet 5/2017
23 "name": "A.N.T.Landscape",
24 "author": "Jimmy Hazevoet",
26 "blender": (2, 78, 0),
27 "location": "View3D > Tool Shelf",
28 "description": "Another Noise Tool: Landscape and Displace",
30 "wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6/Py/"
31 "Scripts/Add_Mesh/ANT_Landscape",
32 "category": "Add Mesh",
37 importlib
.reload(add_mesh_ant_landscape
)
38 importlib
.reload(mesh_ant_displace
)
39 importlib
.reload(ant_functions
)
40 importlib
.reload(ant_noise
)
42 from ant_landscape
import add_mesh_ant_landscape
43 from ant_landscape
import mesh_ant_displace
44 from ant_landscape
import ant_functions
45 from ant_landscape
import ant_noise
49 from bpy
.props
import (
57 from .ant_functions
import (
64 # ------------------------------------------------------------
67 def menu_func_eroder(self
, context
):
68 ob
= bpy
.context
.active_object
69 if ob
and (ob
.ant_landscape
.keys() and not ob
.ant_landscape
['sphere_mesh']):
70 self
.layout
.operator('mesh.eroder', text
="Landscape Eroder", icon
='SMOOTHCURVE')
73 def menu_func_landscape(self
, context
):
74 self
.layout
.operator('mesh.landscape_add', text
="Landscape", icon
="RNDCURVE")
78 class panel_func_add_landscape(bpy
.types
.Panel
):
79 bl_idname
= "ANTLANDSCAPE_PT_add"
80 bl_space_type
= "VIEW_3D"
81 bl_context
= "objectmode"
82 bl_region_type
= "TOOLS"
83 bl_label
= "Landscape"
84 bl_category
= "Create"
85 bl_options
= {'DEFAULT_CLOSED'}
87 def draw(self
, context
):
88 col
= self
.layout
.column()
89 col
.operator('mesh.landscape_add', text
="Landscape", icon
="RNDCURVE")
93 class AntLandscapeToolsPanel(bpy
.types
.Panel
):
94 bl_idname
= "ANTLANDSCAPE_PT_tools"
95 bl_space_type
= "VIEW_3D"
96 bl_context
= "objectmode"
97 bl_region_type
= "TOOLS"
98 bl_label
= "Landscape Tools"
100 bl_options
= {'DEFAULT_CLOSED'}
103 def poll(cls
, context
):
104 ob
= bpy
.context
.active_object
105 return (ob
and ob
.type == 'MESH')
107 def draw(self
, context
):
109 ob
= context
.active_object
110 col
= layout
.column()
111 col
.operator('mesh.ant_displace', text
="Mesh Displace", icon
="RNDCURVE")
112 col
.operator('mesh.ant_slope_map', icon
='GROUP_VERTEX')
113 if ob
.ant_landscape
.keys() and not ob
.ant_landscape
['sphere_mesh']:
114 col
.operator('mesh.eroder', text
="Landscape Eroder", icon
='SMOOTHCURVE')
117 # Landscape Main Settings
118 class AntMainSettingsPanel(bpy
.types
.Panel
):
119 bl_idname
= "ANTMAIN_PT_layout"
120 bl_options
= {'DEFAULT_CLOSED'}
121 bl_space_type
= 'VIEW_3D'
122 bl_region_type
= 'UI'
123 bl_context
= "object"
124 bl_label
= "Landscape Main"
127 def poll(cls
, context
):
128 ob
= bpy
.context
.active_object
129 return ob
.ant_landscape
.keys() if ob
else False
131 def draw(self
, context
):
133 scene
= context
.scene
134 ob
= bpy
.context
.active_object
135 ant
= ob
.ant_landscape
137 col
= box
.column(align
=False)
139 col
.operator('mesh.ant_landscape_regenerate', text
="Regenerate", icon
="LOOP_FORWARDS")
140 row
= box
.row(align
=True)
141 split
= row
.split(align
=True)
142 split
.prop(ant
, "smooth_mesh", toggle
=True, text
="Smooth", icon
='SOLID')
143 split
.prop(ant
, "tri_face", toggle
=True, text
="Triangulate", icon
='MESH_DATA')
145 split
.prop(ant
, "remove_double", toggle
=True, text
="Remove Doubles", icon
='MESH_DATA')
146 box
.prop(ant
, "ant_terrain_name")
147 box
.prop_search(ant
, "land_material", bpy
.data
, "materials")
148 col
= box
.column(align
=True)
149 col
.prop(ant
, "subdivision_x")
150 col
.prop(ant
, "subdivision_y")
151 col
= box
.column(align
=True)
153 col
.prop(ant
, "mesh_size")
155 col
.prop(ant
, "mesh_size_x")
156 col
.prop(ant
, "mesh_size_y")
159 # Landscape Noise Settings
160 class AntNoiseSettingsPanel(bpy
.types
.Panel
):
161 bl_idname
= "ANTNOISE_PT_layout"
162 bl_options
= {'DEFAULT_CLOSED'}
163 bl_space_type
= 'VIEW_3D'
164 bl_region_type
= 'UI'
165 bl_context
= "object"
166 bl_label
= "Landscape Noise"
169 def poll(cls
, context
):
170 ob
= bpy
.context
.active_object
171 return ob
.ant_landscape
.keys() if ob
else False
173 def draw(self
, context
):
175 scene
= context
.scene
176 ob
= bpy
.context
.active_object
177 ant
= ob
.ant_landscape
179 col
= box
.column(align
=True)
182 col
.operator('mesh.ant_landscape_regenerate', text
="Regenerate", icon
="LOOP_FORWARDS")
184 col
.operator('mesh.ant_landscape_refresh', text
="Refresh", icon
="FILE_REFRESH")
186 box
.prop(ant
, "noise_type")
187 if ant
.noise_type
== "blender_texture":
188 box
.prop_search(ant
, "texture_block", bpy
.data
, "textures")
190 box
.prop(ant
, "basis_type")
192 col
= box
.column(align
=True)
193 col
.prop(ant
, "random_seed")
194 col
= box
.column(align
=True)
195 col
.prop(ant
, "noise_offset_x")
196 col
.prop(ant
, "noise_offset_y")
198 col
.prop(ant
, "noise_offset_z")
199 col
.prop(ant
, "noise_size_x")
200 col
.prop(ant
, "noise_size_y")
202 col
.prop(ant
, "noise_size_z")
203 col
= box
.column(align
=True)
204 col
.prop(ant
, "noise_size")
206 col
= box
.column(align
=True)
207 if ant
.noise_type
== "multi_fractal":
208 col
.prop(ant
, "noise_depth")
209 col
.prop(ant
, "dimension")
210 col
.prop(ant
, "lacunarity")
211 elif ant
.noise_type
== "ridged_multi_fractal":
212 col
.prop(ant
, "noise_depth")
213 col
.prop(ant
, "dimension")
214 col
.prop(ant
, "lacunarity")
215 col
.prop(ant
, "offset")
216 col
.prop(ant
, "gain")
217 elif ant
.noise_type
== "hybrid_multi_fractal":
218 col
.prop(ant
, "noise_depth")
219 col
.prop(ant
, "dimension")
220 col
.prop(ant
, "lacunarity")
221 col
.prop(ant
, "offset")
222 col
.prop(ant
, "gain")
223 elif ant
.noise_type
== "hetero_terrain":
224 col
.prop(ant
, "noise_depth")
225 col
.prop(ant
, "dimension")
226 col
.prop(ant
, "lacunarity")
227 col
.prop(ant
, "offset")
228 elif ant
.noise_type
== "fractal":
229 col
.prop(ant
, "noise_depth")
230 col
.prop(ant
, "dimension")
231 col
.prop(ant
, "lacunarity")
232 elif ant
.noise_type
== "turbulence_vector":
233 col
.prop(ant
, "noise_depth")
234 col
.prop(ant
, "amplitude")
235 col
.prop(ant
, "frequency")
237 row
= col
.row(align
=True)
238 row
.prop(ant
, "hard_noise", expand
=True)
239 elif ant
.noise_type
== "variable_lacunarity":
240 box
.prop(ant
, "vl_basis_type")
241 box
.prop(ant
, "distortion")
242 elif ant
.noise_type
== "marble_noise":
243 box
.prop(ant
, "marble_shape")
244 box
.prop(ant
, "marble_bias")
245 box
.prop(ant
, "marble_sharp")
246 col
= box
.column(align
=True)
247 col
.prop(ant
, "distortion")
248 col
.prop(ant
, "noise_depth")
250 row
= col
.row(align
=True)
251 row
.prop(ant
, "hard_noise", expand
=True)
252 elif ant
.noise_type
== "shattered_hterrain":
253 col
.prop(ant
, "noise_depth")
254 col
.prop(ant
, "dimension")
255 col
.prop(ant
, "lacunarity")
256 col
.prop(ant
, "offset")
257 col
.prop(ant
, "distortion")
258 elif ant
.noise_type
== "strata_hterrain":
259 col
.prop(ant
, "noise_depth")
260 col
.prop(ant
, "dimension")
261 col
.prop(ant
, "lacunarity")
262 col
.prop(ant
, "offset")
263 col
.prop(ant
, "distortion", text
="Strata")
264 elif ant
.noise_type
== "ant_turbulence":
265 col
.prop(ant
, "noise_depth")
266 col
.prop(ant
, "amplitude")
267 col
.prop(ant
, "frequency")
268 col
.prop(ant
, "distortion")
270 row
= col
.row(align
=True)
271 row
.prop(ant
, "hard_noise", expand
=True)
272 elif ant
.noise_type
== "vl_noise_turbulence":
273 col
.prop(ant
, "noise_depth")
274 col
.prop(ant
, "amplitude")
275 col
.prop(ant
, "frequency")
276 col
.prop(ant
, "distortion")
278 box
.prop(ant
, "vl_basis_type")
280 row
= col
.row(align
=True)
281 row
.prop(ant
, "hard_noise", expand
=True)
282 elif ant
.noise_type
== "vl_hTerrain":
283 col
.prop(ant
, "noise_depth")
284 col
.prop(ant
, "dimension")
285 col
.prop(ant
, "lacunarity")
286 col
.prop(ant
, "offset")
287 col
.prop(ant
, "distortion")
289 box
.prop(ant
, "vl_basis_type")
290 elif ant
.noise_type
== "distorted_heteroTerrain":
291 col
.prop(ant
, "noise_depth")
292 col
.prop(ant
, "dimension")
293 col
.prop(ant
, "lacunarity")
294 col
.prop(ant
, "offset")
295 col
.prop(ant
, "distortion")
297 col
.prop(ant
, "vl_basis_type")
298 elif ant
.noise_type
== "double_multiFractal":
299 col
.prop(ant
, "noise_depth")
300 col
.prop(ant
, "dimension")
301 col
.prop(ant
, "lacunarity")
302 col
.prop(ant
, "offset")
303 col
.prop(ant
, "gain")
305 box
.prop(ant
, "vl_basis_type")
306 elif ant
.noise_type
== "rocks_noise":
307 col
.prop(ant
, "noise_depth")
308 col
.prop(ant
, "distortion")
310 row
= col
.row(align
=True)
311 row
.prop(ant
, "hard_noise", expand
=True)
312 elif ant
.noise_type
== "slick_rock":
313 col
.prop(ant
, "noise_depth")
314 col
.prop(ant
, "dimension")
315 col
.prop(ant
, "lacunarity")
316 col
.prop(ant
, "gain")
317 col
.prop(ant
, "offset")
318 col
.prop(ant
, "distortion")
320 box
.prop(ant
, "vl_basis_type")
321 elif ant
.noise_type
== "planet_noise":
322 col
.prop(ant
, "noise_depth")
324 row
= col
.row(align
=True)
325 row
.prop(ant
, "hard_noise", expand
=True)
328 col
= box
.column(align
=False)
329 box
.prop(ant
, "fx_type")
330 if ant
.fx_type
!= "0":
331 if int(ant
.fx_type
) <= 12:
332 box
.prop(ant
, "fx_bias")
334 box
.prop(ant
, "fx_mix_mode")
335 col
= box
.column(align
=True)
336 col
.prop(ant
, "fx_mixfactor")
338 col
= box
.column(align
=True)
339 col
.prop(ant
, "fx_loc_x")
340 col
.prop(ant
, "fx_loc_y")
341 col
.prop(ant
, "fx_size")
343 col
= box
.column(align
=True)
344 col
.prop(ant
, "fx_depth")
345 if ant
.fx_depth
!= 0:
346 col
.prop(ant
, "fx_frequency")
347 col
.prop(ant
, "fx_amplitude")
348 col
.prop(ant
, "fx_turb")
350 col
= box
.column(align
=True)
351 row
= col
.row(align
=True).split(0.92, align
=True)
352 row
.prop(ant
, "fx_height")
353 row
.prop(ant
, "fx_invert", toggle
=True, text
="", icon
='ARROW_LEFTRIGHT')
354 col
.prop(ant
, "fx_offset")
357 # Landscape Displace Settings
358 class AntDisplaceSettingsPanel(bpy
.types
.Panel
):
359 bl_idname
= "ANTDISP_PT_layout"
360 bl_options
= {'DEFAULT_CLOSED'}
361 bl_space_type
= 'VIEW_3D'
362 bl_region_type
= 'UI'
363 bl_context
= "object"
364 bl_label
= "Landscape Displace"
367 def poll(cls
, context
):
368 ob
= bpy
.context
.active_object
369 return ob
.ant_landscape
.keys() if ob
else False
371 def draw(self
, context
):
373 scene
= context
.scene
374 ob
= bpy
.context
.active_object
375 ant
= ob
.ant_landscape
377 col
= box
.column(align
=True)
380 col
.operator('mesh.ant_landscape_regenerate', text
="Regenerate", icon
="LOOP_FORWARDS")
382 col
.operator('mesh.ant_landscape_refresh', text
="Refresh", icon
="FILE_REFRESH")
384 col
= box
.column(align
=True)
385 row
= col
.row(align
=True).split(0.92, align
=True)
386 row
.prop(ant
, "height")
387 row
.prop(ant
, "height_invert", toggle
=True, text
="", icon
='ARROW_LEFTRIGHT')
388 col
.prop(ant
, "height_offset")
389 col
.prop(ant
, "maximum")
390 col
.prop(ant
, "minimum")
391 if not ant
.sphere_mesh
:
393 col
.prop(ant
, "edge_falloff")
394 if ant
.edge_falloff
is not "0":
395 col
= box
.column(align
=True)
396 col
.prop(ant
, "edge_level")
397 if ant
.edge_falloff
in ["2", "3"]:
398 col
.prop(ant
, "falloff_x")
399 if ant
.edge_falloff
in ["1", "3"]:
400 col
.prop(ant
, "falloff_y")
403 col
.prop(ant
, "strata_type")
404 if ant
.strata_type
is not "0":
406 col
.prop(ant
, "strata")
408 col
.prop_search(ant
, "vert_group", ob
, "vertex_groups")
411 # ------------------------------------------------------------
413 class AntLandscapePropertiesGroup(bpy
.types
.PropertyGroup
):
415 ant_terrain_name
= StringProperty(
419 land_material
= StringProperty(
422 description
="Terrain material"
424 water_material
= StringProperty(
427 description
="Water plane material"
429 texture_block
= StringProperty(
433 at_cursor
= BoolProperty(
436 description
="Place at cursor location",
438 smooth_mesh
= BoolProperty(
441 description
="Shade smooth"
443 tri_face
= BoolProperty(
446 description
="Triangulate faces"
448 sphere_mesh
= BoolProperty(
451 description
="Generate uv sphere - remove doubles when ready"
453 subdivision_x
= IntProperty(
454 name
="Subdivisions X",
458 description
="Mesh X subdivisions"
460 subdivision_y
= IntProperty(
462 name
="Subdivisions Y",
465 description
="Mesh Y subdivisions"
467 mesh_size
= FloatProperty(
472 description
="Mesh size"
474 mesh_size_x
= FloatProperty(
478 description
="Mesh x size"
480 mesh_size_y
= FloatProperty(
484 description
="Mesh y size"
487 random_seed
= IntProperty(
491 description
="Randomize noise origin"
493 noise_offset_x
= FloatProperty(
496 description
="Noise X Offset"
498 noise_offset_y
= FloatProperty(
501 description
="Noise Y Offset"
503 noise_offset_z
= FloatProperty(
506 description
="Noise Z Offset"
508 noise_size_x
= FloatProperty(
513 description
="Noise x size"
515 noise_size_y
= FloatProperty(
520 description
="Noise y size"
522 noise_size_z
= FloatProperty(
527 description
="Noise Z size"
529 noise_size
= FloatProperty(
534 description
="Noise size"
536 noise_type
= EnumProperty(
538 default
='hetero_terrain',
539 description
="Noise type",
541 ('multi_fractal', "Multi Fractal", "Blender: Multi Fractal algorithm", 0),
542 ('ridged_multi_fractal', "Ridged MFractal", "Blender: Ridged Multi Fractal", 1),
543 ('hybrid_multi_fractal', "Hybrid MFractal", "Blender: Hybrid Multi Fractal", 2),
544 ('hetero_terrain', "Hetero Terrain", "Blender: Hetero Terrain", 3),
545 ('fractal', "fBm Fractal", "Blender: fBm - Fractional Browninian motion", 4),
546 ('turbulence_vector', "Turbulence", "Blender: Turbulence Vector", 5),
547 ('variable_lacunarity', "Distorted Noise", "Blender: Distorted Noise", 6),
548 ('marble_noise', "Marble", "A.N.T.: Marble Noise", 7),
549 ('shattered_hterrain', "Shattered hTerrain", "A.N.T.: Shattered hTerrain", 8),
550 ('strata_hterrain', "Strata hTerrain", "A.N.T: Strata hTerrain", 9),
551 ('ant_turbulence', "Another Noise", "A.N.T: Turbulence variation", 10),
552 ('vl_noise_turbulence', "vlNoise turbulence", "A.N.T: Real vlNoise turbulence", 11),
553 ('vl_hTerrain', "vlNoise hTerrain", "A.N.T: vlNoise hTerrain", 12),
554 ('distorted_heteroTerrain', "Distorted hTerrain", "A.N.T distorted hTerrain", 13),
555 ('double_multiFractal', "Double MultiFractal", "A.N.T: double multiFractal", 14),
556 ('rocks_noise', "Noise Rocks", "A.N.T: turbulence variation", 15),
557 ('slick_rock', "Slick Rock", "A.N.T: slick rock", 16),
558 ('planet_noise', "Planet Noise", "Planet Noise by: Farsthary", 17),
559 ('blender_texture', "Blender Texture - Texture Nodes", "Blender texture data block", 18)]
561 basis_type
= EnumProperty(
564 description
="Noise basis algorithms",
566 ("0", "Blender", "Blender default noise", 0),
567 ("1", "Perlin", "Perlin noise", 1),
568 ("2", "New Perlin", "New Perlin noise", 2),
569 ("3", "Voronoi F1", "Voronoi F1", 3),
570 ("4", "Voronoi F2", "Voronoi F2", 4),
571 ("5", "Voronoi F3", "Voronoi F3", 5),
572 ("6", "Voronoi F4", "Voronoi F4", 6),
573 ("7", "Voronoi F2-F1", "Voronoi F2-F1", 7),
574 ("8", "Voronoi Crackle", "Voronoi Crackle", 8),
575 ("9", "Cell Noise", "Cell noise", 9)]
577 vl_basis_type
= EnumProperty(
578 name
="vlNoise Basis",
580 description
="VLNoise basis algorithms",
582 ("0", "Blender", "Blender default noise", 0),
583 ("1", "Perlin", "Perlin noise", 1),
584 ("2", "New Perlin", "New Perlin noise", 2),
585 ("3", "Voronoi F1", "Voronoi F1", 3),
586 ("4", "Voronoi F2", "Voronoi F2", 4),
587 ("5", "Voronoi F3", "Voronoi F3", 5),
588 ("6", "Voronoi F4", "Voronoi F4", 6),
589 ("7", "Voronoi F2-F1", "Voronoi F2-F1", 7),
590 ("8", "Voronoi Crackle", "Voronoi Crackle", 8),
591 ("9", "Cell Noise", "Cell noise", 9)]
593 distortion
= FloatProperty(
598 description
="Distortion amount"
600 hard_noise
= EnumProperty(
603 description
="Soft Noise, Hard noise",
605 ("0", "Soft", "Soft Noise", 0),
606 ("1", "Hard", "Hard noise", 1)]
608 noise_depth
= IntProperty(
613 description
="Noise Depth - number of frequencies in the fBm"
615 amplitude
= FloatProperty(
620 description
="Amplitude"
622 frequency
= FloatProperty(
627 description
="Frequency"
629 dimension
= FloatProperty(
634 description
="H - fractal dimension of the roughest areas"
636 lacunarity
= FloatProperty(
641 description
="Lacunarity - gap between successive frequencies"
643 offset
= FloatProperty(
648 description
="Offset - raises the terrain from sea level"
650 gain
= FloatProperty(
655 description
="Gain - scale factor"
657 marble_bias
= EnumProperty(
660 description
="Marble bias",
662 ("0", "Sin", "Sin", 0),
663 ("1", "Cos", "Cos", 1),
664 ("2", "Tri", "Tri", 2),
665 ("3", "Saw", "Saw", 3)]
667 marble_sharp
= EnumProperty(
670 description
="Marble sharpness",
672 ("0", "Soft", "Soft", 0),
673 ("1", "Sharp", "Sharp", 1),
674 ("2", "Sharper", "Sharper", 2),
675 ("3", "Soft inv.", "Soft", 3),
676 ("4", "Sharp inv.", "Sharp", 4),
677 ("5", "Sharper inv.", "Sharper", 5)]
679 marble_shape
= EnumProperty(
682 description
="Marble shape",
684 ("0", "Default", "Default", 0),
685 ("1", "Ring", "Ring", 1),
686 ("2", "Swirl", "Swirl", 2),
687 ("3", "Bump", "Bump", 3),
688 ("4", "Wave", "Wave", 4),
693 height
= FloatProperty(
698 description
="Noise intensity scale"
700 height_invert
= BoolProperty(
703 description
="Height invert",
705 height_offset
= FloatProperty(
710 description
="Height offset"
712 fx_mixfactor
= FloatProperty(
717 description
="Effect mix factor: -1.0 = Noise, +1.0 = Effect"
719 fx_mix_mode
= EnumProperty(
722 description
="Effect mix mode",
724 ("0", "Mix", "Mix", 0),
725 ("1", "Add", "Add", 1),
726 ("2", "Sub", "Subtract", 2),
727 ("3", "Mul", "Multiply", 3),
728 ("4", "Abs", "Absolute", 4),
729 ("5", "Scr", "Screen", 5),
730 ("6", "Mod", "Modulo", 6),
731 ("7", "Min", "Minimum", 7),
732 ("8", "Max", "Maximum", 8)
735 fx_type
= EnumProperty(
738 description
="Effect type",
740 ("0", "None", "No effect", 0),
741 ("1", "Gradient", "Gradient", 1),
742 ("2", "Waves", "Waves - Bumps", 2),
743 ("3", "Zigzag", "Zigzag", 3),
744 ("4", "Wavy", "Wavy", 4),
745 ("5", "Bump", "Bump", 5),
746 ("6", "Dots", "Dots", 6),
747 ("7", "Rings", "Rings", 7),
748 ("8", "Spiral", "Spiral", 8),
749 ("9", "Square", "Square", 9),
750 ("10", "Blocks", "Blocks", 10),
751 ("11", "Grid", "Grid", 11),
752 ("12", "Tech", "Tech", 12),
753 ("13", "Crackle", "Crackle", 13),
754 ("14", "Cracks", "Cracks", 14),
755 ("15", "Rock", "Rock noise", 15),
756 ("16", "Lunar", "Craters", 16),
757 ("17", "Cosine", "Cosine", 17),
758 ("18", "Spikey", "Spikey", 18),
759 ("19", "Stone", "Stone", 19),
760 ("20", "Flat Turb", "Flat turbulence", 20),
761 ("21", "Flat Voronoi", "Flat voronoi", 21)
764 fx_bias
= EnumProperty(
767 description
="Effect bias type",
769 ("0", "Sin", "Sin", 0),
770 ("1", "Cos", "Cos", 1),
771 ("2", "Tri", "Tri", 2),
772 ("3", "Saw", "Saw", 3),
773 ("4", "None", "None", 4)]
775 fx_turb
= FloatProperty(
780 description
="Effect turbulence distortion"
782 fx_depth
= IntProperty(
787 description
="Effect depth - number of frequencies"
789 fx_amplitude
= FloatProperty(
794 description
="Amplitude"
796 fx_frequency
= FloatProperty(
801 description
="Frequency"
803 fx_size
= FloatProperty(
808 description
="Effect size"
810 fx_loc_x
= FloatProperty(
813 description
="Effect x offset"
815 fx_loc_y
= FloatProperty(
818 description
="Effect y offset"
820 fx_height
= FloatProperty(
825 description
="Effect intensity scale"
827 fx_invert
= BoolProperty(
830 description
="Effect invert"
832 fx_offset
= FloatProperty(
837 description
="Effect height offset"
840 edge_falloff
= EnumProperty(
843 description
="Flatten edges",
845 ("0", "None", "None", 0),
846 ("1", "Y", "Y Falloff", 1),
847 ("2", "X", "X Falloff", 2),
848 ("3", "X Y", "X Y Falloff", 3)]
850 falloff_x
= FloatProperty(
855 description
="Falloff x scale"
857 falloff_y
= FloatProperty(
862 description
="Falloff y scale"
864 edge_level
= FloatProperty(
869 description
="Edge level, sealevel offset"
871 maximum
= FloatProperty(
876 description
="Maximum, flattens terrain at plateau level"
878 minimum
= FloatProperty(
883 description
="Minimum, flattens terrain at seabed level"
885 vert_group
= StringProperty(
889 strata
= FloatProperty(
894 description
="Strata layers / terraces"
896 strata_type
= EnumProperty(
899 description
="Strata types",
901 ("0", "None", "No strata", 0),
902 ("1", "Smooth", "Smooth transitions", 1),
903 ("2", "Sharp Sub", "Sharp substract transitions", 2),
904 ("3", "Sharp Add", "Sharp add transitions", 3),
905 ("4", "Quantize", "Quantize", 4),
906 ("5", "Quantize Mix", "Quantize mixed", 5)]
908 water_plane
= BoolProperty(
911 description
="Add water plane"
913 water_level
= FloatProperty(
918 description
="Water level"
920 remove_double
= BoolProperty(
921 name
="Remove Doubles",
923 description
="Remove doubles"
925 refresh
= BoolProperty(
928 description
="Refresh"
930 auto_refresh
= BoolProperty(
933 description
="Automatic refresh"
936 # ------------------------------------------------------------
940 bpy
.utils
.register_module(__name__
)
941 bpy
.types
.INFO_MT_mesh_add
.append(menu_func_landscape
)
942 bpy
.types
.Object
.ant_landscape
= PointerProperty(type=AntLandscapePropertiesGroup
, name
="ANT_Landscape", description
="Landscape properties")
943 bpy
.types
.VIEW3D_MT_paint_weight
.append(menu_func_eroder
)
947 bpy
.utils
.unregister_module(__name__
)
948 bpy
.types
.INFO_MT_mesh_add
.remove(menu_func_landscape
)
949 bpy
.types
.VIEW3D_MT_paint_weight
.remove(menu_func_eroder
)
952 if __name__
== "__main__":