Here I have the world's simplest python SOP, and I've added a button to its UI that when pressed I'd expect to call main() in the python code. Instead, when pressing the button, I get the error "AttributeError:'module' object has no attribute 'main'
I've defined the UI for the button so that the callback script is
hou.pwd().hdaModule().main()
The code in the python node is simple:
node = hou.pwd()
geo = node.geometry()
# Add code to modify contents of geo.
# Use drop down menu to select examples.
def main():
print("in main...")
#main()
Clearly I'm doing something wrong, but I'm not sure what. All explanations would be most welcome!
Thanks very much,
Mary
Image Not Found

