From 8c87cf0afccb2bb73a3575eaa58016cfec4e177a Mon Sep 17 00:00:00 2001 From: Robert Guetzkow Date: Sat, 5 Dec 2020 09:48:04 +0100 Subject: Fix T83386: Use type annotation instead of assignment The Sapling Tree Gen add-on previously assigned the `FloatProperty` to `bend`. This caused accessing `bend` in calculations to return a reference to the `FloatProperty` instead of its value. This commit replaces the assignment with an annotation as it is the correct usage since the Python API changes for Blender 2.80. NOTE: The add-on currently has another problem T83360 which prevents it from working. For the implementation of the patch I had to comment out the usages of `props.leafDupliObj`. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D9747 --- add_curve_sapling/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'add_curve_sapling') diff --git a/add_curve_sapling/__init__.py b/add_curve_sapling/__init__.py index e5b88157..9bcd1492 100644 --- a/add_curve_sapling/__init__.py +++ b/add_curve_sapling/__init__.py @@ -701,7 +701,7 @@ class AddTree(Operator): items=objectList, update=update_leaves ) - bend = FloatProperty( + bend: FloatProperty( name='Leaf Bend', description='The proportion of bending applied to the leaf (Bend)', min=0.0, -- cgit v1.2.3