[Bf-extensions-cvs] [2b144940] master: mesh_tissue: fix errors, remove read me, clean up: T63477

meta-androcto noreply at git.blender.org
Wed Jul 3 11:28:40 CEST 2019


Commit: 2b144940181b60c8a08b91646e167064f286a2ef
Author: meta-androcto
Date:   Wed Jul 3 19:28:22 2019 +1000
Branches: master
https://developer.blender.org/rBA2b144940181b60c8a08b91646e167064f286a2ef

mesh_tissue: fix errors, remove read me, clean up: T63477

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

D	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
M	mesh_tissue/numba_functions.py
M	mesh_tissue/tessellate_numpy.py
M	mesh_tissue/utils.py
M	mesh_tissue/uv_to_mesh.py

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

diff --git a/mesh_tissue/README.md b/mesh_tissue/README.md
deleted file mode 100644
index e5511cef..00000000
--- a/mesh_tissue/README.md
+++ /dev/null
@@ -1,38 +0,0 @@
-# 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
-
-### Blender 2.79
-
-Official version (master): https://github.com/alessandro-zomparelli/tissue/archive/master.zip
-
-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 3be9aefd..26fbd199 100644
--- a/mesh_tissue/__init__.py
+++ b/mesh_tissue/__init__.py
@@ -34,10 +34,10 @@ bl_info = {
     "name": "Tissue",
     "author": "Alessandro Zomparelli (Co-de-iT)",
     "version": (0, 3, 25),
-    "blender": (2, 79, 0),
+    "blender": (2, 80, 0),
     "location": "",
     "description": "Tools for Computational Design",
-    "warning": "Work In Progress",
+    "warning": "",
     "wiki_url": "https://github.com/alessandro-zomparelli/tissue/wiki",
     "tracker_url": "https://github.com/alessandro-zomparelli/tissue/issues",
     "category": "Mesh"}
diff --git a/mesh_tissue/colors_groups_exchanger.py b/mesh_tissue/colors_groups_exchanger.py
index 0da15e85..00fd3649 100644
--- a/mesh_tissue/colors_groups_exchanger.py
+++ b/mesh_tissue/colors_groups_exchanger.py
@@ -35,7 +35,7 @@
 
 import bpy, bmesh
 import numpy as np
-import math, timeit
+import math, timeit, time
 from math import *#pi, sin
 from statistics import mean, stdev
 from mathutils import Vector
