Skip to content

Instantly share code, notes, and snippets.

@kickbase
Created January 22, 2021 13:25
Show Gist options
  • Save kickbase/1261fda4175dddc5df36e9fcfeb34fcc to your computer and use it in GitHub Desktop.
Save kickbase/1261fda4175dddc5df36e9fcfeb34fcc to your computer and use it in GitHub Desktop.
[Houdini] [Python] Getting a value from a textarea using the tkinter module.
import tkinter
from tkinter import messagebox
def button_click():
input_value = input_box.get()
hou.node('/obj/WORK/').createNode('box', input_value)
root.destroy()
root = tkinter.Tk()
root.title("Create Box")
root.geometry("360x240")
input_box = tkinter.Entry(width=40)
input_box.place(x=10, y=100)
input_label = tkinter.Label(text="BoxSOPの名前")
input_label.place(x=10, y=70)
button = tkinter.Button(text="実行",command=button_click)
button.place(x=10, y=130)
root.mainloop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment