|
|
@@ -1,151 +0,0 @@
|
|
1
|
|
-# ##### BEGIN GPL LICENSE BLOCK #####
|
|
2
|
|
-#
|
|
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.
|
|
7
|
|
-#
|
|
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.
|
|
12
|
|
-#
|
|
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.
|
|
16
|
|
-#
|
|
17
|
|
-# ##### END GPL LICENSE BLOCK #####
|
|
18
|
|
-
|
|
19
|
|
-# --------------------------------- TISSUE ----------------------------------- #
|
|
20
|
|
-# ------------------------------- version 0.3 -------------------------------- #
|
|
21
|
|
-# #
|
|
22
|
|
-# Creates duplicates of selected mesh to active morphing the shape according #
|
|
23
|
|
-# to target faces. #
|
|
24
|
|
-# #
|
|
25
|
|
-# Alessandro Zomparelli #
|
|
26
|
|
-# (2017) #
|
|
27
|
|
-# #
|
|
28
|
|
-# http://www.co-de-it.com/ #
|
|
29
|
|
-# http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Mesh/Tissue #
|
|
30
|
|
-# #
|
|
31
|
|
-# ############################################################################ #
|
|
32
|
|
-
|
|
33
|
|
-bl_info = {
|
|
34
|
|
- "name": "Tissue",
|
|
35
|
|
- "author": "Alessandro Zomparelli (Co-de-iT)",
|
|
36
|
|
- "version": (0, 3, 34),
|
|
37
|
|
- "blender": (2, 80, 0),
|
|
38
|
|
- "location": "",
|
|
39
|
|
- "description": "Tools for Computational Design",
|
|
40
|
|
- "warning": "",
|
|
41
|
|
- "wiki_url": "https://github.com/alessandro-zomparelli/tissue/wiki",
|
|
42
|
|
- "tracker_url": "https://github.com/alessandro-zomparelli/tissue/issues",
|
|
43
|
|
- "category": "Mesh"}
|
|
44
|
|
-
|
|
45
|
|
-
|
|
46
|
|
-if "bpy" in locals():
|
|
47
|
|
- import importlib
|
|
48
|
|
- importlib.reload(tessellate_numpy)
|
|
49
|
|
- importlib.reload(colors_groups_exchanger)
|
|
50
|
|
- importlib.reload(dual_mesh)
|
|
51
|
|
- importlib.reload(lattice)
|
|
52
|
|
- importlib.reload(uv_to_mesh)
|
|
53
|
|
- importlib.reload(utils)
|
|
54
|
|
- importlib.reload(gcode_export)
|
|
55
|
|
-
|
|
56
|
|
-else:
|
|
57
|
|
- from . import tessellate_numpy
|
|
58
|
|
- from . import colors_groups_exchanger
|
|
59
|
|
- from . import dual_mesh
|
|
60
|
|
- from . import lattice
|
|
61
|
|
- from . import uv_to_mesh
|
|
62
|
|
- from . import utils
|
|
63
|
|
- from . import gcode_export
|
|
64
|
|
-
|
|
65
|
|
-import bpy
|
|
66
|
|
-from bpy.props import PointerProperty, CollectionProperty, BoolProperty
|
|
67
|
|
-
|
|
68
|
|
-classes = (
|
|
69
|
|
- tessellate_numpy.tissue_tessellate_prop,
|
|
70
|
|
- tessellate_numpy.tissue_tessellate,
|
|
71
|
|
- tessellate_numpy.tissue_update_tessellate,
|
|
72
|
|
- tessellate_numpy.tissue_refresh_tessellate,
|
|
73
|
|
- tessellate_numpy.TISSUE_PT_tessellate,
|
|
74
|
|
- tessellate_numpy.tissue_rotate_face_left,
|
|
75
|
|
- tessellate_numpy.tissue_rotate_face_right,
|
|
76
|
|
- tessellate_numpy.TISSUE_PT_tessellate_object,
|
|
77
|
|
- tessellate_numpy.TISSUE_PT_tessellate_frame,
|
|
78
|
|
- tessellate_numpy.TISSUE_PT_tessellate_thickness,
|
|
79
|
|
- tessellate_numpy.TISSUE_PT_tessellate_coordinates,
|
|
80
|
|
- tessellate_numpy.TISSUE_PT_tessellate_rotation,
|
|
81
|
|
- tessellate_numpy.TISSUE_PT_tessellate_options,
|
|
82
|
|
- tessellate_numpy.TISSUE_PT_tessellate_selective,
|
|
83
|
|
- tessellate_numpy.TISSUE_PT_tessellate_morphing,
|
|
84
|
|
- tessellate_numpy.TISSUE_PT_tessellate_iterations,
|
|
85
|
|
-
|
|
86
|
|
- colors_groups_exchanger.face_area_to_vertex_groups,
|
|
87
|
|
- colors_groups_exchanger.vertex_colors_to_vertex_groups,
|
|
88
|
|
- colors_groups_exchanger.vertex_group_to_vertex_colors,
|
|
89
|
|
- colors_groups_exchanger.TISSUE_PT_weight,
|
|
90
|
|
- colors_groups_exchanger.TISSUE_PT_color,
|
|
91
|
|
- colors_groups_exchanger.weight_contour_curves,
|
|
92
|
|
- colors_groups_exchanger.tissue_weight_contour_curves_pattern,
|
|
93
|
|
- colors_groups_exchanger.weight_contour_mask,
|
|
94
|
|
- colors_groups_exchanger.weight_contour_displace,
|
|
95
|
|
- colors_groups_exchanger.harmonic_weight,
|
|
96
|
|
- colors_groups_exchanger.edges_deformation,
|
|
97
|
|
- colors_groups_exchanger.edges_bending,
|
|
98
|
|
- colors_groups_exchanger.weight_laplacian,
|
|
99
|
|
- colors_groups_exchanger.reaction_diffusion,
|
|
100
|
|
- colors_groups_exchanger.start_reaction_diffusion,
|
|
101
|
|
- colors_groups_exchanger.TISSUE_PT_reaction_diffusion,
|
|
102
|
|
- colors_groups_exchanger.reset_reaction_diffusion_weight,
|
|
103
|
|
- colors_groups_exchanger.formula_prop,
|
|
104
|
|
- colors_groups_exchanger.reaction_diffusion_prop,
|
|
105
|
|
- colors_groups_exchanger.weight_formula,
|
|
106
|
|
- colors_groups_exchanger.curvature_to_vertex_groups,
|
|
107
|
|
- colors_groups_exchanger.weight_formula_wiki,
|
|
108
|
|
- colors_groups_exchanger.tissue_weight_distance,
|
|
109
|
|
-
|
|
110
|
|
- dual_mesh.dual_mesh,
|
|
111
|
|
- dual_mesh.dual_mesh_tessellated,
|
|
112
|
|
-
|
|
113
|
|
- lattice.lattice_along_surface,
|
|
114
|
|
-
|
|
115
|
|
- uv_to_mesh.uv_to_mesh,
|
|
116
|
|
- gcode_export.TISSUE_PT_gcode_exporter,
|
|
117
|
|
- gcode_export.tissue_gcode_prop,
|
|
118
|
|
- gcode_export.tissue_gcode_export
|
|
119
|
|
-)
|
|
120
|
|
-
|
|
121
|
|
-def register():
|
|
122
|
|
- from bpy.utils import register_class
|
|
123
|
|
- for cls in classes:
|
|
124
|
|
- bpy.utils.register_class(cls)
|
|
125
|
|
- #bpy.utils.register_module(__name__)
|
|
126
|
|
- bpy.types.Object.tissue_tessellate = PointerProperty(
|
|
127
|
|
- type=tessellate_numpy.tissue_tessellate_prop
|
|
128
|
|
- )
|
|
129
|
|
- bpy.types.Scene.tissue_gcode = PointerProperty(
|
|
130
|
|
- type=gcode_export.tissue_gcode_prop
|
|
131
|
|
- )
|
|
132
|
|
- bpy.types.Object.formula_settings = CollectionProperty(
|
|
133
|
|
- type=colors_groups_exchanger.formula_prop
|
|
134
|
|
- )
|
|
135
|
|
- bpy.types.Object.reaction_diffusion_settings = PointerProperty(
|
|
136
|
|
- type=colors_groups_exchanger.reaction_diffusion_prop
|
|
137
|
|
- )
|
|
138
|
|
- # colors_groups_exchanger
|
|
139
|
|
- bpy.app.handlers.frame_change_post.append(colors_groups_exchanger.reaction_diffusion_def)
|
|
140
|
|
- #bpy.app.handlers.frame_change_post.append(tessellate_numpy.anim_tessellate)
|
|
141
|
|
-
|
|
142
|
|
-def unregister():
|
|
143
|
|
- from bpy.utils import unregister_class
|
|
144
|
|
- for cls in classes:
|
|
145
|
|
- bpy.utils.unregister_class(cls)
|
|
146
|
|
-
|
|
147
|
|
- del bpy.types.Object.tissue_tessellate
|
|
148
|
|
-
|
|
149
|
|
-
|
|
150
|
|
-if __name__ == "__main__":
|
|
151
|
|
- register()
|