@@ -61,19 +61,6 @@ from bpy.props import (
 
 from .utils import *
 
-bl_info = {
-    "name": "Colors/Groups Exchanger",
-    "author": "Alessandro Zomparelli (Co-de-iT)",
-    "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 = []
@@ -91,7 +78,8 @@ class formula_prop(PropertyGroup):
     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)
+    run : BoolProperty(default=False, update = reaction_diffusion_add_handler,
+        description='Compute a new iteration on frame changes. Currently is not working during  Render Animation')
 
     time_steps : bpy.props.IntProperty(
         name="Steps", default=10, min=0, soft_max=50,
@@ -333,8 +321,6 @@ class weight_formula(bpy.types.Operator):
             self.report({'ERROR'}, weight)
             return {'CANCELLED'}
 
-        #print("time: " + str(timeit.default_timer() - start_time))
-
         #start_time = timeit.default_timer()
         weight = nan_to_num(weight)
         if type(weight) == int or type(weight) == float:
@@ -413,7 +399,6 @@ class _weight_laplacian(bpy.types.Operator):
 
         group_id = ob.vertex_groups.active_index
         input_group = ob.vertex_groups[group_id].name
-        print(input_group)
 
         group_name = "Laplacian"
         ob.vertex_groups.new(name=group_name)
@@ -432,8 +417,6 @@ class _weight_laplacian(bpy.types.Operator):
 
         n_verts = len(bm.verts)
         lap = [0]*n_verts
-        #print(len(lap))
-        #print(len(weight))
         for e in bm.edges:
             if self.mode == 'LENGTH':
                 length = e.calc_length()
@@ -596,8 +579,6 @@ class weight_laplacian(bpy.types.Operator):
 
             lap_a = zeros((n_verts))#[0]*n_verts
             lap_b = zeros((n_verts))#[0]*n_verts
-            #print(len(lap))
-            #print(len(weight))
             for e in bm.edges:
                 id0 = e.verts[0].index
                 id1 = e.verts[1].index
@@ -660,6 +641,7 @@ class reaction_diffusion(bpy.types.Operator):
     def execute(self, context):
         #bpy.app.handlers.frame_change_post.remove(reaction_diffusion_def)
         reaction_diffusion_add_handler(self, context)
+        set_animatable_fix_handler(self, context)
         try: ob = context.object
         except:
             self.report({'ERROR'}, "Please select an Object")
@@ -696,8 +678,6 @@ class reaction_diffusion(bpy.types.Operator):
 
             lap_a = zeros((n_verts))#[0]*n_verts
             lap_b = zeros((n_verts))#[0]*n_verts
-            #print(len(lap))
-            #print(len(weight))
             for e in bm.edges:
                 id0 = e.verts[0].index
                 id1 = e.verts[1].index
@@ -947,7 +927,6 @@ class edges_bending(bpy.types.Operator):
             for e in v.link_edges:
                 vdef.append(deformations[e.index])
             v_deformations.append(mean(vdef))
-        print(v_deformations)
         if self.bounds == 'MANUAL':
             min_def = radians(self.min_def)
             max_def = radians(self.max_def)
@@ -1097,7 +1076,6 @@ class weight_contour_displace(bpy.types.Operator):
                     if w_min < iso_val and w_max > iso_val:
                         faces_mask.append(f)
                         break
-            #print("selected faces:" + str(len(faces_mask)))
 
             #link_faces = [[f for f in e.link_faces] for e in bm.edges]
 
@@ -1137,7 +1115,6 @@ class weight_contour_displace(bpy.types.Operator):
                     count += 1
                     _filtered_edges.append(e)
             filtered_edges = _filtered_edges
-            #print("creating faces")
             splitted_faces = []
 
             switch = False
@@ -1180,7 +1157,6 @@ class weight_contour_displace(bpy.types.Operator):
                 splitted_faces.append(build_faces[switch])
                 #del_faces.append(f.index)
 
-            #print("generate new bmesh")
             # adding new vertices
             for v in verts: new_vert = bm.verts.new(v)
             bm.verts.index_update()
@@ -1197,7 +1173,6 @@ class weight_contour_displace(bpy.types.Operator):
                 except:
                     missed_faces.append(f)
 
-            #print("missed " + str(len(missed_faces)) + " faces")
             bm.faces.ensure_lookup_table()
             # updating weight values
             weight = weight + [iso_val]*len(verts)
@@ -1211,7 +1186,6 @@ class weight_contour_displace(bpy.types.Operator):
                 if e not in delete_edges: _filtered_edges.append(e)
             filtered_edges = _filtered_edges
 
-        #print("creating curve")
         name = ob0.name + '_ContourDisp'
         me = bpy.data.meshes.new(name)
         bm.to_mesh(me)
@@ -1229,7 +1203,6 @@ class weight_contour_displace(bpy.types.Operator):
             ob.vertex_groups.new(name=g.name)
         #ob.vertex_groups.new(name=vertex_group_name)
 
-        #print("doing weight")
         all_weight = weight + [iso_val]*len(verts)
         #mult = 1/(1-iso_val)
         for id in range(len(all_weight)):
@@ -1253,10 +1226,6 @@ class weight_contour_displace(bpy.types.Operator):
                 if self.bool_flip: w1 = 1-w
                 else: w1 = w
             ob.vertex_groups[vertex_group_name].add([id], w1, 'REPLACE')
-        #print("weight done")
-        #for id in range(len(weight), len(ob.data.vertices)):
-        #    ob.vertex_groups[vertex_group_name].add([id], iso_val*0, 'ADD')
-
 
         ob.vertex_groups.active_index = group_id
 
@@ -1354,9 +1323,6 @@ class weight_contour_mask(bpy.types.Operator):
                 if w_min < iso_val and w_max > iso_val:
                     faces_mask.append(f)
                     break
-        #print("selected faces:" + str(len(faces_mask)))
-
-        #link_faces = [[f for f in e.link_faces] for e in bm.edges]
 
         filtered_edges = bm.edges# me0.edges
         faces_todo = [f.select for f in bm.faces]
@@ -1388,7 +1354,6 @@ class weight_contour_mask(bpy.types.Operator):
                 edges_id[str(id1)+"_"+str(id0)] = count
                 count += 1
 
-        #print("creating faces")
         splitted_faces = []
 
         switch = False
@@ -1430,7 +1395,6 @@ class weight_contour_mask(bpy.types.Operator):
             # add last face
             splitted_faces.append(build_faces[switch])
 
-        #print("generate new bmesh")
         # adding new vertices
         for v in verts: bm.verts.new(v)
         bm.verts.ensure_lookup_table()
@@ -1449,7 +1413,6 @@ class weight_contour_mask(bpy.types.Operator):
                 bm.faces.new(face_verts)
             except:
                 missed_faces.append(f)
-        #print("missed " + str(len(missed_faces)) + " faces")
 
         # Mask geometry
         if(True):
@@ -1460,7 +1423,6 @@ class weight_contour_mask(bpy.types.Operator):
                 else: weight.append(w)
 
         # Create mesh and object
-        #print("creating curve")
         name = ob0.name + '_ContourMask_{:.3f}'.format

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-extensions-cvs mailing list