Python viewer states geometry collisions, Multiple for-each loops, Multiple curves. Houdini tutorial
ฝัง
- เผยแพร่เมื่อ 2 ส.ค. 2024
- For the intro on viewer states chack out the playlist:
• Houdini viewer states
0:00 end result
01:03 creating embedded hda
1:46 first loop setup
02:33 creating a point
03:35 adding parameters
04:53 creating channel references for each loop
07:58 referencing attributes in a parameters
09:04 creating a curve from created points
11:21 creating the second for-each loop
11:50 adding new parameters for HDA
12:42 creating new parameter references
18:02 python state setup
18:41 getting instance attributes for point and curve count parms
21:21 editing start method
23:18 editing onMouseEvent method
27:11 setting un onKeyEvent method
30:33 assigning default value for the number of curves
32:21 setting up collision geo toggle
34:35 editing python code for collision
40.28 that's it!
Visit my gumroad for free downloads gumroad.com/viktorsanfimovs
Nice, i was searching for examples about it to learn new methods. Thanx
aaaaaaaawesome!
fantastic!
awesome more python states! :D
Hey, I am learning so much from you, Thanks!
Now i am stack and need a help. I want to use z key with scroll mouse wheel to act something, but they are only available in deferent events.
I think i have to use return True to consume the event, but how can i use it?
if you know please help!
You should be able to just create " if x and y" conditional that will only execute if key is down and whell event has happened.
I have done these kinda if statements in my multigroups hda submission. In that one i had a shift key down and left mouse button to drag a slider in a viewport.
Im sure the forum link is still live. If your stuck go download hda.and open up the python viewer state python file. Take a look.
Hope this helps! 🤗
@@viktors_anfimovs No one could not help me on the forum. There was other problem, that shift key, alt, or ctrl are accessible by isShiftKey() everywhere, but not other key by keyString().
I found a solution: create a class variable, which will be true if z key is press and isKeyDown(), and so that variable is accessible everywhere
Thanks your time. I will share the tool, when it is finished. You are my main teacher in the use of Python in Houdini.
@@viktors_anfimovs Hi, it's the HDA that i have been working:
th-cam.com/video/LZUEGKH38wQ/w-d-xo.html