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": "{BLENDER_MANUAL_URL}/addons/add_mesh/ant_landscape.html",
31 "category": "Add Mesh",
36 importlib
.reload(add_mesh_ant_landscape
)
37 importlib
.reload(mesh_ant_displace
)
38 importlib
.reload(ant_functions
)
39 importlib
.reload(ant_noise
)
41 from ant_landscape
import add_mesh_ant_landscape
42 from ant_landscape
import mesh_ant_displace
43 from ant_landscape
import ant_functions
44 from ant_landscape
import ant_noise
48 from bpy
.props
import (
56 from .ant_functions
import (
63 # ------------------------------------------------------------
66 def menu_func_eroder(self
, context
):
67 ob
= bpy
.context
.active_object
68 if ob
and (ob
.ant_landscape
.keys() and not ob
.ant_landscape
['sphere_mesh']):
69 self
.layout
.operator('mesh.eroder', text
="Landscape Eroder", icon
='SMOOTHCURVE')
72 def menu_func_landscape(self
, context
):
75 self
.layout
.operator('mesh.landscape_add', text
="Landscape", icon
="RNDCURVE")
79 class AntLandscapeAddPanel(bpy
.types
.Panel
):
80 bl_category
= "Create"
81 bl_label
= "Landscape"
82 bl_idname
= "ANTLANDSCAPE_PT_add"
83 bl_space_type
= "VIEW_3D"
85 bl_context
= "objectmode"
86 bl_options
= {'DEFAULT_CLOSED'}
88 def draw(self
, context
):
89 col
= self
.layout
.column()
90 col
.operator('mesh.landscape_add', text
="Landscape", icon
="RNDCURVE")
94 class AntLandscapeToolsPanel(bpy
.types
.Panel
):
95 bl_category
= "Create"
96 bl_label
= "Landscape Tools"
97 bl_idname
= "ANTLANDSCAPE_PT_tools"
98 bl_space_type
= "VIEW_3D"
100 bl_context
= "objectmode"
101 bl_options
= {'DEFAULT_CLOSED'}
104 def poll(cls
, context
):
105 ob
= bpy
.context
.active_object
106 return (ob
and ob
.type == 'MESH')
108 def draw(self
, context
):
110 ob
= context
.active_object
111 col
= layout
.column()
112 col
.operator('mesh.ant_displace', text
="Mesh Displace", icon
="RNDCURVE")
113 col
.operator('mesh.ant_slope_map', icon
='GROUP_VERTEX')
114 if ob
.ant_landscape
.keys() and not ob
.ant_landscape
['sphere_mesh']:
115 col
.operator('mesh.eroder', text
="Landscape Eroder", icon
='SMOOTHCURVE')
118 # Landscape Main Settings
119 class AntMainSettingsPanel(bpy
.types
.Panel
):
120 bl_category
= "Create"
121 bl_label
= "Landscape Main"
122 bl_idname
= "ANTLANDSCAPE_PT_main"
123 bl_space_type
= "VIEW_3D"
124 bl_region_type
= "UI"
125 bl_options
= {'DEFAULT_CLOSED'}
128 def poll(cls
, context
):
129 ob
= bpy
.context
.active_object
130 return ob
.ant_landscape
.keys() if ob
else False
132 def draw(self
, context
):
134 scene
= context
.scene
135 ob
= bpy
.context
.active_object
136 ant
= ob
.ant_landscape
138 col
= box
.column(align
=False)
140 col
.operator('mesh.ant_landscape_regenerate', text
="Regenerate", icon
="LOOP_FORWARDS")
141 row
= box
.row(align
=True)
142 split
= row
.split(align
=True)
143 split
.prop(ant
, "smooth_mesh", toggle
=True, text
="Smooth", icon
='SHADING_SOLID')
144 split
.prop(ant
, "tri_face", toggle
=True, text
="Triangulate", icon
='MESH_DATA')
146 split
.prop(ant
, "remove_double", toggle
=True, text
="Remove Doubles", icon
='MESH_DATA')
147 box
.prop(ant
, "ant_terrain_name")
148 box
.prop_search(ant
, "land_material", bpy
.data
, "materials")
149 col
= box
.column(align
=True)
150 col
.prop(ant
, "subdivision_x")
151 col
.prop(ant
, "subdivision_y")
152 col
= box
.column(align
=True)
154 col
.prop(ant
, "mesh_size")
156 col
.prop(ant
, "mesh_size_x")
157 col
.prop(ant
, "mesh_size_y")
160 # Landscape Noise Settings
161 class AntNoiseSettingsPanel(bpy
.types
.Panel
):
162 bl_category
= "Create"
163 bl_label
= "Landscape Noise"
164 bl_idname
= "ANTLANDSCAPE_PT_noise"
165 bl_space_type
= "VIEW_3D"
166 bl_region_type
= "UI"
167 bl_options
= {'DEFAULT_CLOSED'}
170 def poll(cls
, context
):
171 ob
= bpy
.context
.active_object
172 return ob
.ant_landscape
.keys() if ob
else False
174 def draw(self
, context
):
176 scene
= context
.scene
177 ob
= bpy
.context
.active_object
178 ant
= ob
.ant_landscape
180 col
= box
.column(align
=True)
183 col
.operator('mesh.ant_landscape_regenerate', text
="Regenerate", icon
="LOOP_FORWARDS")
185 col
.operator('mesh.ant_landscape_refresh', text
="Refresh", icon
="FILE_REFRESH")
187 box
.prop(ant
, "noise_type")
188 if ant
.noise_type
== "blender_texture":
189 box
.prop_search(ant
, "texture_block", bpy
.data
, "textures")
191 box
.prop(ant
, "basis_type")
193 col
= box
.column(align
=True)
194 col
.prop(ant
, "random_seed")
195 col
= box
.column(align
=True)
196 col
.prop(ant
, "noise_offset_x")
197 col
.prop(ant
, "noise_offset_y")
199 col
.prop(ant
, "noise_offset_z")
200 col
.prop(ant
, "noise_size_x")
201 col
.prop(ant
, "noise_size_y")
203 col
.prop(ant
, "noise_size_z")
204 col
= box
.column(align
=True)
205 col
.prop(ant
, "noise_size")
207 col
= box
.column(align
=True)
208 if ant
.noise_type
== "multi_fractal":
209 col
.prop(ant
, "noise_depth")
210 col
.prop(ant
, "dimension")
211 col
.prop(ant
, "lacunarity")
212 elif ant
.noise_type
== "ridged_multi_fractal":
213 col
.prop(ant
, "noise_depth")
214 col
.prop(ant
, "dimension")
215 col
.prop(ant
, "lacunarity")
216 col
.prop(ant
, "offset")
217 col
.prop(ant
, "gain")
218 elif ant
.noise_type
== "hybrid_multi_fractal":
219 col
.prop(ant
, "noise_depth")
220 col
.prop(ant
, "dimension")
221 col
.prop(ant
, "lacunarity")
222 col
.prop(ant
, "offset")
223 col
.prop(ant
, "gain")
224 elif ant
.noise_type
== "hetero_terrain":
225 col
.prop(ant
, "noise_depth")
226 col
.prop(ant
, "dimension")
227 col
.prop(ant
, "lacunarity")
228 col
.prop(ant
, "offset")
229 elif ant
.noise_type
== "fractal":
230 col
.prop(ant
, "noise_depth")
231 col
.prop(ant
, "dimension")
232 col
.prop(ant
, "lacunarity")
233 elif ant
.noise_type
== "turbulence_vector":
234 col
.prop(ant
, "noise_depth")
235 col
.prop(ant
, "amplitude")
236 col
.prop(ant
, "frequency")
238 row
= col
.row(align
=True)
239 row
.prop(ant
, "hard_noise", expand
=True)
240 elif ant
.noise_type
== "variable_lacunarity":
241 box
.prop(ant
, "vl_basis_type")
242 box
.prop(ant
, "distortion")
243 elif ant
.noise_type
== "marble_noise":
244 box
.prop(ant
, "marble_shape")
245 box
.prop(ant
, "marble_bias")
246 box
.prop(ant
, "marble_sharp")
247 col
= box
.column(align
=True)
248 col
.prop(ant
, "distortion")
249 col
.prop(ant
, "noise_depth")
251 row
= col
.row(align
=True)
252 row
.prop(ant
, "hard_noise", expand
=True)
253 elif ant
.noise_type
== "shattered_hterrain":
254 col
.prop(ant
, "noise_depth")
255 col
.prop(ant
, "dimension")
256 col
.prop(ant
, "lacunarity")
257 col
.prop(ant
, "offset")
258 col
.prop(ant
, "distortion")
259 elif ant
.noise_type
== "strata_hterrain":
260 col
.prop(ant
, "noise_depth")
261 col
.prop(ant
, "dimension")
262 col
.prop(ant
, "lacunarity")
263 col
.prop(ant
, "offset")
264 col
.prop(ant
, "distortion", text
="Strata")
265 elif ant
.noise_type
== "ant_turbulence":
266 col
.prop(ant
, "noise_depth")
267 col
.prop(ant
, "amplitude")
268 col
.prop(ant
, "frequency")
269 col
.prop(ant
, "distortion")
271 row
= col
.row(align
=True)
272 row
.prop(ant
, "hard_noise", expand
=True)
273 elif ant
.noise_type
== "vl_noise_turbulence":
274 col
.prop(ant
, "noise_depth")
275 col
.prop(ant
, "amplitude")
276 col
.prop(ant
, "frequency")
277 col
.prop(ant
, "distortion")
279 box
.prop(ant
, "vl_basis_type")
281 row
= col
.row(align
=True)
282 row
.prop(ant
, "hard_noise", expand
=True)
283 elif ant
.noise_type
== "vl_hTerrain":
284 col
.prop(ant
, "noise_depth")
285 col
.prop(ant
, "dimension")
286 col
.prop(ant
, "lacunarity")
287 col
.prop(ant
, "offset")
288 col
.prop(ant
, "distortion")
290 box
.prop(ant
, "vl_basis_type")
291 elif ant
.noise_type
== "distorted_heteroTerrain":
292 col
.prop(ant
, "noise_depth")
293 col
.prop(ant
, "dimension")
294 col
.prop(ant
, "lacunarity")
295 col
.prop(ant
, "offset")
296 col
.prop(ant
, "distortion")
298 col
.prop(ant
, "vl_basis_type")
299 elif ant
.noise_type
== "double_multiFractal":
300 col
.prop(ant
, "noise_depth")
301 col
.prop(ant
, "dimension")
302 col
.prop(ant
, "lacunarity")
303 col
.prop(ant
, "offset")
304 col
.prop(ant
, "gain")
306 box
.prop(ant
, "vl_basis_type")
307 elif ant
.noise_type
== "rocks_noise":
308 col
.prop(ant
, "noise_depth")
309 col
.prop(ant
, "distortion")
311 row
= col
.row(align
=True)
312 row
.prop(ant
, "hard_noise", expand
=True)
313 elif ant
.noise_type
== "slick_rock":
314 col
.prop(ant
, "noise_depth")
315 col
.prop(ant
, "dimension")
316 col
.prop(ant
, "lacunarity")
317 col
.prop(ant
, "gain")
318 col
.prop(ant
, "offset")
319 col
.prop(ant
, "distortion")
321 box
.prop(ant
, "vl_basis_type")
322 elif ant
.noise_type
== "planet_noise":
323 col
.prop(ant
, "noise_depth")
325 row
= col
.row(align
=True)
326 row
.prop(ant
, "hard_noise", expand
=True)
329 col
= box
.column(align
=False)
330 box
.prop(ant
, "fx_type")
331 if ant
.fx_type
!= "0":
332 if int(ant
.fx_type
) <= 12:
333 box
.prop(ant
, "fx_bias")
335 box
.prop(ant
, "fx_mix_mode")
336 col
= box
.column(align
=True)
337 col
.prop(ant
, "fx_mixfactor")
339 col
= box
.column(align
=True)
340 col
.prop(ant
, "fx_loc_x")
341 col
.prop(ant
, "fx_loc_y")
342 col
.prop(ant
, "fx_size")
344 col
= box
.column(align
=True)
345 col
.prop(ant
, "fx_depth")
346 if ant
.fx_depth
!= 0:
347 col
.prop(ant
, "fx_frequency")
348 col
.prop(ant
, "fx_amplitude")
349 col
.prop(ant
, "fx_turb")
351 col
= box
.column(align
=True)
352 row
= col
.row(align
=True).split(factor
=0.92, align
=True)
353 row
.prop(ant
, "fx_height")
354 row
.prop(ant
, "fx_invert", toggle
=True, text
="", icon
='ARROW_LEFTRIGHT')
355 col
.prop(ant
, "fx_offset")
358 # Landscape Displace Settings
359 class AntDisplaceSettingsPanel(bpy
.types
.Panel
):
360 bl_category
= "Create"
361 bl_label
= "Landscape Displace"
362 bl_idname
= "ANTLANDSCAPE_PT_disp"
363 bl_space_type
= "VIEW_3D"
364 bl_region_type
= "UI"
365 bl_options
= {'DEFAULT_CLOSED'}
368 def poll(cls
, context
):
369 ob
= bpy
.context
.active_object
370 return ob
.ant_landscape
.keys() if ob
else False
372 def draw(self
, context
):
374 scene
= context
.scene
375 ob
= bpy
.context
.active_object
376 ant
= ob
.ant_landscape
378 col
= box
.column(align
=True)
381 col
.operator('mesh.ant_landscape_regenerate', text
="Regenerate", icon
="LOOP_FORWARDS")
383 col
.operator('mesh.ant_landscape_refresh', text
="Refresh", icon
="FILE_REFRESH")
385 col
= box
.column(align
=True)
386 row
= col
.row(align
=True).split(factor
=0.92, align
=True)
387 row
.prop(ant
, "height")
388 row
.prop(ant
, "height_invert", toggle
=True, text
="", icon
='ARROW_LEFTRIGHT')
389 col
.prop(ant
, "height_offset")
390 col
.prop(ant
, "maximum")
391 col
.prop(ant
, "minimum")
392 if not ant
.sphere_mesh
:
394 col
.prop(ant
, "edge_falloff")
395 if ant
.edge_falloff
!= "0":
396 col
= box
.column(align
=True)
397 col
.prop(ant
, "edge_level")
398 if ant
.edge_falloff
in ["2", "3"]:
399 col
.prop(ant
, "falloff_x")
400 if ant
.edge_falloff
in ["1", "3"]:
401 col
.prop(ant
, "falloff_y")
404 col
.prop(ant
, "strata_type")
405 if ant
.strata_type
!= "0":
407 col
.prop(ant
, "strata")
409 col
.prop_search(ant
, "vert_group", ob
, "vertex_groups")
412 # ------------------------------------------------------------
414 class AntLandscapePropertiesGroup(bpy
.types
.PropertyGroup
):
416 ant_terrain_name
: StringProperty(
420 land_material
: StringProperty(
423 description
="Terrain material"
425 water_material
: StringProperty(
428 description
="Water plane material"
430 texture_block
: StringProperty(
434 at_cursor
: BoolProperty(
437 description
="Place at cursor location",
439 smooth_mesh
: BoolProperty(
442 description
="Shade smooth"
444 tri_face
: BoolProperty(
447 description
="Triangulate faces"
449 sphere_mesh
: BoolProperty(
452 description
="Generate uv sphere - remove doubles when ready"
454 subdivision_x
: IntProperty(
455 name
="Subdivisions X",
459 description
="Mesh X subdivisions"
461 subdivision_y
: IntProperty(
463 name
="Subdivisions Y",
466 description
="Mesh Y subdivisions"
468 mesh_size
: FloatProperty(
473 description
="Mesh size"
475 mesh_size_x
: FloatProperty(
479 description
="Mesh x size"
481 mesh_size_y
: FloatProperty(
485 description
="Mesh y size"
488 random_seed
: IntProperty(
492 description
="Randomize noise origin"
494 noise_offset_x
: FloatProperty(
497 description
="Noise X Offset"
499 noise_offset_y
: FloatProperty(
502 description
="Noise Y Offset"
504 noise_offset_z
: FloatProperty(
507 description
="Noise Z Offset"
509 noise_size_x
: FloatProperty(
514 description
="Noise x size"
516 noise_size_y
: FloatProperty(
521 description
="Noise y size"
523 noise_size_z
: FloatProperty(
528 description
="Noise Z size"
530 noise_size
: FloatProperty(
535 description
="Noise size"
537 noise_type
: EnumProperty(
539 default
='hetero_terrain',
540 description
="Noise type",
542 ('multi_fractal', "Multi Fractal", "Blender: Multi Fractal algorithm", 0),
543 ('ridged_multi_fractal', "Ridged MFractal", "Blender: Ridged Multi Fractal", 1),
544 ('hybrid_multi_fractal', "Hybrid MFractal", "Blender: Hybrid Multi Fractal", 2),
545 ('hetero_terrain', "Hetero Terrain", "Blender: Hetero Terrain", 3),
546 ('fractal', "fBm Fractal", "Blender: fBm - Fractional Browninian motion", 4),
547 ('turbulence_vector', "Turbulence", "Blender: Turbulence Vector", 5),
548 ('variable_lacunarity', "Distorted Noise", "Blender: Distorted Noise", 6),
549 ('marble_noise', "Marble", "A.N.T.: Marble Noise", 7),
550 ('shattered_hterrain', "Shattered hTerrain", "A.N.T.: Shattered hTerrain", 8),
551 ('strata_hterrain', "Strata hTerrain", "A.N.T: Strata hTerrain", 9),
552 ('ant_turbulence', "Another Noise", "A.N.T: Turbulence variation", 10),
553 ('vl_noise_turbulence', "vlNoise turbulence", "A.N.T: Real vlNoise turbulence", 11),
554 ('vl_hTerrain', "vlNoise hTerrain", "A.N.T: vlNoise hTerrain", 12),
555 ('distorted_heteroTerrain', "Distorted hTerrain", "A.N.T distorted hTerrain", 13),
556 ('double_multiFractal', "Double MultiFractal", "A.N.T: double multiFractal", 14),
557 ('rocks_noise', "Noise Rocks", "A.N.T: turbulence variation", 15),
558 ('slick_rock', "Slick Rock", "A.N.T: slick rock", 16),
559 ('planet_noise', "Planet Noise", "Planet Noise by: Farsthary", 17),
560 ('blender_texture', "Blender Texture - Texture Nodes", "Blender texture data block", 18)]
562 basis_type
: EnumProperty(
564 default
=ant_noise
.noise_basis_default
,
565 description
="Noise basis algorithms",
566 items
= ant_noise
.noise_basis
568 vl_basis_type
: EnumProperty(
569 name
="vlNoise Basis",
570 default
=ant_noise
.noise_basis_default
,
571 description
="VLNoise basis algorithms",
572 items
= ant_noise
.noise_basis
574 distortion
: FloatProperty(
579 description
="Distortion amount"
581 hard_noise
: EnumProperty(
584 description
="Soft Noise, Hard noise",
586 ("0", "Soft", "Soft Noise", 0),
587 ("1", "Hard", "Hard noise", 1)]
589 noise_depth
: IntProperty(
594 description
="Noise Depth - number of frequencies in the fBm"
596 amplitude
: FloatProperty(
601 description
="Amplitude"
603 frequency
: FloatProperty(
608 description
="Frequency"
610 dimension
: FloatProperty(
615 description
="H - fractal dimension of the roughest areas"
617 lacunarity
: FloatProperty(
622 description
="Lacunarity - gap between successive frequencies"
624 offset
: FloatProperty(
629 description
="Offset - raises the terrain from sea level"
636 description
="Gain - scale factor"
638 marble_bias
: EnumProperty(
641 description
="Marble bias",
643 ("0", "Sin", "Sin", 0),
644 ("1", "Cos", "Cos", 1),
645 ("2", "Tri", "Tri", 2),
646 ("3", "Saw", "Saw", 3)]
648 marble_sharp
: EnumProperty(
651 description
="Marble sharpness",
653 ("0", "Soft", "Soft", 0),
654 ("1", "Sharp", "Sharp", 1),
655 ("2", "Sharper", "Sharper", 2),
656 ("3", "Soft inv.", "Soft", 3),
657 ("4", "Sharp inv.", "Sharp", 4),
658 ("5", "Sharper inv.", "Sharper", 5)]
660 marble_shape
: EnumProperty(
663 description
="Marble shape",
665 ("0", "Default", "Default", 0),
666 ("1", "Ring", "Ring", 1),
667 ("2", "Swirl", "Swirl", 2),
668 ("3", "Bump", "Bump", 3),
669 ("4", "Wave", "Wave", 4),
674 height
: FloatProperty(
679 description
="Noise intensity scale"
681 height_invert
: BoolProperty(
684 description
="Height invert",
686 height_offset
: FloatProperty(
691 description
="Height offset"
693 fx_mixfactor
: FloatProperty(
698 description
="Effect mix factor: -1.0 = Noise, +1.0 = Effect"
700 fx_mix_mode
: EnumProperty(
703 description
="Effect mix mode",
705 ("0", "Mix", "Mix", 0),
706 ("1", "Add", "Add", 1),
707 ("2", "Sub", "Subtract", 2),
708 ("3", "Mul", "Multiply", 3),
709 ("4", "Abs", "Absolute", 4),
710 ("5", "Scr", "Screen", 5),
711 ("6", "Mod", "Modulo", 6),
712 ("7", "Min", "Minimum", 7),
713 ("8", "Max", "Maximum", 8)
716 fx_type
: EnumProperty(
719 description
="Effect type",
721 ("0", "None", "No effect", 0),
722 ("1", "Gradient", "Gradient", 1),
723 ("2", "Waves", "Waves - Bumps", 2),
724 ("3", "Zigzag", "Zigzag", 3),
725 ("4", "Wavy", "Wavy", 4),
726 ("5", "Bump", "Bump", 5),
727 ("6", "Dots", "Dots", 6),
728 ("7", "Rings", "Rings", 7),
729 ("8", "Spiral", "Spiral", 8),
730 ("9", "Square", "Square", 9),
731 ("10", "Blocks", "Blocks", 10),
732 ("11", "Grid", "Grid", 11),
733 ("12", "Tech", "Tech", 12),
734 ("13", "Crackle", "Crackle", 13),
735 ("14", "Cracks", "Cracks", 14),
736 ("15", "Rock", "Rock noise", 15),
737 ("16", "Lunar", "Craters", 16),
738 ("17", "Cosine", "Cosine", 17),
739 ("18", "Spikey", "Spikey", 18),
740 ("19", "Stone", "Stone", 19),
741 ("20", "Flat Turb", "Flat turbulence", 20),
742 ("21", "Flat Voronoi", "Flat voronoi", 21)
745 fx_bias
: EnumProperty(
748 description
="Effect bias type",
750 ("0", "Sin", "Sin", 0),
751 ("1", "Cos", "Cos", 1),
752 ("2", "Tri", "Tri", 2),
753 ("3", "Saw", "Saw", 3),
754 ("4", "None", "None", 4)]
756 fx_turb
: FloatProperty(
761 description
="Effect turbulence distortion"
763 fx_depth
: IntProperty(
768 description
="Effect depth - number of frequencies"
770 fx_amplitude
: FloatProperty(
775 description
="Amplitude"
777 fx_frequency
: FloatProperty(
782 description
="Frequency"
784 fx_size
: FloatProperty(
789 description
="Effect size"
791 fx_loc_x
: FloatProperty(
794 description
="Effect x offset"
796 fx_loc_y
: FloatProperty(
799 description
="Effect y offset"
801 fx_height
: FloatProperty(
806 description
="Effect intensity scale"
808 fx_invert
: BoolProperty(
811 description
="Effect invert"
813 fx_offset
: FloatProperty(
818 description
="Effect height offset"
821 edge_falloff
: EnumProperty(
824 description
="Flatten edges",
826 ("0", "None", "None", 0),
827 ("1", "Y", "Y Falloff", 1),
828 ("2", "X", "X Falloff", 2),
829 ("3", "X Y", "X Y Falloff", 3)]
831 falloff_x
: FloatProperty(
836 description
="Falloff x scale"
838 falloff_y
: FloatProperty(
843 description
="Falloff y scale"
845 edge_level
: FloatProperty(
850 description
="Edge level, sealevel offset"
852 maximum
: FloatProperty(
857 description
="Maximum, flattens terrain at plateau level"
859 minimum
: FloatProperty(
864 description
="Minimum, flattens terrain at seabed level"
866 vert_group
: StringProperty(
870 strata
: FloatProperty(
875 description
="Strata layers / terraces"
877 strata_type
: EnumProperty(
880 description
="Strata types",
882 ("0", "None", "No strata", 0),
883 ("1", "Smooth", "Smooth transitions", 1),
884 ("2", "Sharp Sub", "Sharp subtract transitions", 2),
885 ("3", "Sharp Add", "Sharp add transitions", 3),
886 ("4", "Quantize", "Quantize", 4),
887 ("5", "Quantize Mix", "Quantize mixed", 5)]
889 water_plane
: BoolProperty(
892 description
="Add water plane"
894 water_level
: FloatProperty(
899 description
="Water level"
901 remove_double
: BoolProperty(
902 name
="Remove Doubles",
904 description
="Remove doubles"
906 refresh
: BoolProperty(
909 description
="Refresh"
911 auto_refresh
: BoolProperty(
914 description
="Automatic refresh"
917 # ------------------------------------------------------------
921 AntLandscapeAddPanel
,
922 AntLandscapeToolsPanel
,
923 AntMainSettingsPanel
,
924 AntNoiseSettingsPanel
,
925 AntDisplaceSettingsPanel
,
926 AntLandscapePropertiesGroup
,
927 add_mesh_ant_landscape
.AntAddLandscape
,
928 mesh_ant_displace
.AntMeshDisplace
,
929 ant_functions
.AntLandscapeRefresh
,
930 ant_functions
.AntLandscapeRegenerate
,
931 ant_functions
.AntVgSlopeMap
,
932 ant_functions
.Eroder
,
937 bpy
.utils
.register_class(cls
)
939 bpy
.types
.VIEW3D_MT_mesh_add
.append(menu_func_landscape
)
940 bpy
.types
.Object
.ant_landscape
= PointerProperty(type=AntLandscapePropertiesGroup
, name
="ANT_Landscape", description
="Landscape properties")
941 bpy
.types
.VIEW3D_MT_paint_weight
.append(menu_func_eroder
)
945 for cls
in reversed(classes
):
946 bpy
.utils
.unregister_class(cls
)
947 bpy
.types
.VIEW3D_MT_mesh_add
.remove(menu_func_landscape
)
948 bpy
.types
.VIEW3D_MT_paint_weight
.remove(menu_func_eroder
)
951 if __name__
== "__main__":