Node Tools: Add mouse position node, wait for cursor option #121043

Merged
Hans Goudey merged 9 commits from HooglyBoogly/blender:node-tools-mouse-position into main 2024-04-26 20:14:36 +02:00

9 Commits

Author SHA1 Message Date
baf3965d60 Merge branch 'main' into node-tools-mouse-position 2024-04-26 13:49:10 -04:00
94432cd19b Rename to wait_for_click 2024-04-26 11:52:03 -04:00
a15aba3b30 Add "Options" popover 2024-04-26 11:48:32 -04:00
33651a08c8 Rename to "Region Width" and "Region Height" 2024-04-26 11:47:05 -04:00
373a9cb18f Add null check for region 2024-04-26 11:44:46 -04:00
fada6c5ca0 Add socket descriptions 2024-04-26 11:43:02 -04:00
7cb6187161 Merge branch 'main' into node-tools-mouse-position 2024-04-26 11:27:39 -04:00
df7c030c07 Fix name in add menu 2024-04-24 13:18:48 -04:00
e426d2df04 Node Tools: Add mouse potiion node, wait for cursor option
Add a "Mouse Position" node that outputs the location of the mouse
cursor in region space and the overall size of the region, both in pixel
units. Both outputs are integers to help reflect their pixel units.
If there the mouse position is ever accessible in sub-pixels, they can
easily be changed to floats.

Also add a "Wait for Cursor" option similar to the one for some built-in
operators that delay's the operator's execution until there is a mouse
click in the viewport. That way the operator can be called from menus
even though it is interactive. This option is placed in the node editor
header. When there are more options, it will be part of an "Options"
popover panel similar to the existing "Modes" and "types" popovers.

Combined with the viewport transform node, and other nodes like Raycast,
these features can allow making tools that create geometry where you
click in the scene.
2024-04-24 13:02:17 -04:00