I'm trying to enter dimensions of an object. I'm using the code below. It does not recognize the variables XX or YY and get the error: Key "XX" not found Any clues??
import bpy
from bpy.props import FloatProperty
from bpy.props import IntProperty
from bpy.types import Operator
import os
#create variables
bpy.types.Scene.XX=FloatProperty(name="XX", default=10.0, description="Enter XX") #XX
XX = bpy.context.scene['XX']
#print (XX)
bpy.types.Scene.YY=FloatProperty(name="YY",default=4, description="Enter YY") #YY
YY = bpy.context.scene['YY']
#print (YY)
#Draw the panel buttons for user inputs
class CustomPanel(bpy.types.Panel):
bl_label = "Wall"
bl_space_type = 'VIEW_3D'
bl_region_type = 'TOOLS'
def draw(self, context):
layout = self.layout
row = layout.row()
row.label(text="Dimensions:")
Wall_layout=self.layout.column(align=True)
Wall_layout.prop(context.scene, 'XX') #XX
Wall_layout.prop(context.scene, 'YY') #YY
def register():
bpy.utils.register_class(CustomPanel)
def unregister():
bpy.utils.unregister_class(CustomPanel)
if __name__ == "__main__":
register()
scene.XX
$\endgroup$