jobweek / CurveArray

26 stars 3 forks source link

3.4 - Error #8

Open pl4sma2389 opened 1 year ago

pl4sma2389 commented 1 year ago

Hello! I haven't used this addon in a while, and when I went to use it today (after updating to the latest version 4.0.3), I ran into this error. I was using a NURBS path and two objects with default settings in CurveArray except that I had switched the Spacing Type to Fill by Size (the default settings also throw the error; in fact, no matter what I do, I cannot create an array, just this error).

Traceback (most recent call last):
  File "C:\Users\ohyea\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\Curve_Array_Magic_Curve\Curve_Array\Engine\Array_Creation\Create_Array_Ops.py", line 22, in execute
    crete_array_manager(array_params)
  File "C:\Users\ohyea\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\Curve_Array_Magic_Curve\Curve_Array\Engine\Array_Creation\Create_Array.py", line 18, in crete_array_manager
    calc_path_data_manager()
  File "C:\Users\ohyea\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\Curve_Array_Magic_Curve\Curve_Array\Engine\Path_Calculation\Calc_Path_Data.py", line 55, in calc_path_data_manager
    path_data = path_data_calc(verts_sequence_generator, bm.verts, arr_size, curve.name)
  File "C:\Users\ohyea\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\Curve_Array_Magic_Curve\Curve_Array\Engine\Path_Calculation\Calc_Path_Data_Functions.py", line 629, in path_data_calc
    _calc_smooth_direction(interpolated_segments_arr, start_range, end_range=(i - 1))
  File "C:\Users\ohyea\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\Curve_Array_Magic_Curve\Curve_Array\Engine\Path_Calculation\Calc_Path_Data_Functions.py", line 596, in _calc_smooth_direction
    interpolated_segments_arr[start_range].direction_normalized,
AttributeError: 'NoneType' object has no attribute 'direction_normalized'
jobweek commented 1 year ago

Hi, unfortunately for technical reasons, Curve Array does not work with NURBS curves at the moment. I'm looking for ways to add the ability to work with these curves.

pl4sma2389 commented 1 year ago

Ok, I switched the curves over to Bezier curves, and it seems to work, but my application requires that the curve be shrinkwrapped to the surface of another object, and with the Shrinkwrap's Apply on Spline off, it throws this error:

Traceback (most recent call last):
  File "C:\Users\ohyea\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\Curve_Array_Magic_Curve\Curve_Array\Engine\Array_Creation\Create_Array_Ops.py", line 22, in execute
    crete_array_manager(array_params)
  File "C:\Users\ohyea\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\Curve_Array_Magic_Curve\Curve_Array\Engine\Array_Creation\Create_Array.py", line 18, in crete_array_manager
    calc_path_data_manager()
  File "C:\Users\ohyea\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\Curve_Array_Magic_Curve\Curve_Array\Engine\Path_Calculation\Calc_Path_Data.py", line 55, in calc_path_data_manager
    path_data = path_data_calc(verts_sequence_generator, bm.verts, arr_size, curve.name)
  File "C:\Users\ohyea\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\Curve_Array_Magic_Curve\Curve_Array\Engine\Path_Calculation\Calc_Path_Data_Functions.py", line 638, in path_data_calc
    length, segment = _calc_segment_data(fisrt_point, second_point)
  File "C:\Users\ohyea\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\Curve_Array_Magic_Curve\Curve_Array\Engine\Path_Calculation\Calc_Path_Data_Functions.py", line 567, in _calc_segment_data
    first_normal = _project_vec(direction.normalized(), fisrt_point[1]).normalized()
  File "C:\Users\ohyea\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\Curve_Array_Magic_Curve\Curve_Array\Engine\Path_Calculation\Calc_Path_Data_Functions.py", line 72, in _project_vec
    raise AssertionError
AssertionError

I can still make it work by using Apply on Spline, so that's good.