alessandro-zomparelli / tissue

Tissue - Blender's add-on for computational design
1.02k stars 72 forks source link

Error when enabling shape keys #147

Closed dimitarsp closed 7 months ago

dimitarsp commented 1 year ago

Hi @alessandro-zomparelli I am getting an error when trying to transfer Shape keys. It works with the bundled Tissue 0.3.52 in Blender 3.4.1 but fails with 0.3.56 (latest from git source)

Tissue: Tessellating...
        Tessellation of "Tessellation.010" in 1.6483 sec
Tissue: Tessellating...
Traceback (most recent call last):
  File "E:\OneDrive\_misc\blender\_code\addons\tissue\tessellate_numpy.py", line 2164, in execute
    same_iteration = tessellate_patch(tess_props)
  File "E:\OneDrive\_misc\blender\_code\addons\tissue\tessellate_numpy.py", line 978, in tessellate_patch
    store_sk_coordinates = calc_thickness(co2,n2,vz,a2,weight_thickness)
  File "E:\OneDrive\_misc\blender\_code\addons\tissue\utils.py", line 111, in calc_thickness
    co3[i] = numba_calc_thickness_area_weight(co2[:,i],n2[:,i],vz[:,i],a[:,min(i,na)],weight)
  File "C:\Users\dimit\AppData\Roaming\Python\Python310\site-packages\numba\core\dispatcher.py", line 468, in _compile_for_args
    error_rewrite(e, 'typing')
  File "C:\Users\dimit\AppData\Roaming\Python\Python310\site-packages\numba\core\dispatcher.py", line 409, in error_rewrite
    raise e.with_traceback(None)
numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
No implementation of function Function(<built-in function setitem>) found for signature:

 >>> setitem(array(float64, 3d, C), UniTuple(int64 x 3), array(float64, 1d, C))

There are 16 candidate implementations:
  - Of which 16 did not match due to:
  Overload of function 'setitem': File: <numerous>: Line N/A.
    With argument(s): '(array(float64, 3d, C), UniTuple(int64 x 3), array(float64, 1d, C))':
   No match.

During: typing of setitem at E:\OneDrive\_misc\blender\_code\addons\tissue\numba_functions.py (357)

File "E:\OneDrive\_misc\blender\_code\addons\tissue\numba_functions.py", line 357:
    def numba_calc_thickness_area_weight(co2,n2,vz,a,weight):
        <source elided>
                for k in prange(n_co):
                    co3[i,j,k] = co2[i,j,k] + n2[i,min(j,nn),k] * vz[0,j,0] * a[i,min(j,na),0] * weight[i,min(j,nw),0]
                    ^

Error: Python: Traceback (most recent call last):
  File "E:\OneDrive\_misc\blender\_code\addons\tissue\tessellate_numpy.py", line 2164, in execute
    same_iteration = tessellate_patch(tess_props)
  File "E:\OneDrive\_misc\blender\_code\addons\tissue\tessellate_numpy.py", line 978, in tessellate_patch
    store_sk_coordinates = calc_thickness(co2,n2,vz,a2,weight_thickness)
  File "E:\OneDrive\_misc\blender\_code\addons\tissue\utils.py", line 111, in calc_thickness
    co3[i] = numba_calc_thickness_area_weight(co2[:,i],n2[:,i],vz[:,i],a[:,min(i,na)],weight)
  File "C:\Users\dimit\AppData\Roaming\Python\Python310\site-packages\numba\core\dispatcher.py", line 468, in _compile_for_args
    error_rewrite(e, 'typing')
  File "C:\Users\dimit\AppData\Roaming\Python\Python310\site-packages\numba\core\dispatcher.py", line 409, in error_rewrite
    raise e.with_traceback(None)
numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
No implementation of function
alessandro-zomparelli commented 1 year ago

Hi @dimitarsp thanks for reporting that. I should have fixed the bug now. Please check the latest Master branch :-)