Welcome to mirror list, hosted at ThFree Co, Russian Federation.

__init__.py « mesh_tissue - git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0d777f505bb7389368c820312d28e39902861f92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# SPDX-License-Identifier: GPL-2.0-or-later

# --------------------------------- TISSUE ----------------------------------- #
# ------------------------------- version 0.3 -------------------------------- #
#                                                                              #
# Creates duplicates of selected mesh to active morphing the shape according   #
# to target faces.                                                             #
#                                                                              #
#                            Alessandro Zomparelli                             #
#                                   (2017)                                     #
#                                                                              #
# http://www.co-de-it.com/                                                     #
# http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Mesh/Tissue      #
#                                                                              #
# ############################################################################ #

bl_info = {
    "name": "Tissue",
    "author": "Alessandro Zomparelli (Co-de-iT)",
    "version": (0, 3, 25),
    "blender": (2, 80, 0),
    "location": "Sidebar > Edit Tab",
    "description": "Tools for Computational Design",
    "warning": "",
    "doc_url": "https://github.com/alessandro-zomparelli/tissue/wiki",
    "tracker_url": "https://github.com/alessandro-zomparelli/tissue/issues",
    "category": "Mesh",
}


if "bpy" in locals():
    import importlib
    importlib.reload(tessellate_numpy)
    importlib.reload(colors_groups_exchanger)
    importlib.reload(dual_mesh)
    importlib.reload(lattice)
    importlib.reload(uv_to_mesh)
    importlib.reload(utils)

else:
    from . import tessellate_numpy
    from . import colors_groups_exchanger
    from . import dual_mesh
    from . import lattice
    from . import uv_to_mesh
    from . import utils

import bpy
from bpy.props import PointerProperty, CollectionProperty, BoolProperty

classes = (
    tessellate_numpy.tissue_tessellate_prop,
    tessellate_numpy.tessellate,
    tessellate_numpy.update_tessellate,
    tessellate_numpy.TISSUE_PT_tessellate,
    tessellate_numpy.rotate_face,
    tessellate_numpy.TISSUE_PT_tessellate_object,

    colors_groups_exchanger.face_area_to_vertex_groups,
    colors_groups_exchanger.vertex_colors_to_vertex_groups,
    colors_groups_exchanger.vertex_group_to_vertex_colors,
    colors_groups_exchanger.TISSUE_PT_weight,
    colors_groups_exchanger.TISSUE_PT_color,
    colors_groups_exchanger.weight_contour_curves,
    colors_groups_exchanger.weight_contour_mask,
    colors_groups_exchanger.weight_contour_displace,
    colors_groups_exchanger.harmonic_weight,
    colors_groups_exchanger.edges_deformation,
    colors_groups_exchanger.edges_bending,
    colors_groups_exchanger.weight_laplacian,
    colors_groups_exchanger.reaction_diffusion,
    colors_groups_exchanger.start_reaction_diffusion,
    colors_groups_exchanger.TISSUE_PT_reaction_diffusion,
    colors_groups_exchanger.reset_reaction_diffusion_weight,
    colors_groups_exchanger.formula_prop,
    colors_groups_exchanger.reaction_diffusion_prop,
    colors_groups_exchanger.weight_formula,
    colors_groups_exchanger.curvature_to_vertex_groups,
    colors_groups_exchanger.weight_formula_wiki,

    dual_mesh.dual_mesh,
    dual_mesh.dual_mesh_tessellated,

    lattice.lattice_along_surface,

    uv_to_mesh.uv_to_mesh
)

def register():
    from bpy.utils import register_class
    for cls in classes:
        bpy.utils.register_class(cls)
    #bpy.utils.register_module(__name__)
    bpy.types.Object.tissue_tessellate = PointerProperty(
                                            type=tessellate_numpy.tissue_tessellate_prop
                                            )
    bpy.types.Object.formula_settings = CollectionProperty(
                                            type=colors_groups_exchanger.formula_prop
                                            )
    bpy.types.Object.reaction_diffusion_settings = PointerProperty(
                        type=colors_groups_exchanger.reaction_diffusion_prop
                        )
    # colors_groups_exchanger
    bpy.app.handlers.frame_change_post.append(colors_groups_exchanger.reaction_diffusion_def)
    #bpy.app.handlers.frame_change_post.append(tessellate_numpy.anim_tessellate)

def unregister():
    from bpy.utils import unregister_class
    for cls in classes:
        bpy.utils.unregister_class(cls)
    #tessellate_numpy.unregister()
    #colors_groups_exchanger.unregister()
    #dual_mesh.unregister()
    #lattice.unregister()
    #uv_to_mesh.unregister()

    del bpy.types.Object.tissue_tessellate


if __name__ == "__main__":
    register()