Created
January 22, 2021 13:25
-
-
Save kickbase/1261fda4175dddc5df36e9fcfeb34fcc to your computer and use it in GitHub Desktop.
[Houdini] [Python] Getting a value from a textarea using the tkinter module.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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