Creating trees with leaves in Sapling Tree Gen add-on results in TypeError: can't multiply sequence by non-int of type 'float' #83386

Closed
opened 2020-12-04 02:45:24 +01:00 by Mike Mahoney · 7 comments

System Information
Operating system: Ubuntu 20.04
Graphics card: NVIDIA Corporation GP104M [GeForce GTX 1070 Mobile] (rev a1)

Blender Version
Broken: 2.91.0

Short description of error
Attempting to render trees with leaves in the Sapling Tree Gen add-on results in a type error.

Exact steps for others to reproduce the error
First, enable the Sapling Tree Gen add-on, then run the line bpy.ops.curve.tree_add(showLeaves=True) in the console.

>>> bpy.ops.curve.tree_add(showLeaves=True)

Error: Python: Traceback (most recent call last):
  File "/snap/blender/51/2.91/scripts/addons/add_curve_sapling/__init__.py", line 1102, in execute
    utils.addTree(self)
  File "/snap/blender/51/2.91/scripts/addons/add_curve_sapling/utils.py", line 1779, in addTree
    leafangle, horzLeaves
  File "/snap/blender/51/2.91/scripts/addons/add_curve_sapling/utils.py", line 669, in genLeafMesh
    rotateZ = Matrix.Rotation(bend * thetaBend, 3, 'Z')
TypeError: can't multiply sequence by non-int of type 'float'

location: /snap/blender/51/2.91/scripts/modules/bpy/ops.py:132


Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
  File "/snap/blender/51/2.91/scripts/modules/bpy/ops.py", line 132, in __call__
    ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Error: Python: Traceback (most recent call last):
  File "/snap/blender/51/2.91/scripts/addons/add_curve_sapling/__init__.py", line 1102, in execute
    utils.addTree(self)
  File "/snap/blender/51/2.91/scripts/addons/add_curve_sapling/utils.py", line 1779, in addTree
    leafangle, horzLeaves
  File "/snap/blender/51/2.91/scripts/addons/add_curve_sapling/utils.py", line 669, in genLeafMesh
    rotateZ = Matrix.Rotation(bend * thetaBend, 3, 'Z')
TypeError: can't multiply sequence by non-int of type 'float'

location: /snap/blender/51/2.91/scripts/modules/bpy/ops.py:132
**System Information** Operating system: Ubuntu 20.04 Graphics card: NVIDIA Corporation GP104M [GeForce GTX 1070 Mobile] (rev a1) **Blender Version** Broken: 2.91.0 **Short description of error** Attempting to render trees with leaves in the Sapling Tree Gen add-on results in a type error. **Exact steps for others to reproduce the error** First, enable the Sapling Tree Gen add-on, then run the line `bpy.ops.curve.tree_add(showLeaves=True)` in the console. ``` >>> bpy.ops.curve.tree_add(showLeaves=True) Error: Python: Traceback (most recent call last): File "/snap/blender/51/2.91/scripts/addons/add_curve_sapling/__init__.py", line 1102, in execute utils.addTree(self) File "/snap/blender/51/2.91/scripts/addons/add_curve_sapling/utils.py", line 1779, in addTree leafangle, horzLeaves File "/snap/blender/51/2.91/scripts/addons/add_curve_sapling/utils.py", line 669, in genLeafMesh rotateZ = Matrix.Rotation(bend * thetaBend, 3, 'Z') TypeError: can't multiply sequence by non-int of type 'float' location: /snap/blender/51/2.91/scripts/modules/bpy/ops.py:132 Traceback (most recent call last): File "<blender_console>", line 1, in <module> File "/snap/blender/51/2.91/scripts/modules/bpy/ops.py", line 132, in __call__ ret = _op_call(self.idname_py(), None, kw) RuntimeError: Error: Python: Traceback (most recent call last): File "/snap/blender/51/2.91/scripts/addons/add_curve_sapling/__init__.py", line 1102, in execute utils.addTree(self) File "/snap/blender/51/2.91/scripts/addons/add_curve_sapling/utils.py", line 1779, in addTree leafangle, horzLeaves File "/snap/blender/51/2.91/scripts/addons/add_curve_sapling/utils.py", line 669, in genLeafMesh rotateZ = Matrix.Rotation(bend * thetaBend, 3, 'Z') TypeError: can't multiply sequence by non-int of type 'float' location: /snap/blender/51/2.91/scripts/modules/bpy/ops.py:132 ```
Author

Added subscriber: @mikemahoney218

Added subscriber: @mikemahoney218

Added subscriber: @rjg

Added subscriber: @rjg

I currently can't reproduce this as running the operator in object mode results in the same issue as #83360 for me. I will investigate.

I currently can't reproduce this as running the operator in object mode results in the same issue as #83360 for me. I will investigate.

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

The issue is that bend is not using the type annotation, but instead assigns the FloatProperty in add_curve_sapling\__init__.py.

The issue is that `bend` is not using the type annotation, but instead assigns the `FloatProperty` in `add_curve_sapling\__init__.py`.
Robert Guetzkow self-assigned this 2020-12-04 13:01:53 +01:00

This issue was referenced by 8c87cf0afc

This issue was referenced by 8c87cf0afccb2bb73a3575eaa58016cfec4e177a

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#83386
No description provided.