[Bf-extensions-cvs] [498d912a] master: mesh_tissue: initial update 2.80
meta-androcto
noreply at git.blender.org
Mon Jul 1 13:06:35 CEST 2019
Commit: 498d912a9d5854c0cfc1f54ed8b4216d442b89f1
Author: meta-androcto
Date: Mon Jul 1 21:06:16 2019 +1000
Branches: master
https://developer.blender.org/rBA498d912a9d5854c0cfc1f54ed8b4216d442b89f1
mesh_tissue: initial update 2.80
===================================================================
M mesh_tissue/README.md
M mesh_tissue/__init__.py
M mesh_tissue/colors_groups_exchanger.py
M mesh_tissue/dual_mesh.py
M mesh_tissue/lattice.py
A mesh_tissue/numba_functions.py
M mesh_tissue/tessellate_numpy.py
A mesh_tissue/utils.py
M mesh_tissue/uv_to_mesh.py
===================================================================
diff --git a/mesh_tissue/README.md b/mesh_tissue/README.md
index 9998d1cf..e5511cef 100644
--- a/mesh_tissue/README.md
+++ b/mesh_tissue/README.md
@@ -1,14 +1,38 @@
# Tissue
+![cover](http://www.co-de-it.com/wordpress/wp-content/uploads/2015/07/tissue_graphics.jpg)
Tissue - Blender's add-on for computational design by Co-de-iT
http://www.co-de-it.com/wordpress/code/blender-tissue
-Latest version (master): https://github.com/alessandro-zomparelli/tissue/archive/master.zip
+### Blender 2.79
-Releases: https://github.com/alessandro-zomparelli/tissue/releases
+Official version (master): https://github.com/alessandro-zomparelli/tissue/archive/master.zip
-Installation:
+Latest development version (dev1): https://github.com/alessandro-zomparelli/tissue/tree/dev1
+(Includes animatable Tessellation)
+
+### Blender 2.80
+
+Latest development version (b280-dev): https://github.com/alessandro-zomparelli/tissue/tree/b280-dev
+(Includes animatable Tessellation and Patch method)
+
+
+
+### Installation:
1. Start Blender. Open User Preferences, the addons tab
2. Click "install from file" and point Blender at the downloaded zip
3. Activate Tissue add-on from user preferences
3. Save user preferences if you want to have it on at startup.
+
+
+### Contribute
+Please help me keeping Tissue stable and updated, report any issue here: https://github.com/alessandro-zomparelli/tissue/issues
+
+Tissue is free and open-source. I really think that this is the power of Blender and I wanted to give my small contribution to it.
+If you like my work and you want to help to continue the development of Tissue, please consider to make a small donation. Any small contribution is really appreciated, thanks! :-D
+
+Alessandro
+
+
+[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ARSDJWXVFZ346)
+
diff --git a/mesh_tissue/__init__.py b/mesh_tissue/__init__.py
index d2fbb989..26fbd199 100644
--- a/mesh_tissue/__init__.py
+++ b/mesh_tissue/__init__.py
@@ -33,14 +33,13 @@
bl_info = {
"name": "Tissue",
"author": "Alessandro Zomparelli (Co-de-iT)",
- "version": (0, 3, 4),
- "blender": (2, 79, 0),
+ "version": (0, 3, 25),
+ "blender": (2, 80, 0),
"location": "",
"description": "Tools for Computational Design",
"warning": "",
- "wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6/"
- "Py/Scripts/Mesh/Tissue",
- "tracker_url": "https://plus.google.com/u/0/+AlessandroZomparelli/",
+ "wiki_url": "https://github.com/alessandro-zomparelli/tissue/wiki",
+ "tracker_url": "https://github.com/alessandro-zomparelli/tissue/issues",
"category": "Mesh"}
@@ -51,6 +50,7 @@ if "bpy" in locals():
importlib.reload(dual_mesh)
importlib.reload(lattice)
importlib.reload(uv_to_mesh)
+ importlib.reload(utils)
else:
from . import tessellate_numpy
@@ -58,24 +58,76 @@ else:
from . import dual_mesh
from . import lattice
from . import uv_to_mesh
+ from . import utils
import bpy
-from bpy.props import PointerProperty
+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():
- bpy.utils.register_module(__name__)
+ 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():
- tessellate_numpy.unregister()
- colors_groups_exchanger.unregister()
- dual_mesh.unregister()
- lattice.unregister()
- uv_to_mesh.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
diff --git a/mesh_tissue/colors_groups_exchanger.py b/mesh_tissue/colors_groups_exchanger.py
index 77c26d7e..0da15e85 100644
--- a/mesh_tissue/colors_groups_exchanger.py
+++ b/mesh_tissue/colors_groups_exchanger.py
@@ -16,12 +16,12 @@
#
# ##### END GPL LICENSE BLOCK #####
-# ------------------------- COLORS / GROUPS EXCHANGER ------------------------ #
+#-------------------------- COLORS / GROUPS EXCHANGER -------------------------#
# #
-# Vertex Color to Vertex Group allow you to convert colors channels to weight #
+# Vertex Color to Vertex Group allow you to convert colors channles to weight #
# maps. #
# The main purpose is to use vertex colors to store information when importing #
-# files from other software. The script works with the active vertex color #
+# files from other softwares. The script works with the active vertex color #
# slot. #
# For use the command "Vertex Clors to Vertex Groups" use the search bar #
# (space bar). #
@@ -31,181 +31,1807 @@
# #
# http://www.co-de-it.com/ #
# #
-# ############################################################################ #
+################################################################################
+
+import bpy, bmesh
+import numpy as np
+import math, timeit
+from math import *#pi, sin
+from statistics import mean, stdev
+from mathutils import Vector
+from numpy import *
+try: from .numba_functions import numba_reaction_diffusion
+except: pass
+
+from bpy.types import (
+ Operator,
+ Panel,
+ PropertyGroup,
+ )
+
+from bpy.props import (
+ BoolProperty,
+ EnumProperty,
+ FloatProperty,
+ IntProperty,
+ StringProperty,
+ FloatVectorProperty,
+ IntVectorProperty
+)
+
+from .utils import *
bl_info = {
"name": "Colors/Groups Exchanger",
"author": "Alessandro Zomparelli (Co-de-iT)",
- "version": (0, 3, 2),
- "blender": (2, 78, 0),
+ "version": (0, 3),
+ "blender": (2, 7, 9),
"location": "",
"description": ("Convert vertex colors channels to vertex groups and vertex"
" groups to colors"),
"warning": "",
"wiki_url": "",
+ "tracker_url": "",
"category": "Mesh"}
+def reaction_diffusion_add_handler(self, context):
+ # remove existing handlers
+ old_handlers = []
+ for h in bpy.app.handlers.frame_change_post:
+ if "reaction_diffusion" in str(h):
+ old_handlers.append(h)
+ for h in old_handlers: bpy.app.handlers.frame_change_post.remove(h)
+ # add new handler
+ bpy.app.handlers.frame_change_post.append(reaction_diffusion_def)
+
+class formula_prop(PropertyGroup):
+ name : StringProperty()
+ formula : StringProperty()
+ float_var : FloatVectorProperty(name="", description="", default=(0, 0, 0, 0, 0), size=5)
+ int_var : IntVectorProperty(name="", description="", default=(0, 0, 0, 0, 0), size=5)
+
+class reaction_diffusion_prop(PropertyGroup):
+ run : BoolProperty(default=False, update = reaction_diffusion_add_handler)
+
+ time_steps : bpy.props.IntProperty(
+ name="Steps", default=10, min=0, soft_max=50,
+ description="Number of Steps")
+
+ dt : bpy.props.FloatProperty(
+ name="dt", default=1, min=0, soft_max=0.2,
+ description="Time Step")
+
+ diff_a : bpy.props.FloatProperty(
+ name="Diff A", default=0.1, min=0, soft_max=2, precision=3,
+ description="Diffusion A")
+
+ diff_b : bpy.props.FloatProperty(
+ name="Diff B", default=0.05, min=0, soft_max=2, precision=3,
+ description="Diff
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list