From efff62e09d8de0d7feea4678392378f3712d0d08 Mon Sep 17 00:00:00 2001 From: CJSatnarine Date: Sun, 31 Dec 2023 17:57:05 -0500 Subject: [PATCH] Fix the colouring of the leaves --- GenerateTerrain.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GenerateTerrain.py b/GenerateTerrain.py index c22098f..1b218eb 100644 --- a/GenerateTerrain.py +++ b/GenerateTerrain.py @@ -81,10 +81,10 @@ def buildTree(): # Function to make the low poly leaves for the tree. def createLowPolyLeaves(size, xPosition, yPosition, zPosition): - lowPolyLeaves = bpy.ops.mesh.primitive_cube_add(size = size, location = (xPosition, yPosition, zPosition), scale = (size, size, size)) + bpy.ops.mesh.primitive_cube_add(size = size, location = (xPosition, yPosition, zPosition), scale = (size, size, size)) activeObject = bpy.context.active_object colourOfLeaves = createMaterial(0.007951, 0.349087, 0.0003, 1) - assignMaterial(lowPolyLeaves, colourOfLeaves) + assignMaterial(activeObject, colourOfLeaves) return activeObject # Function to add a material to the selected object.