Quick question:
I have a panel.py file, a operator.py file, and a __init__
that puts it all together.
My panel has a class that uses a bpy.types.PropertyGroup
to store a PropertyString into a variable called file_path
. It also has a class that uses bpy.types.Panel
to create the PropertyString like this:
def draw(self, context):
layout = self.layout
col = layout.column()
tools = context.scene.worth_group_tools
selected_path = col.prop(tools, "file_path")
My question is, how do I access this variable on my operator.py page? I've tried:
from . Tools_panel import PT_Panel
def execute(self, context):
print(PT_Panel.draw.selected_path)
return {'FINISHED'}
But that doesn't work. Any suggestions? My code works fine until I try to print with PT_Panel.draw.selected_path
.