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 "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 AntLandscapeAddPanel(bpy
.types
.Panel
):
79 bl_category
= "Create"
80 bl_label
= "Landscape"
81 bl_idname
= "ANTLANDSCAPE_PT_add"
82 bl_space_type
= "VIEW_3D"
84 bl_context
= "objectmode"
86 def draw(self
, context
):
87 col
= self
.layout
.column()
88 col
.operator('mesh.landscape_add', text
="Landscape", icon
="RNDCURVE")
92 class AntLandscapeToolsPanel(bpy
.types
.Panel
):
93 bl_category
= "Create"
94 bl_label
= "Landscape Tools"
95 bl_idname
= "ANTLANDSCAPE_PT_tools"
96 bl_space_type
= "VIEW_3D"
98 bl_context
= "objectmode"
99 bl_options
= {'DEFAULT_CLOSED'}
102 def poll(cls
, context
):
103 ob
= bpy
.context
.active_object
104 return (ob
and ob
.type == 'MESH')
106 def draw(self
, context
):
108 ob
= context
.active_object
109 col
= layout
.column()
110 col
.operator('mesh.ant_displace', text
="Mesh Displace", icon
="RNDCURVE")
111 col
.operator('mesh.ant_slope_map', icon
='GROUP_VERTEX')
112 if ob
.ant_landscape
.keys() and not ob
.ant_landscape
['sphere_mesh']:
113 col
.operator('mesh.eroder', text
="Landscape Eroder", icon
='SMOOTHCURVE')
116 # Landscape Main Settings
117 class AntMainSettingsPanel(bpy
.types
.Panel
):
118 bl_category
= "Create"
119 bl_label
= "Landscape Main"
120 bl_idname
= "ANTLANDSCAPE_PT_main"
121 bl_space_type
= "VIEW_3D"
122 bl_region_type
= "UI"
123 bl_options
= {'DEFAULT_CLOSED'}
126 def poll(cls
, context
):
127 ob
= bpy
.context
.active_object
128 return ob
.ant_landscape
.keys() if ob
else False
130 def draw(self
, context
):
132 scene
= context
.scene
133 ob
= bpy
.context
.active_object
134 ant
= ob
.ant_landscape
136 col
= box
.column(align
=False)
138 col
.operator('mesh.ant_landscape_regenerate', text
="Regenerate", icon
="LOOP_FORWARDS")
139 row
= box
.row(align
=True)
140 split
= row
.split(align
=True)
141 split
.prop(ant
, "smooth_mesh", toggle
=True, text
="Smooth", icon
='SHADING_SOLID')
142 split
.prop(ant
, "tri_face", toggle
=True, text
="Triangulate", icon
='MESH_DATA')
144 split
.prop(ant
, "remove_double", toggle
=True, text
="Remove Doubles", icon
='MESH_DATA')
145 box
.prop(ant
, "ant_terrain_name")
146 box
.prop_search(ant
, "land_material", bpy
.data
, "materials")
147 col
= box
.column(align
=True)
148 col
.prop(ant
, "subdivision_x")
149 col
.prop(ant
, "subdivision_y")
150 col
= box
.column(align
=True)
152 col
.prop(ant
, "mesh_size")
154 col
.prop(ant
, "mesh_size_x")
155 col
.prop(ant
, "mesh_size_y")
158 # Landscape Noise Settings
159 class AntNoiseSettingsPanel(bpy
.types
.Panel
):
160 bl_category
= "Create"
161 bl_label
= "Landscape Noise"
162 bl_idname
= "ANTLANDSCAPE_PT_noise"
163 bl_space_type
= "VIEW_3D"
164 bl_region_type
= "UI"
165 bl_options
= {'DEFAULT_CLOSED'}
168 def poll(cls
, context
):
169 ob
= bpy
.context
.active_object
170 return ob
.ant_landscape
.keys() if ob
else False
172 def draw(self
, context
):
174 scene
= context
.scene
175 ob
= bpy
.context
.active_object
176 ant
= ob
.ant_landscape
178 col
= box
.column(align
=True)
181 col
.operator('mesh.ant_landscape_regenerate', text
="Regenerate", icon
="LOOP_FORWARDS")
183 col
.operator('mesh.ant_landscape_refresh', text
="Refresh", icon
="FILE_REFRESH")
185 box
.prop(ant
, "noise_type")
186 if ant
.noise_type
== "blender_texture":
187 box
.prop_search(ant
, "texture_block", bpy
.data
, "textures")
189 box
.prop(ant
, "basis_type")
191 col
= box
.column(align
=True)
192 col
.prop(ant
, "random_seed")
193 col
= box
.column(align
=True)
194 col
.prop(ant
, "noise_offset_x")
195 col
.prop(ant
, "noise_offset_y")
197 col
.prop(ant
, "noise_offset_z")
198 col
.prop(ant
, "noise_size_x")
199 col
.prop(ant
, "noise_size_y")
201 col
.prop(ant
, "noise_size_z")
202 col
= box
.column(align
=True)
203 col
.prop(ant
, "noise_size")
205 col
= box
.column(align
=True)
206 if ant
.noise_type
== "multi_fractal":
207 col
.prop(ant
, "noise_depth")
208 col
.prop(ant
, "dimension")
209 col
.prop(ant
, "lacunarity")
210 elif ant
.noise_type
== "ridged_multi_fractal":
211 col
.prop(ant
, "noise_depth")
212 col
.prop(ant
, "dimension")
213 col
.prop(ant
, "lacunarity")
214 col
.prop(ant
, "offset")
215 col
.prop(ant
, "gain")
216 elif ant
.noise_type
== "hybrid_multi_fractal":
217 col
.prop(ant
, "noise_depth")
218 col
.prop(ant
, "dimension")
219 col
.prop(ant
, "lacunarity")
220 col
.prop(ant
, "offset")
221 col
.prop(ant
, "gain")
222 elif ant
.noise_type
== "hetero_terrain":
223 col
.prop(ant
, "noise_depth")
224 col
.prop(ant
, "dimension")
225 col
.prop(ant
, "lacunarity")
226 col
.prop(ant
, "offset")
227 elif ant
.noise_type
== "fractal":
228 col
.prop(ant
, "noise_depth")
229 col
.prop(ant
, "dimension")
230 col
.prop(ant
, "lacunarity")
231 elif ant
.noise_type
== "turbulence_vector":
232 col
.prop(ant
, "noise_depth")
233 col
.prop(ant
, "amplitude")
234 col
.prop(ant
, "frequency")
236 row
= col
.row(align
=True)
237 row
.prop(ant
, "hard_noise", expand
=True)
238 elif ant
.noise_type
== "variable_lacunarity":
239 box
.prop(ant
, "vl_basis_type")
240 box
.prop(ant
, "distortion")
241 elif ant
.noise_type
== "marble_noise":
242 box
.prop(ant
, "marble_shape")
243 box
.prop(ant
, "marble_bias")
244 box
.prop(ant
, "marble_sharp")
245 col
= box
.column(align
=True)
246 col
.prop(ant
, "distortion")
247 col
.prop(ant
, "noise_depth")
249 row
= col
.row(align
=True)
250 row
.prop(ant
, "hard_noise", expand
=True)
251 elif ant
.noise_type
== "shattered_hterrain":
252 col
.prop(ant
, "noise_depth")
253 col
.prop(ant
, "dimension")
254 col
.prop(ant
, "lacunarity")
255 col
.prop(ant
, "offset")
256 col
.prop(ant
, "distortion")
257 elif ant
.noise_type
== "strata_hterrain":
258 col
.prop(ant
, "noise_depth")
259 col
.prop(ant
, "dimension")
260 col
.prop(ant
, "lacunarity")
261 col
.prop(ant
, "offset")
262 col
.prop(ant
, "distortion", text
="Strata")
263 elif ant
.noise_type
== "ant_turbulence":
264 col
.prop(ant
, "noise_depth")
265 col
.prop(ant
, "amplitude")
266 col
.prop(ant
, "frequency")
267 col
.prop(ant
, "distortion")
269 row
= col
.row(align
=True)
270 row
.prop(ant
, "hard_noise", expand
=True)
271 elif ant
.noise_type
== "vl_noise_turbulence":
272 col
.prop(ant
, "noise_depth")
273 col
.prop(ant
, "amplitude")
274 col
.prop(ant
, "frequency")
275 col
.prop(ant
, "distortion")
277 box
.prop(ant
, "vl_basis_type")
279 row
= col
.row(align
=True)
280 row
.prop(ant
, "hard_noise", expand
=True)
281 elif ant
.noise_type
== "vl_hTerrain":
282 col
.prop(ant
, "noise_depth")
283 col
.prop(ant
, "dimension")
284 col
.prop(ant
, "lacunarity")
285 col
.prop(ant
, "offset")
286 col
.prop(ant
, "distortion")
288 box
.prop(ant
, "vl_basis_type")
289 elif ant
.noise_type
== "distorted_heteroTerrain":
290 col
.prop(ant
, "noise_depth")
291 col
.prop(ant
, "dimension")
292 col
.prop(ant
, "lacunarity")
293 col
.prop(ant
, "offset")
294 col
.prop(ant
, "distortion")
296 col
.prop(ant
, "vl_basis_type")
297 elif ant
.noise_type
== "double_multiFractal":
298 col
.prop(ant
, "noise_depth")
299 col
.prop(ant
, "dimension")
300 col
.prop(ant
, "lacunarity")
301 col
.prop(ant
, "offset")
302 col
.prop(ant
, "gain")
304 box
.prop(ant
, "vl_basis_type")
305 elif ant
.noise_type
== "rocks_noise":
306 col
.prop(ant
, "noise_depth")
307 col
.prop(ant
, "distortion")
309 row
= col
.row(align
=True)
310 row
.prop(ant
, "hard_noise", expand
=True)
311 elif ant
.noise_type
== "slick_rock":
312 col
.prop(ant
, "noise_depth")
313 col
.prop(ant
, "dimension")
314 col
.prop(ant
, "lacunarity")
315 col
.prop(ant
, "gain")
316 col
.prop(ant
, "offset")
317 col
.prop(ant
, "distortion")
319 box
.prop(ant
, "vl_basis_type")
320 elif ant
.noise_type
== "planet_noise":
321 col
.prop(ant
, "noise_depth")
323 row
= col
.row(align
=True)
324 row
.prop(ant
, "hard_noise", expand
=True)
327 col
= box
.column(align
=False)
328 box
.prop(ant
, "fx_type")
329 if ant
.fx_type
!= "0":
330 if int(ant
.fx_type
) <= 12:
331 box
.prop(ant
, "fx_bias")
333 box
.prop(ant
, "fx_mix_mode")
334 col
= box
.column(align
=True)
335 col
.prop(ant
, "fx_mixfactor")
337 col
= box
.column(align
=True)
338 col
.prop(ant
, "fx_loc_x")
339 col
.prop(ant
, "fx_loc_y")
340 col
.prop(ant
, "fx_size")
342 col
= box
.column(align
=True)
343 col
.prop(ant
, "fx_depth")
344 if ant
.fx_depth
!= 0:
345 col
.prop(ant
, "fx_frequency")
346 col
.prop(ant
, "fx_amplitude")
347 col
.prop(ant
, "fx_turb")
349 col
= box
.column(align
=True)
350 row
= col
.row(align
=True).split(factor
=0.92, align
=True)
351 row
.prop(ant
, "fx_height")
352 row
.prop(ant
, "fx_invert", toggle
=True, text
="", icon
='ARROW_LEFTRIGHT')
353 col
.prop(ant
, "fx_offset")
356 # Landscape Displace Settings
357 class AntDisplaceSettingsPanel(bpy
.types
.Panel
):
358 bl_category
= "Create"
359 bl_label
= "Landscape Displace"
360 bl_idname
= "ANTLANDSCAPE_PT_disp"
361 bl_space_type
= "VIEW_3D"
362 bl_region_type
= "UI"
363 bl_options
= {'DEFAULT_CLOSED'}
366 def poll(cls
, context
):
367 ob
= bpy
.context
.active_object
368 return ob
.ant_landscape
.keys() if ob
else False
370 def draw(self
, context
):
372 scene
= context
.scene
373 ob
= bpy
.context
.active_object
374 ant
= ob
.ant_landscape
376 col
= box
.column(align
=True)
379 col
.operator('mesh.ant_landscape_regenerate', text
="Regenerate", icon
="LOOP_FORWARDS")
381 col
.operator('mesh.ant_landscape_refresh', text
="Refresh", icon
="FILE_REFRESH")
383 col
= box
.column(align
=True)
384 row
= col
.row(align
=True).split(factor
=0.92, align
=True)
385 row
.prop(ant
, "height")
386 row
.prop(ant
, "height_invert", toggle
=True, text
="", icon
='ARROW_LEFTRIGHT')
387 col
.prop(ant
, "height_offset")
388 col
.prop(ant
, "maximum")
389 col
.prop(ant
, "minimum")
390 if not ant
.sphere_mesh
:
392 col
.prop(ant
, "edge_falloff")
393 if ant
.edge_falloff
!= "0":
394 col
= box
.column(align
=True)
395 col
.prop(ant
, "edge_level")
396 if ant
.edge_falloff
in ["2", "3"]:
397 col
.prop(ant
, "falloff_x")
398 if ant
.edge_falloff
in ["1", "3"]:
399 col
.prop(ant
, "falloff_y")
402 col
.prop(ant
, "strata_type")
403 if ant
.strata_type
!= "0":
405 col
.prop(ant
, "strata")
407 col
.prop_search(ant
, "vert_group", ob
, "vertex_groups")
410 # ------------------------------------------------------------
412 class AntLandscapePropertiesGroup(bpy
.types
.PropertyGroup
):
414 ant_terrain_name
: StringProperty(
418 land_material
: StringProperty(
421 description
="Terrain material"
423 water_material
: StringProperty(
426 description
="Water plane material"
428 texture_block
: StringProperty(
432 at_cursor
: BoolProperty(
435 description
="Place at cursor location",
437 smooth_mesh
: BoolProperty(
440 description
="Shade smooth"
442 tri_face
: BoolProperty(
445 description
="Triangulate faces"
447 sphere_mesh
: BoolProperty(
450 description
="Generate uv sphere - remove doubles when ready"
452 subdivision_x
: IntProperty(
453 name
="Subdivisions X",
457 description
="Mesh X subdivisions"
459 subdivision_y
: IntProperty(
461 name
="Subdivisions Y",
464 description
="Mesh Y subdivisions"
466 mesh_size
: FloatProperty(
471 description
="Mesh size"
473 mesh_size_x
: FloatProperty(
477 description
="Mesh x size"
479 mesh_size_y
: FloatProperty(
483 description
="Mesh y size"
486 random_seed
: IntProperty(
490 description
="Randomize noise origin"
492 noise_offset_x
: FloatProperty(
495 description
="Noise X Offset"
497 noise_offset_y
: FloatProperty(
500 description
="Noise Y Offset"
502 noise_offset_z
: FloatProperty(
505 description
="Noise Z Offset"
507 noise_size_x
: FloatProperty(
512 description
="Noise x size"
514 noise_size_y
: FloatProperty(
519 description
="Noise y size"
521 noise_size_z
: FloatProperty(
526 description
="Noise Z size"
528 noise_size
: FloatProperty(
533 description
="Noise size"
535 noise_type
: EnumProperty(
537 default
='hetero_terrain',
538 description
="Noise type",
540 ('multi_fractal', "Multi Fractal", "Blender: Multi Fractal algorithm", 0),
541 ('ridged_multi_fractal', "Ridged MFractal", "Blender: Ridged Multi Fractal", 1),
542 ('hybrid_multi_fractal', "Hybrid MFractal", "Blender: Hybrid Multi Fractal", 2),
543 ('hetero_terrain', "Hetero Terrain", "Blender: Hetero Terrain", 3),
544 ('fractal', "fBm Fractal", "Blender: fBm - Fractional Browninian motion", 4),
545 ('turbulence_vector', "Turbulence", "Blender: Turbulence Vector", 5),
546 ('variable_lacunarity', "Distorted Noise", "Blender: Distorted Noise", 6),
547 ('marble_noise', "Marble", "A.N.T.: Marble Noise", 7),
548 ('shattered_hterrain', "Shattered hTerrain", "A.N.T.: Shattered hTerrain", 8),
549 ('strata_hterrain', "Strata hTerrain", "A.N.T: Strata hTerrain", 9),
550 ('ant_turbulence', "Another Noise", "A.N.T: Turbulence variation", 10),
551 ('vl_noise_turbulence', "vlNoise turbulence", "A.N.T: Real vlNoise turbulence", 11),
552 ('vl_hTerrain', "vlNoise hTerrain", "A.N.T: vlNoise hTerrain", 12),
553 ('distorted_heteroTerrain', "Distorted hTerrain", "A.N.T distorted hTerrain", 13),
554 ('double_multiFractal', "Double MultiFractal", "A.N.T: double multiFractal", 14),
555 ('rocks_noise', "Noise Rocks", "A.N.T: turbulence variation", 15),
556 ('slick_rock', "Slick Rock", "A.N.T: slick rock", 16),
557 ('planet_noise', "Planet Noise", "Planet Noise by: Farsthary", 17),
558 ('blender_texture', "Blender Texture - Texture Nodes", "Blender texture data block", 18)]
560 basis_type
: EnumProperty(
562 default
=ant_noise
.noise_basis_default
,
563 description
="Noise basis algorithms",
564 items
= ant_noise
.noise_basis
566 vl_basis_type
: EnumProperty(
567 name
="vlNoise Basis",
568 default
=ant_noise
.noise_basis_default
,
569 description
="VLNoise basis algorithms",
570 items
= ant_noise
.noise_basis
572 distortion
: FloatProperty(
577 description
="Distortion amount"
579 hard_noise
: EnumProperty(
582 description
="Soft Noise, Hard noise",
584 ("0", "Soft", "Soft Noise", 0),
585 ("1", "Hard", "Hard noise", 1)]
587 noise_depth
: IntProperty(
592 description
="Noise Depth - number of frequencies in the fBm"
594 amplitude
: FloatProperty(
599 description
="Amplitude"
601 frequency
: FloatProperty(
606 description
="Frequency"
608 dimension
: FloatProperty(
613 description
="H - fractal dimension of the roughest areas"
615 lacunarity
: FloatProperty(
620 description
="Lacunarity - gap between successive frequencies"
622 offset
: FloatProperty(
627 description
="Offset - raises the terrain from sea level"
634 description
="Gain - scale factor"
636 marble_bias
: EnumProperty(
639 description
="Marble bias",
641 ("0", "Sin", "Sin", 0),
642 ("1", "Cos", "Cos", 1),
643 ("2", "Tri", "Tri", 2),
644 ("3", "Saw", "Saw", 3)]
646 marble_sharp
: EnumProperty(
649 description
="Marble sharpness",
651 ("0", "Soft", "Soft", 0),
652 ("1", "Sharp", "Sharp", 1),
653 ("2", "Sharper", "Sharper", 2),
654 ("3", "Soft inv.", "Soft", 3),
655 ("4", "Sharp inv.", "Sharp", 4),
656 ("5", "Sharper inv.", "Sharper", 5)]
658 marble_shape
: EnumProperty(
661 description
="Marble shape",
663 ("0", "Default", "Default", 0),
664 ("1", "Ring", "Ring", 1),
665 ("2", "Swirl", "Swirl", 2),
666 ("3", "Bump", "Bump", 3),
667 ("4", "Wave", "Wave", 4),
672 height
: FloatProperty(
677 description
="Noise intensity scale"
679 height_invert
: BoolProperty(
682 description
="Height invert",
684 height_offset
: FloatProperty(
689 description
="Height offset"
691 fx_mixfactor
: FloatProperty(
696 description
="Effect mix factor: -1.0 = Noise, +1.0 = Effect"
698 fx_mix_mode
: EnumProperty(
701 description
="Effect mix mode",
703 ("0", "Mix", "Mix", 0),
704 ("1", "Add", "Add", 1),
705 ("2", "Sub", "Subtract", 2),
706 ("3", "Mul", "Multiply", 3),
707 ("4", "Abs", "Absolute", 4),
708 ("5", "Scr", "Screen", 5),
709 ("6", "Mod", "Modulo", 6),
710 ("7", "Min", "Minimum", 7),
711 ("8", "Max", "Maximum", 8)
714 fx_type
: EnumProperty(
717 description
="Effect type",
719 ("0", "None", "No effect", 0),
720 ("1", "Gradient", "Gradient", 1),
721 ("2", "Waves", "Waves - Bumps", 2),
722 ("3", "Zigzag", "Zigzag", 3),
723 ("4", "Wavy", "Wavy", 4),
724 ("5", "Bump", "Bump", 5),
725 ("6", "Dots", "Dots", 6),
726 ("7", "Rings", "Rings", 7),
727 ("8", "Spiral", "Spiral", 8),
728 ("9", "Square", "Square", 9),
729 ("10", "Blocks", "Blocks", 10),
730 ("11", "Grid", "Grid", 11),
731 ("12", "Tech", "Tech", 12),
732 ("13", "Crackle", "Crackle", 13),
733 ("14", "Cracks", "Cracks", 14),
734 ("15", "Rock", "Rock noise", 15),
735 ("16", "Lunar", "Craters", 16),
736 ("17", "Cosine", "Cosine", 17),
737 ("18", "Spikey", "Spikey", 18),
738 ("19", "Stone", "Stone", 19),
739 ("20", "Flat Turb", "Flat turbulence", 20),
740 ("21", "Flat Voronoi", "Flat voronoi", 21)
743 fx_bias
: EnumProperty(
746 description
="Effect bias type",
748 ("0", "Sin", "Sin", 0),
749 ("1", "Cos", "Cos", 1),
750 ("2", "Tri", "Tri", 2),
751 ("3", "Saw", "Saw", 3),
752 ("4", "None", "None", 4)]
754 fx_turb
: FloatProperty(
759 description
="Effect turbulence distortion"
761 fx_depth
: IntProperty(
766 description
="Effect depth - number of frequencies"
768 fx_amplitude
: FloatProperty(
773 description
="Amplitude"
775 fx_frequency
: FloatProperty(
780 description
="Frequency"
782 fx_size
: FloatProperty(
787 description
="Effect size"
789 fx_loc_x
: FloatProperty(
792 description
="Effect x offset"
794 fx_loc_y
: FloatProperty(
797 description
="Effect y offset"
799 fx_height
: FloatProperty(
804 description
="Effect intensity scale"
806 fx_invert
: BoolProperty(
809 description
="Effect invert"
811 fx_offset
: FloatProperty(
816 description
="Effect height offset"
819 edge_falloff
: EnumProperty(
822 description
="Flatten edges",
824 ("0", "None", "None", 0),
825 ("1", "Y", "Y Falloff", 1),
826 ("2", "X", "X Falloff", 2),
827 ("3", "X Y", "X Y Falloff", 3)]
829 falloff_x
: FloatProperty(
834 description
="Falloff x scale"
836 falloff_y
: FloatProperty(
841 description
="Falloff y scale"
843 edge_level
: FloatProperty(
848 description
="Edge level, sealevel offset"
850 maximum
: FloatProperty(
855 description
="Maximum, flattens terrain at plateau level"
857 minimum
: FloatProperty(
862 description
="Minimum, flattens terrain at seabed level"
864 vert_group
: StringProperty(
868 strata
: FloatProperty(
873 description
="Strata layers / terraces"
875 strata_type
: EnumProperty(
878 description
="Strata types",
880 ("0", "None", "No strata", 0),
881 ("1", "Smooth", "Smooth transitions", 1),
882 ("2", "Sharp Sub", "Sharp subtract transitions", 2),
883 ("3", "Sharp Add", "Sharp add transitions", 3),
884 ("4", "Quantize", "Quantize", 4),
885 ("5", "Quantize Mix", "Quantize mixed", 5)]
887 water_plane
: BoolProperty(
890 description
="Add water plane"
892 water_level
: FloatProperty(
897 description
="Water level"
899 remove_double
: BoolProperty(
900 name
="Remove Doubles",
902 description
="Remove doubles"
904 refresh
: BoolProperty(
907 description
="Refresh"
909 auto_refresh
: BoolProperty(
912 description
="Automatic refresh"
915 # ------------------------------------------------------------
919 AntLandscapeAddPanel
,
920 AntLandscapeToolsPanel
,
921 AntMainSettingsPanel
,
922 AntNoiseSettingsPanel
,
923 AntDisplaceSettingsPanel
,
924 AntLandscapePropertiesGroup
,
925 add_mesh_ant_landscape
.AntAddLandscape
,
926 mesh_ant_displace
.AntMeshDisplace
,
927 ant_functions
.AntLandscapeRefresh
,
928 ant_functions
.AntLandscapeRegenerate
,
929 ant_functions
.AntVgSlopeMap
,
930 ant_functions
.Eroder
,
935 bpy
.utils
.register_class(cls
)
937 bpy
.types
.VIEW3D_MT_mesh_add
.append(menu_func_landscape
)
938 bpy
.types
.Object
.ant_landscape
= PointerProperty(type=AntLandscapePropertiesGroup
, name
="ANT_Landscape", description
="Landscape properties")
939 bpy
.types
.VIEW3D_MT_paint_weight
.append(menu_func_eroder
)
943 for cls
in reversed(classes
):
944 bpy
.utils
.unregister_class(cls
)
945 bpy
.types
.VIEW3D_MT_mesh_add
.remove(menu_func_landscape
)
946 bpy
.types
.VIEW3D_MT_paint_weight
.remove(menu_func_eroder
)
949 if __name__
== "__main__":