[Bf-extensions-cvs] [8d16c3c1] master: mesh_ant_displace: remove

meta-androcto noreply at git.blender.org
Wed Jun 14 14:48:43 CEST 2017


Commit: 8d16c3c1f217610907a84f2e1be08e82d9e00bf9
Author: meta-androcto
Date:   Wed Jun 14 22:48:15 2017 +1000
Branches: master
https://developer.blender.org/rBAC8d16c3c1f217610907a84f2e1be08e82d9e00bf9

mesh_ant_displace: remove

===================================================================

D	mesh_ant_displace.py

===================================================================

diff --git a/mesh_ant_displace.py b/mesh_ant_displace.py
deleted file mode 100644
index c4cf236d..00000000
--- a/mesh_ant_displace.py
+++ /dev/null
@@ -1,1138 +0,0 @@
-# ##### 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 #####
-
-bl_info = {
-    "name": "A.N.T. Displace",
-    "author": "Jimmy Hazevoet",
-    "version": (0, 1, 6),
-    "blender": (2, 77, 0),
-    "location": "View3D > Tool Shelf",
-    "description": "Another Noise Tool: Displace vertices of selected mesh",
-    "warning": "",
-    "wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6/Py/"
-                "Scripts/Add_Mesh/ANT_Landscape",
-    "category": "Mesh",
-}
-
-"""
-# -------------------------------------------------------------
-- UPDATE: A.N.T. Displace - Version 0,1,6 (5/2017)
-# -------------------------------------------------------------
-                - NEW:
-                -
-                - Displace vertices of selected mesh
-                - Use Blender internal texture data block - texture nodes
-                - Use vertex group weight of active group
-                - Slope map, z normal to vertex group weight,
-                    and optional select vertices on flat area's
-                - Use Blender internal texture data block - texture nodes
-                - Noise variations (from old A.N.T. Blender-2.49 addon)
-                - Variable X, Y, Z noise Size and Offset
-                - Plateau and Sealevel renamed to Maximum and Minimum 
-                -
-# -------------------------------------------------------------
-# Another Noise Tool: Vert Displace Version
-# -------------------------------------------------------------
-MESH OPTIONS:
-Mesh update:     Turn this on for interactive mesh refresh.
-Vertex Group:    Slope map, z normal value to vertex group weight,
-                    and select vertices on flat area's
-
-NOISE OPTIONS: ( Many of these options are the same as in blender textures. )
-X_Offset:        Noise x offset in blender units (make tiled terrain)
-Y_Offset:        Noise y offset in blender units
-Random seed:     Use this to randomise the origin of the noise function.
-Noise size:      Size of the noise.
-Noise type:      Available noise types: multiFractal, ridgedMFractal, fBm, hybridMFractal, heteroTerrain,
-                 Turbulence, Distorted Noise, Marble, Shattered_hTerrain, Strata_hTerrain, Planet_noise
-Noise basis:     Blender, Perlin, NewPerlin, Voronoi_F1, Voronoi_F2, Voronoi_F3, Voronoi_F4, Voronoi_F2-F1,
-                 Voronoi Crackle, Cellnoise
-Distortion:      Distortion amount.
-Hard:            Hard/Soft turbulence noise.
-Depth:           Noise depth, number of frequencies in the fBm.
-Dimension:       Musgrave: Fractal dimension of the roughest areas.
-Lacunarity:      Musgrave: Gap between successive frequencies.
-Offset:          Musgrave: Raises the terrain from sea level.
-Gain:            Musgrave: Scale factor.
-Marble Bias:     Sin, Tri, Saw
-Marble Sharpnes: Soft, Sharp, Sharper
-Marble Shape:    Shape of the marble function: Default, Ring, Swirl, Bumps, Wave, X, Y
-
-TERRAIN OPTIONS:
-Height:          Scale terrain height.
-Invert:          Invert terrain height.
-Offset:          Terrain height offset.
-Seabed:          Flattens terrain at seabed level.
-Plateau:         Flattens terrain at plateau level.
-Strata:          Strata amount, number of strata / terrace layers.
-Strata type:     Strata types, Smooth, Sharp-sub, Sharp-add, Quantize
-Vertex Group:    Use vertex group weight
-"""
-
-# ------------------------------------------------------------
-# import modules
-import bpy
-from bpy.props import (
-        BoolProperty,
-        EnumProperty,
-        FloatProperty,
-        IntProperty,
-        StringProperty,
-        FloatVectorProperty,
-        )
-from mathutils import Vector
-from mathutils.noise import (
-        seed_set,
-        turbulence,
-        turbulence_vector,
-        fractal,
-        hybrid_multi_fractal,
-        multi_fractal,
-        ridged_multi_fractal,
-        hetero_terrain,
-        random_unit_vector,
-        variable_lacunarity,
-        )
-from math import (
-        floor, sqrt,
-        sin, cos, pi,
-        )
-
-# ------------------------------------------------------------
-# some functions for marble_noise
-def sin_bias(a):
-    return 0.5 + 0.5 * sin(a)
-
-
-def cos_bias(a):
-    return 0.5 + 0.5 * cos(a)
-
-
-def tri_bias(a):
-    b = 2 * pi
-    a = 1 - 2 * abs(floor((a * (1 / b)) + 0.5) - (a * (1 / b)))
-    return a
-
-
-def saw_bias(a):
-    b = 2 * pi
-    n = int(a / b)
-    a -= n * b
-    if a < 0:
-        a += b
-    return a / b
-
-
-def soft(a):
-    return a
-
-
-def sharp(a):
-    return a**0.5
-
-
-def sharper(a):
-    return sharp(sharp(a))
-
-
-def shapes(x, y, shape=0):
-    p = pi
-    if shape is 1:
-        # ring
-        x = x * p
-        y = y * p
-        s = cos(x**2 + y**2) / (x**2 + y**2 + 0.5)
-    elif shape is 2:
-        # swirl
-        x = x * p
-        y = y * p
-        s = ((x * sin(x * x + y * y) + y * cos(x * x + y * y)) / (x**2 + y**2 + 0.5))
-    elif shape is 3:
-        # bumps
-        x = x * p
-        y = y * p
-        s = ((cos(x * p) + cos(y * p)) - 0.5)
-    elif shape is 4:
-        # wave
-        x = x * p * 2
-        y = y * p * 2
-        s = sin(x + sin(y))
-    elif shape is 5:
-        # y grad.
-        s = (y * p)
-    elif shape is 6:
-        # x grad.
-        s = (x * p)
-    else:
-        # marble default
-        s = ((x + y) * 5)
-    return s
-
-
-# marble_noise
-def marble_noise(x, y, z, origin, size, shape, bias, sharpnes, turb, depth, hard, basis, amp, freq):
-
-    s = shapes(x, y, shape)
-    x += origin[0]
-    y += origin[1]
-    z += origin[2]
-    value = s + turb * turbulence_vector((x, y, z), depth, hard, basis)[2]
-
-    if bias is 1:
-        value = cos_bias(value)
-    if bias is 2:
-        value = tri_bias(value)
-    elif bias is 3:
-        value = saw_bias(value)
-    else:
-        value = sin_bias(value)
-
-    if sharpnes is 1:
-        value = 1.0 - sharp(value)
-    elif sharpnes is 2:
-        value = 1.0 - sharper(value)
-    elif sharpnes is 3:
-        value = soft(value)
-    elif sharpnes is 4:
-        value = sharp(value)
-    elif sharpnes is 5:
-        value = sharper(value)
-    else:
-        value = 1.0 - soft(value)
-
-    return value
-
-# ------------------------------------------------------------
-# custom noise types
-
-# vl_noise_turbulence: 
-def vlnTurbMode(coords, distort, basis, vlbasis, hardnoise):
-    # hard noise
-    if hardnoise:
-        return (abs(-variable_lacunarity(coords, distort, basis, vlbasis)))
-    # soft noise
-    else:
-        return variable_lacunarity(coords, distort, basis, vlbasis)
-
-
-def vl_noise_turbulence(coords, distort, depth, basis, vlbasis, hardnoise, amp, freq):
-    x, y, z = coords
-    value = vlnTurbMode(coords, distort, basis, vlbasis, hardnoise)
-    i=0
-    for i in range(depth):
-        i+=1
-        value += vlnTurbMode((x * (freq * i), y * (freq * i), z * (freq * i)), distort, basis, vlbasis, hardnoise) * (amp * 0.5 / i)
-    return value
-
-
-## duo_multiFractal:
-def double_multiFractal(coords, H, lacunarity, octaves, offset, gain, basis, vlbasis):
-    x, y, z = coords
-    n1 = multi_fractal((x * 1.5 + 1, y * 1.5 + 1, z * 1.5 + 1), 1.0, 1.0, 1.0, basis) * (offset * 0.5)
-    n2 = multi_fractal((x - 1, y - 1, z - 1), H, lacunarity, octaves, vlbasis) * (gain * 0.5)
-    return (n1 * n1 + n2 * n2) * 0.5
-
-
-## distorted_heteroTerrain:
-def distorted_heteroTerrain(coords, H, lacunarity, octaves, offset, distort, basis, vlbasis):
-    x, y, z = coords
-    h1 = (hetero_terrain((x, y, z), 1.0, 2.0, 1.0, 1.0, basis) * 0.5)
-    d =  h1 * distort * 2
-    h2 = (hetero_terrain((x + d, y + d, z + d), H, lacunarity, octaves, offset, vlbasis) * 0.25)
-    return (h1 * h1 + h2 * h2) * 0.5
-
-
-## SlickRock:
-def slick_rock(coords, H, lacunarity, octaves, offset, gain, distort, basis, vlbasis):
-    x, y, z = coords
-    n = multi_fractal((x,y,z), 1.0, 2.0, 2.0, basis) * distort * 0.5
-    r = ridged_multi_fractal((x + n, y + n, z + n), H, lacunarity, octaves, offset + 0.1, gain * 2, vlbasis)
-    return (n + (n * r)) * 0.5
-
-
-## vlhTerrain
-def vl_hTerrain(coords, H, lacunarity, octaves, offset, basis, vlbasis, distort):
-    x, y, z = coords
-    ht = hetero_terrain((x, y, z), H, lacunarity, octaves, offset, basis ) * 0.25
-    vl = ht * variable_lacunarity((x, y, z), distort, basis, vlbasis) * 0.5 + 0.5
-    return vl * ht
-
-
-# another turbulence
-def ant_turbulence(coords, depth, hardnoise, nbasis, amp, freq, distortion):
-    x, y, z = coords
-    tv = turbulence_vector((x+1, y+2, z+3), depth, hardnoise, nbasis, amp, freq)
-    d = (distortion * tv[0]) * 0.25
-    return (d + ((tv[0] - tv[1]) * (tv[2])**2))
-
-
-# shattered_hterrain:
-def shattered_hterrain(coords, H, lacunarity, octaves, offset, distort, basis):
-    x, y, z = coords
-    d = (turbulence_vector(coords, 6, 0, 0)[0] * 0.5 + 0.5) * distort * 0.5
-    t1 = (turbulence_vector((x + d, y + d, z + d), 0, 0, 7)[0] + 0.5)
-    t2 = (hetero_terrain((x * 2, y * 2, z * 2), H, lacunarity, octaves, offset, basis) * 0.5)
-    return ((t1 * t2) + t2 * 0.5) * 0.5
-
-
-# strata_hterrain
-def strata_hterrain(coords, H, lacunarity, octaves, offset, distort, basis):
-    x, y, z = coords
-    value = hetero_terrain((x, y, z), H, lacunarity, octaves, offset, basis) *

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-extensions-cvs mailing list