Hi guys!.
I have this code in my addon:
def updatefunct():
if len(bpy.context.selected_objects) >= 1:
print("good")
else:
self.report({'WARNING'}, "You need selected Object/s First!")
class myProperties(bpy.types.PropertyGroup):
bpy.types.Scene.myProp = bpy.props.FloatProperty(update=updatefunct)
But get this error:
AttributeError: 'Scene' object has no attribute 'report'
Any idea? Any solution?.