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, 80, 0),
27 "location": "View3D > Sidebar > Create Tab",
28 "description": "Another Noise Tool: Landscape and Displace",
30 "doc_url": "https://docs.blender.org/manual/en/dev/addons/"
31 "add_mesh/ant_landscape.html",
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
):
76 self
.layout
.operator('mesh.landscape_add', text
="Landscape", icon
="RNDCURVE")
80 class AntLandscapeAddPanel(bpy
.types
.Panel
):
81 bl_category
= "Create"
82 bl_label
= "Landscape"
83 bl_idname
= "ANTLANDSCAPE_PT_add"
84 bl_space_type
= "VIEW_3D"
86 bl_context
= "objectmode"
87 bl_options
= {'DEFAULT_CLOSED'}
89 def draw(self
, context
):
90 col
= self
.layout
.column()
91 col
.operator('mesh.landscape_add', text
="Landscape", icon
="RNDCURVE")
95 class AntLandscapeToolsPanel(bpy
.types
.Panel
):
96 bl_category
= "Create"
97 bl_label
= "Landscape Tools"
98 bl_idname
= "ANTLANDSCAPE_PT_tools"
99 bl_space_type
= "VIEW_3D"
100 bl_region_type
= "UI"
101 bl_context
= "objectmode"
102 bl_options
= {'DEFAULT_CLOSED'}
105 def poll(cls
, context
):
106 ob
= bpy
.context
.active_object
107 return (ob
and ob
.type == 'MESH')
109 def draw(self
, context
):
111 ob
= context
.active_object
112 col
= layout
.column()
113 col
.operator('mesh.ant_displace', text
="Mesh Displace", icon
="RNDCURVE")
114 col
.operator('mesh.ant_slope_map', icon
='GROUP_VERTEX')
115 if ob
.ant_landscape
.keys() and not ob
.ant_landscape
['sphere_mesh']:
116 col
.operator('mesh.eroder', text
="Landscape Eroder", icon
='SMOOTHCURVE')
119 # Landscape Main Settings
120 class AntMainSettingsPanel(bpy
.types
.Panel
):
121 bl_category
= "Create"
122 bl_label
= "Landscape Main"
123 bl_idname
= "ANTLANDSCAPE_PT_main"
124 bl_space_type
= "VIEW_3D"
125 bl_region_type
= "UI"
126 bl_options
= {'DEFAULT_CLOSED'}
129 def poll(cls
, context
):
130 ob
= bpy
.context
.active_object
131 return ob
.ant_landscape
.keys() if ob
else False
133 def draw(self
, context
):
135 scene
= context
.scene
136 ob
= bpy
.context
.active_object
137 ant
= ob
.ant_landscape
139 col
= box
.column(align
=False)
141 col
.operator('mesh.ant_landscape_regenerate', text
="Regenerate", icon
="LOOP_FORWARDS")
142 row
= box
.row(align
=True)
143 split
= row
.split(align
=True)
144 split
.prop(ant
, "smooth_mesh", toggle
=True, text
="Smooth", icon
='SHADING_SOLID')
145 split
.prop(ant
, "tri_face", toggle
=True, text
="Triangulate", icon
='MESH_DATA')
147 split
.prop(ant
, "remove_double", toggle
=True, text
="Remove Doubles", icon
='MESH_DATA')
148 box
.prop(ant
, "ant_terrain_name")
149 box
.prop_search(ant
, "land_material", bpy
.data
, "materials")
150 col
= box
.column(align
=True)
151 col
.prop(ant
, "subdivision_x")
152 col
.prop(ant
, "subdivision_y")
153 col
= box
.column(align
=True)
155 col
.prop(ant
, "mesh_size")
157 col
.prop(ant
, "mesh_size_x")
158 col
.prop(ant
, "mesh_size_y")
161 # Landscape Noise Settings
162 class AntNoiseSettingsPanel(bpy
.types
.Panel
):
163 bl_category
= "Create"
164 bl_label
= "Landscape Noise"
165 bl_idname
= "ANTLANDSCAPE_PT_noise"
166 bl_space_type
= "VIEW_3D"
167 bl_region_type
= "UI"
168 bl_options
= {'DEFAULT_CLOSED'}
171 def poll(cls
, context
):
172 ob
= bpy
.context
.active_object
173 return ob
.ant_landscape
.keys() if ob
else False
175 def draw(self
, context
):
177 scene
= context
.scene
178 ob
= bpy
.context
.active_object
179 ant
= ob
.ant_landscape
181 col
= box
.column(align
=True)
184 col
.operator('mesh.ant_landscape_regenerate', text
="Regenerate", icon
="LOOP_FORWARDS")
186 col
.operator('mesh.ant_landscape_refresh', text
="Refresh", icon
="FILE_REFRESH")
188 box
.prop(ant
, "noise_type")
189 if ant
.noise_type
== "blender_texture":
190 box
.prop_search(ant
, "texture_block", bpy
.data
, "textures")
192 box
.prop(ant
, "basis_type")
194 col
= box
.column(align
=True)
195 col
.prop(ant
, "random_seed")
196 col
= box
.column(align
=True)
197 col
.prop(ant
, "noise_offset_x")
198 col
.prop(ant
, "noise_offset_y")
200 col
.prop(ant
, "noise_offset_z")
201 col
.prop(ant
, "noise_size_x")
202 col
.prop(ant
, "noise_size_y")
204 col
.prop(ant
, "noise_size_z")
205 col
= box
.column(align
=True)
206 col
.prop(ant
, "noise_size")
208 col
= box
.column(align
=True)
209 if ant
.noise_type
== "multi_fractal":
210 col
.prop(ant
, "noise_depth")
211 col
.prop(ant
, "dimension")
212 col
.prop(ant
, "lacunarity")
213 elif ant
.noise_type
== "ridged_multi_fractal":
214 col
.prop(ant
, "noise_depth")
215 col
.prop(ant
, "dimension")
216 col
.prop(ant
, "lacunarity")
217 col
.prop(ant
, "offset")
218 col
.prop(ant
, "gain")
219 elif ant
.noise_type
== "hybrid_multi_fractal":
220 col
.prop(ant
, "noise_depth")
221 col
.prop(ant
, "dimension")
222 col
.prop(ant
, "lacunarity")
223 col
.prop(ant
, "offset")
224 col
.prop(ant
, "gain")
225 elif ant
.noise_type
== "hetero_terrain":
226 col
.prop(ant
, "noise_depth")
227 col
.prop(ant
, "dimension")
228 col
.prop(ant
, "lacunarity")
229 col
.prop(ant
, "offset")
230 elif ant
.noise_type
== "fractal":
231 col
.prop(ant
, "noise_depth")
232 col
.prop(ant
, "dimension")
233 col
.prop(ant
, "lacunarity")
234 elif ant
.noise_type
== "turbulence_vector":
235 col
.prop(ant
, "noise_depth")
236 col
.prop(ant
, "amplitude")
237 col
.prop(ant
, "frequency")
239 row
= col
.row(align
=True)
240 row
.prop(ant
, "hard_noise", expand
=True)
241 elif ant
.noise_type
== "variable_lacunarity":
242 box
.prop(ant
, "vl_basis_type")
243 box
.prop(ant
, "distortion")
244 elif ant
.noise_type
== "marble_noise":
245 box
.prop(ant
, "marble_shape")
246 box
.prop(ant
, "marble_bias")
247 box
.prop(ant
, "marble_sharp")
248 col
= box
.column(align
=True)
249 col
.prop(ant
, "distortion")
250 col
.prop(ant
, "noise_depth")
252 row
= col
.row(align
=True)
253 row
.prop(ant
, "hard_noise", expand
=True)
254 elif ant
.noise_type
== "shattered_hterrain":
255 col
.prop(ant
, "noise_depth")
256 col
.prop(ant
, "dimension")
257 col
.prop(ant
, "lacunarity")
258 col
.prop(ant
, "offset")
259 col
.prop(ant
, "distortion")
260 elif ant
.noise_type
== "strata_hterrain":
261 col
.prop(ant
, "noise_depth")
262 col
.prop(ant
, "dimension")
263 col
.prop(ant
, "lacunarity")
264 col
.prop(ant
, "offset")
265 col
.prop(ant
, "distortion", text
="Strata")
266 elif ant
.noise_type
== "ant_turbulence":
267 col
.prop(ant
, "noise_depth")
268 col
.prop(ant
, "amplitude")
269 col
.prop(ant
, "frequency")
270 col
.prop(ant
, "distortion")
272 row
= col
.row(align
=True)
273 row
.prop(ant
, "hard_noise", expand
=True)
274 elif ant
.noise_type
== "vl_noise_turbulence":
275 col
.prop(ant
, "noise_depth")
276 col
.prop(ant
, "amplitude")
277 col
.prop(ant
, "frequency")
278 col
.prop(ant
, "distortion")
280 box
.prop(ant
, "vl_basis_type")
282 row
= col
.row(align
=True)
283 row
.prop(ant
, "hard_noise", expand
=True)
284 elif ant
.noise_type
== "vl_hTerrain":
285 col
.prop(ant
, "noise_depth")
286 col
.prop(ant
, "dimension")
287 col
.prop(ant
, "lacunarity")
288 col
.prop(ant
, "offset")
289 col
.prop(ant
, "distortion")
291 box
.prop(ant
, "vl_basis_type")
292 elif ant
.noise_type
== "distorted_heteroTerrain":
293 col
.prop(ant
, "noise_depth")
294 col
.prop(ant
, "dimension")
295 col
.prop(ant
, "lacunarity")
296 col
.prop(ant
, "offset")
297 col
.prop(ant
, "distortion")
299 col
.prop(ant
, "vl_basis_type")
300 elif ant
.noise_type
== "double_multiFractal":
301 col
.prop(ant
, "noise_depth")
302 col
.prop(ant
, "dimension")
303 col
.prop(ant
, "lacunarity")
304 col
.prop(ant
, "offset")
305 col
.prop(ant
, "gain")
307 box
.prop(ant
, "vl_basis_type")
308 elif ant
.noise_type
== "rocks_noise":
309 col
.prop(ant
, "noise_depth")
310 col
.prop(ant
, "distortion")
312 row
= col
.row(align
=True)
313 row
.prop(ant
, "hard_noise", expand
=True)
314 elif ant
.noise_type
== "slick_rock":
315 col
.prop(ant
, "noise_depth")
316 col
.prop(ant
, "dimension")
317 col
.prop(ant
, "lacunarity")
318 col
.prop(ant
, "gain")
319 col
.prop(ant
, "offset")
320 col
.prop(ant
, "distortion")
322 box
.prop(ant
, "vl_basis_type")
323 elif ant
.noise_type
== "planet_noise":
324 col
.prop(ant
, "noise_depth")
326 row
= col
.row(align
=True)
327 row
.prop(ant
, "hard_noise", expand
=True)
330 col
= box
.column(align
=False)
331 box
.prop(ant
, "fx_type")
332 if ant
.fx_type
!= "0":
333 if int(ant
.fx_type
) <= 12:
334 box
.prop(ant
, "fx_bias")
336 box
.prop(ant
, "fx_mix_mode")
337 col
= box
.column(align
=True)
338 col
.prop(ant
, "fx_mixfactor")
340 col
= box
.column(align
=True)
341 col
.prop(ant
, "fx_loc_x")
342 col
.prop(ant
, "fx_loc_y")
343 col
.prop(ant
, "fx_size")
345 col
= box
.column(align
=True)
346 col
.prop(ant
, "fx_depth")
347 if ant
.fx_depth
!= 0:
348 col
.prop(ant
, "fx_frequency")
349 col
.prop(ant
, "fx_amplitude")
350 col
.prop(ant
, "fx_turb")
352 col
= box
.column(align
=True)
353 row
= col
.row(align
=True).split(factor
=0.92, align
=True)
354 row
.prop(ant
, "fx_height")
355 row
.prop(ant
, "fx_invert", toggle
=True, text
="", icon
='ARROW_LEFTRIGHT')
356 col
.prop(ant
, "fx_offset")
359 # Landscape Displace Settings
360 class AntDisplaceSettingsPanel(bpy
.types
.Panel
):
361 bl_category
= "Create"
362 bl_label
= "Landscape Displace"
363 bl_idname
= "ANTLANDSCAPE_PT_disp"
364 bl_space_type
= "VIEW_3D"
365 bl_region_type
= "UI"
366 bl_options
= {'DEFAULT_CLOSED'}
369 def poll(cls
, context
):
370 ob
= bpy
.context
.active_object
371 return ob
.ant_landscape
.keys() if ob
else False
373 def draw(self
, context
):
375 scene
= context
.scene
376 ob
= bpy
.context
.active_object
377 ant
= ob
.ant_landscape
379 col
= box
.column(align
=True)
382 col
.operator('mesh.ant_landscape_regenerate', text
="Regenerate", icon
="LOOP_FORWARDS")
384 col
.operator('mesh.ant_landscape_refresh', text
="Refresh", icon
="FILE_REFRESH")
386 col
= box
.column(align
=True)
387 row
= col
.row(align
=True).split(factor
=0.92, align
=True)
388 row
.prop(ant
, "height")
389 row
.prop(ant
, "height_invert", toggle
=True, text
="", icon
='ARROW_LEFTRIGHT')
390 col
.prop(ant
, "height_offset")
391 col
.prop(ant
, "maximum")
392 col
.prop(ant
, "minimum")
393 if not ant
.sphere_mesh
:
395 col
.prop(ant
, "edge_falloff")
396 if ant
.edge_falloff
!= "0":
397 col
= box
.column(align
=True)
398 col
.prop(ant
, "edge_level")
399 if ant
.edge_falloff
in ["2", "3"]:
400 col
.prop(ant
, "falloff_x")
401 if ant
.edge_falloff
in ["1", "3"]:
402 col
.prop(ant
, "falloff_y")
405 col
.prop(ant
, "strata_type")
406 if ant
.strata_type
!= "0":
408 col
.prop(ant
, "strata")
410 col
.prop_search(ant
, "vert_group", ob
, "vertex_groups")
413 # ------------------------------------------------------------
415 class AntLandscapePropertiesGroup(bpy
.types
.PropertyGroup
):
417 ant_terrain_name
: StringProperty(
421 land_material
: StringProperty(
424 description
="Terrain material"
426 water_material
: StringProperty(
429 description
="Water plane material"
431 texture_block
: StringProperty(
435 at_cursor
: BoolProperty(
438 description
="Place at cursor location",
440 smooth_mesh
: BoolProperty(
443 description
="Shade smooth"
445 tri_face
: BoolProperty(
448 description
="Triangulate faces"
450 sphere_mesh
: BoolProperty(
453 description
="Generate uv sphere - remove doubles when ready"
455 subdivision_x
: IntProperty(
456 name
="Subdivisions X",
460 description
="Mesh X subdivisions"
462 subdivision_y
: IntProperty(
464 name
="Subdivisions Y",
467 description
="Mesh Y subdivisions"
469 mesh_size
: FloatProperty(
474 description
="Mesh size"
476 mesh_size_x
: FloatProperty(
480 description
="Mesh x size"
482 mesh_size_y
: FloatProperty(
486 description
="Mesh y size"
489 random_seed
: IntProperty(
493 description
="Randomize noise origin"
495 noise_offset_x
: FloatProperty(
498 description
="Noise X Offset"
500 noise_offset_y
: FloatProperty(
503 description
="Noise Y Offset"
505 noise_offset_z
: FloatProperty(
508 description
="Noise Z Offset"
510 noise_size_x
: FloatProperty(
515 description
="Noise x size"
517 noise_size_y
: FloatProperty(
522 description
="Noise y size"
524 noise_size_z
: FloatProperty(
529 description
="Noise Z size"
531 noise_size
: FloatProperty(
536 description
="Noise size"
538 noise_type
: EnumProperty(
540 default
='hetero_terrain',
541 description
="Noise type",
543 ('multi_fractal', "Multi Fractal", "Blender: Multi Fractal algorithm", 0),
544 ('ridged_multi_fractal', "Ridged MFractal", "Blender: Ridged Multi Fractal", 1),
545 ('hybrid_multi_fractal', "Hybrid MFractal", "Blender: Hybrid Multi Fractal", 2),
546 ('hetero_terrain', "Hetero Terrain", "Blender: Hetero Terrain", 3),
547 ('fractal', "fBm Fractal", "Blender: fBm - Fractional Browninian motion", 4),
548 ('turbulence_vector', "Turbulence", "Blender: Turbulence Vector", 5),
549 ('variable_lacunarity', "Distorted Noise", "Blender: Distorted Noise", 6),
550 ('marble_noise', "Marble", "A.N.T.: Marble Noise", 7),
551 ('shattered_hterrain', "Shattered hTerrain", "A.N.T.: Shattered hTerrain", 8),
552 ('strata_hterrain', "Strata hTerrain", "A.N.T: Strata hTerrain", 9),
553 ('ant_turbulence', "Another Noise", "A.N.T: Turbulence variation", 10),
554 ('vl_noise_turbulence', "vlNoise turbulence", "A.N.T: Real vlNoise turbulence", 11),
555 ('vl_hTerrain', "vlNoise hTerrain", "A.N.T: vlNoise hTerrain", 12),
556 ('distorted_heteroTerrain', "Distorted hTerrain", "A.N.T distorted hTerrain", 13),
557 ('double_multiFractal', "Double MultiFractal", "A.N.T: double multiFractal", 14),
558 ('rocks_noise', "Noise Rocks", "A.N.T: turbulence variation", 15),
559 ('slick_rock', "Slick Rock", "A.N.T: slick rock", 16),
560 ('planet_noise', "Planet Noise", "Planet Noise by: Farsthary", 17),
561 ('blender_texture', "Blender Texture - Texture Nodes", "Blender texture data block", 18)]
563 basis_type
: EnumProperty(
565 default
=ant_noise
.noise_basis_default
,
566 description
="Noise basis algorithms",
567 items
= ant_noise
.noise_basis
569 vl_basis_type
: EnumProperty(
570 name
="vlNoise Basis",
571 default
=ant_noise
.noise_basis_default
,
572 description
="VLNoise basis algorithms",
573 items
= ant_noise
.noise_basis
575 distortion
: FloatProperty(
580 description
="Distortion amount"
582 hard_noise
: EnumProperty(
585 description
="Soft Noise, Hard noise",
587 ("0", "Soft", "Soft Noise", 0),
588 ("1", "Hard", "Hard noise", 1)]
590 noise_depth
: IntProperty(
595 description
="Noise Depth - number of frequencies in the fBm"
597 amplitude
: FloatProperty(
602 description
="Amplitude"
604 frequency
: FloatProperty(
609 description
="Frequency"
611 dimension
: FloatProperty(
616 description
="H - fractal dimension of the roughest areas"
618 lacunarity
: FloatProperty(
623 description
="Lacunarity - gap between successive frequencies"
625 offset
: FloatProperty(
630 description
="Offset - raises the terrain from sea level"
637 description
="Gain - scale factor"
639 marble_bias
: EnumProperty(
642 description
="Marble bias",
644 ("0", "Sin", "Sin", 0),
645 ("1", "Cos", "Cos", 1),
646 ("2", "Tri", "Tri", 2),
647 ("3", "Saw", "Saw", 3)]
649 marble_sharp
: EnumProperty(
652 description
="Marble sharpness",
654 ("0", "Soft", "Soft", 0),
655 ("1", "Sharp", "Sharp", 1),
656 ("2", "Sharper", "Sharper", 2),
657 ("3", "Soft inv.", "Soft", 3),
658 ("4", "Sharp inv.", "Sharp", 4),
659 ("5", "Sharper inv.", "Sharper", 5)]
661 marble_shape
: EnumProperty(
664 description
="Marble shape",
666 ("0", "Default", "Default", 0),
667 ("1", "Ring", "Ring", 1),
668 ("2", "Swirl", "Swirl", 2),
669 ("3", "Bump", "Bump", 3),
670 ("4", "Wave", "Wave", 4),
675 height
: FloatProperty(
680 description
="Noise intensity scale"
682 height_invert
: BoolProperty(
685 description
="Height invert",
687 height_offset
: FloatProperty(
692 description
="Height offset"
694 fx_mixfactor
: FloatProperty(
699 description
="Effect mix factor: -1.0 = Noise, +1.0 = Effect"
701 fx_mix_mode
: EnumProperty(
704 description
="Effect mix mode",
706 ("0", "Mix", "Mix", 0),
707 ("1", "Add", "Add", 1),
708 ("2", "Sub", "Subtract", 2),
709 ("3", "Mul", "Multiply", 3),
710 ("4", "Abs", "Absolute", 4),
711 ("5", "Scr", "Screen", 5),
712 ("6", "Mod", "Modulo", 6),
713 ("7", "Min", "Minimum", 7),
714 ("8", "Max", "Maximum", 8)
717 fx_type
: EnumProperty(
720 description
="Effect type",
722 ("0", "None", "No effect", 0),
723 ("1", "Gradient", "Gradient", 1),
724 ("2", "Waves", "Waves - Bumps", 2),
725 ("3", "Zigzag", "Zigzag", 3),
726 ("4", "Wavy", "Wavy", 4),
727 ("5", "Bump", "Bump", 5),
728 ("6", "Dots", "Dots", 6),
729 ("7", "Rings", "Rings", 7),
730 ("8", "Spiral", "Spiral", 8),
731 ("9", "Square", "Square", 9),
732 ("10", "Blocks", "Blocks", 10),
733 ("11", "Grid", "Grid", 11),
734 ("12", "Tech", "Tech", 12),
735 ("13", "Crackle", "Crackle", 13),
736 ("14", "Cracks", "Cracks", 14),
737 ("15", "Rock", "Rock noise", 15),
738 ("16", "Lunar", "Craters", 16),
739 ("17", "Cosine", "Cosine", 17),
740 ("18", "Spikey", "Spikey", 18),
741 ("19", "Stone", "Stone", 19),
742 ("20", "Flat Turb", "Flat turbulence", 20),
743 ("21", "Flat Voronoi", "Flat voronoi", 21)
746 fx_bias
: EnumProperty(
749 description
="Effect bias type",
751 ("0", "Sin", "Sin", 0),
752 ("1", "Cos", "Cos", 1),
753 ("2", "Tri", "Tri", 2),
754 ("3", "Saw", "Saw", 3),
755 ("4", "None", "None", 4)]
757 fx_turb
: FloatProperty(
762 description
="Effect turbulence distortion"
764 fx_depth
: IntProperty(
769 description
="Effect depth - number of frequencies"
771 fx_amplitude
: FloatProperty(
776 description
="Amplitude"
778 fx_frequency
: FloatProperty(
783 description
="Frequency"
785 fx_size
: FloatProperty(
790 description
="Effect size"
792 fx_loc_x
: FloatProperty(
795 description
="Effect x offset"
797 fx_loc_y
: FloatProperty(
800 description
="Effect y offset"
802 fx_height
: FloatProperty(
807 description
="Effect intensity scale"
809 fx_invert
: BoolProperty(
812 description
="Effect invert"
814 fx_offset
: FloatProperty(
819 description
="Effect height offset"
822 edge_falloff
: EnumProperty(
825 description
="Flatten edges",
827 ("0", "None", "None", 0),
828 ("1", "Y", "Y Falloff", 1),
829 ("2", "X", "X Falloff", 2),
830 ("3", "X Y", "X Y Falloff", 3)]
832 falloff_x
: FloatProperty(
837 description
="Falloff x scale"
839 falloff_y
: FloatProperty(
844 description
="Falloff y scale"
846 edge_level
: FloatProperty(
851 description
="Edge level, sealevel offset"
853 maximum
: FloatProperty(
858 description
="Maximum, flattens terrain at plateau level"
860 minimum
: FloatProperty(
865 description
="Minimum, flattens terrain at seabed level"
867 vert_group
: StringProperty(
871 strata
: FloatProperty(
876 description
="Strata layers / terraces"
878 strata_type
: EnumProperty(
881 description
="Strata types",
883 ("0", "None", "No strata", 0),
884 ("1", "Smooth", "Smooth transitions", 1),
885 ("2", "Sharp Sub", "Sharp subtract transitions", 2),
886 ("3", "Sharp Add", "Sharp add transitions", 3),
887 ("4", "Quantize", "Quantize", 4),
888 ("5", "Quantize Mix", "Quantize mixed", 5)]
890 water_plane
: BoolProperty(
893 description
="Add water plane"
895 water_level
: FloatProperty(
900 description
="Water level"
902 remove_double
: BoolProperty(
903 name
="Remove Doubles",
905 description
="Remove doubles"
907 refresh
: BoolProperty(
910 description
="Refresh"
912 auto_refresh
: BoolProperty(
915 description
="Automatic refresh"
918 # ------------------------------------------------------------
922 AntLandscapeAddPanel
,
923 AntLandscapeToolsPanel
,
924 AntMainSettingsPanel
,
925 AntNoiseSettingsPanel
,
926 AntDisplaceSettingsPanel
,
927 AntLandscapePropertiesGroup
,
928 add_mesh_ant_landscape
.AntAddLandscape
,
929 mesh_ant_displace
.AntMeshDisplace
,
930 ant_functions
.AntLandscapeRefresh
,
931 ant_functions
.AntLandscapeRegenerate
,
932 ant_functions
.AntVgSlopeMap
,
933 ant_functions
.Eroder
,
938 bpy
.utils
.register_class(cls
)
940 bpy
.types
.VIEW3D_MT_mesh_add
.append(menu_func_landscape
)
941 bpy
.types
.Object
.ant_landscape
= PointerProperty(type=AntLandscapePropertiesGroup
, name
="ANT_Landscape", description
="Landscape properties")
942 bpy
.types
.VIEW3D_MT_paint_weight
.append(menu_func_eroder
)
946 for cls
in reversed(classes
):
947 bpy
.utils
.unregister_class(cls
)
948 bpy
.types
.VIEW3D_MT_mesh_add
.remove(menu_func_landscape
)
949 bpy
.types
.VIEW3D_MT_paint_weight
.remove(menu_func_eroder
)
952 if __name__
== "__main__":