Page MenuHome

Can't resize selected node
Closed, ResolvedPublic

Description

System Information
Operating system: Linux-4.15.0-47-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 390.116

Blender Version
Broken: version: 2.80 (sub 64), branch: blender2.7, commit date: 2019-05-15 21:16, hash: rB989d8543853c
Broken: version: 2.80 (sub 64), branch: blender2.7, commit date: 2019-05-14 22:59, hash: rB4e46ed37fc59
Worked: version: 2.80 (sub 64), branch: blender2.7, commit date: 2019-05-13 22:40, hash: rBf070bdd7c9c4

Short description of error
Can't resize selected node

Exact steps for others to reproduce the error

  1. Select any node
  2. Try to resize it - it will move instead of resizing

  1. If node isn't selected - it will resize

Event Timeline

This is same exact problem as in T64660… that one could be worked-around with a rather cheap trick, but current one am not sure…

This raises some more general design questions/issues in fact:

  1. Is it expected that when an operator returns RUNNING_MODAL, event is always considered as handled, even when it also returns PASSTRHOUGH? Could we even have two or more modal ops running at the same time? @Campbell Barton (campbellbarton)?
  2. Do we need to think about a better control over order in which ops are checked for? Or be much stricter in their polling functions?

Question 2 is real root of the issue here, as node select, being a tool, gets precedence over all more specific/constrained operators (like link or resize, which both can only be triggered on much smaller 'active' areas than node selection itself). We can keep adding exceptions to select to abort in case we are also on node's border, but then this is sort of endless, terribly brittle, and prone to fail in more and more corner cases and special cases. I’d rather see a way developed to properly control priorities of evaluation of ops, think we'll need this more and more if we want to keep adding more and more things to a single event (left mouse click in that case).

@Brecht Van Lommel (brecht), @Campbell Barton (campbellbarton), @William Reynish (billreynish) this is kind of fundamental issue in current design imho… If you want lots of operators to use same shortcuts as init trigger, relying on PASSTHROUGH usage everywhere is really not the best way to go. If we don’t want to/can’t add a proper prioritization system, then I think we should at least review all those ops, to get some much, much stricter polling functions, instead of adding all kind of exceptions in their exec code?

It should be possible to pass through events from modal(). Other modal operators just seem to return PASSTHROUGH without RUNNING_MODAL. The latter only really needs to be returned from invoke().

As for order, I think resize should be ahead of selection in the keymap and it's not now? That's generally how I would expect things to work, operators in the right order in the keymap and passing through to the next one if not used.

Thing is, we also need passthrough from initial invoke call, since it’s init event here that is shared between ops. But we'd rather not have select ran at all if some other, more specific op can run instead, else getting rid of select running code (getting out of modal loop) won't be exactly easy.

And select being a tool, it is tried well before any other ops from regular keymap., at least from what I can see in --debug-handlers reports…

This comment was removed by George Vogiatzis (Gvgeo).
Bastien Montagne (mont29) raised the priority of this task from Confirmed, Medium to Confirmed, High.May 20 2019, 2:29 PM

@Campbell Barton (campbellbarton) assigning to you to ensure you see that task, we really need input from event master here. Why do we break event handling when operator returns (OPERATOR_PASS_THROUGH | OPERATOR_RUNNING_MODAL), at the end of wm_handler_operator_call()? This seems the opposite of PASSTHROUGH idea to me.

Can’t see how we can do what we want to do here, currently… We need to keep events being processed after that initial call to invoke() has returned that combination of flags.

Also, raising priority since that should be fixed asap imho.

In lack of a better idea, I’ll go rampaging poll() func of the select op to return false in case mouse is over a socket or node border, in a few days…

Maybe related: Reroute dots can't be selected using standard select tool, only via box, lasso circle selcect tools.