Page MenuHome

Press/Tweak Event Trigger Lag on Heavy Geo
Closed, ResolvedPublic

Description

System Information
Win 7 64 Ult
GeForce GTX 580 1.5 GB

Blender Version
Broken: Always
Worked: Never

Short description of error

Note, I use a heavily customized blender version that is LMB-centric and uses ALT-style navigation, with a more standard selection set. Also I use a Wacom Tablet exclusively.
But this issue has been confirmed by other users with different configs.

Anyway, anytime I'm selecting an object that is heavy on geo, my click is registered as a drag (tweak).

What is happening. There is quite a noticable lag before even that drag (tweak) event kicks in. I believe under the hood there is some heavy computation going on that takes away the time of the initial (click) event (hence the lag to even trigger the drag event). This is all even more pronounced when clicking on heavy geo. And while the system is frozen with that computation, because I'm on a Tablet my mouse cursor always slightly moves in the meantime and triggers the tweak event, which in my case is mapped to box/marquee select.

I hope this all made sense.
It's super annoying because if you use a tablet it's super hard to find a balance and separate click <> drag events in blender. Next to impossible when clicking on heavy geo!

Possible (quick) solution, whatever computation happens after the initial click trigger, leave them for after you decide weather it's a click or tweak (drag) event. I believe just by tweaking this one sequence of execution the whole event trigger system could become more responsive.

Ofcourse, only in the case if those computations are not something crucial to that same trigger event. But whatever it is, I'm sure there's a way around it to not calculate all the things that are currently done and producing the freeze of the system.

Exact steps for others to reproduce the error
You can test it if you assign different actions/commands to the same MouseButton one for Press, other for Tweak. Create a number of objects, make sure one of them is heavy geo.
Press will be overridden by tweak almost each time you click on the object with heavy geo.

Confirmation by other users starts here:
http://www.blenderartists.org/forum/showthread.php?370186-WIP-Stickey-Prototype-(feedback-welcome)&p=2870305&viewfull=1#post2870305

...
In general the whole Event Trigger has to be looked into. As Stan Pancakes menitoned, the distinction between Click and Double Click is also not resolved elegantly.

Event Timeline

0rAngE (undo) raised the priority of this task from to Needs Triage by Developer.
0rAngE (undo) updated the task description. (Show Details)
0rAngE (undo) added a project: BF Blender.
0rAngE (undo) set Type to Bug.
0rAngE (undo) added a subscriber: 0rAngE (undo).

I can confirm the bug. Just to be sure, you mapped your LMB drag action to "box select", but the bug triggers anyway and moves your object? If so, it's because of some hard coded shortcut? I don't know if your proposal will really solve this problem, but removing all hard-coded keys like it was planned would certainly fix it and would profit everybody?

bliblubli, this is not a case of 'hard-coded' keys.

In my case LMB click is mapped to select, and the tweak is mapped to Box Select. The translate is not 'hard-coded' at all, I have it mapped elsewhere. So in my case it's the Box Select that overrides my click-select. It's a matter of how Event Triggers are handled.

bliblubli, if interested, here's a link where I share my setup, and more information about it.
http://www.blenderartists.org/forum/showthread.php?352666-Input-Custom-Blender-Setup-Silo-Maya-esque

Actually in the video included on that page, you can see when this bug/ssue happens. It's a bit of a long video, if any developers want I can go through the video and find the moment when that happens and post here.

Ok, sorry for my bad English skills :( Understood problem now.

I can't redo this,

Tested with 2.74 config:
http://blenderartists.org/forum/showthread.php?352666-Input-Custom-Blender-Setup-Silo-Maya-esque&p=2751158&viewfull=1#post2751158

The tweak behavior is working as I'd expect.. and not being enabled unless I drag my mouse more then the tweak distance.

Can you see if increasing the input preference for the tweak threshold makes any difference (you can set to 200 for eg).

Also, you can see the events that blender registers by running Blender with the command line option --debug-events (to see when a tweak event is passed).

Campbell Barton (campbellbarton) lowered the priority of this task from Needs Triage by Developer to Needs Information from User.May 18 2015, 7:24 AM

Hey Campbell,

Thanks on the effort to actually try it with that custom setup.

This happens mostly in cases of heavy geo, objects with 100k + faces at least.
BTW thinking about it right now, what's the biggest issue is not only that the Box Select (Tweak) kicks in instead of Click Select, but it also gets stuck in the Box Select. It behaves as if I'm keeping my LMB down (and I'm not), in essence it's stuck in Box Select until I cancel or do another click.

Blender is my main tool for modeling, both personal stuff and at work, so I can assure you this is real, I get this on a daily basis. I'll create a scene where you will be able to replicate this in not more than 10-20 selections of a heavy geo object. It depends on my workload this week, it might have to wait until the weekend to hook you up with the file.

In regards to the Tweak Threshold, I'm aware of the setting and have spent a lot of time trying to find that sweet spot. Actually as far as I know it's on my request that Sergey has exposed this setting in the preferences.

Hopefully with the file provided we will be able to confirm and track it down.

Thanks.

Hey Campbell,

Here's a video that has some more info on the issue.
As mentioned, I can provide you with the file from the video to test it on your end.

Link:
http://edge-loop.com/images/blender/bugtracker/BoxSelectBug.zip

Thanks!

@0rAngE (undo), did you manage to try this?

Can you see if increasing the input preference for the tweak threshold makes any difference (you can set to 200 for eg).

You say your familiar with the option, but did you see if changing it had any effect?

Or this?

Also, you can see the events that blender registers by running Blender with the command line option --debug-events (to see when a tweak event is passed).


Could you try disable Global Undo too? (it may make a difference).

First of all, there should be a change of the title for this bug report. Only after the initial creation of this bug report was I able to actually pinpoint the main problem of what's going on. And let's say, that actually the main problem is Box Select getting stuck sometimes when clicking.

So, in my setup LMB (click) is a regular select, and LMB Tweak (Drag) is the Box Select.

  • The issue is often times when I click I get the Box Select - but that actually is not big of a deal if it would be BOX SELECT. The problem is I get STUCK in that box select.

This is the click sequence.

  • click

it invokes the tweak command
I'm now in box select

  • BUT, I'm NOT keeping my LMB down. And as I move the mouse the Box Select marquee is drawing along. I'm stuck in there until I either press LMB again to finish the box select; or press RMB/ESC to cancel.

... As you know, this is not how Box Select Works. If I release LMB, Box Select should execute.

So as you see there is a sequence of events that can trigger a Box Select that is somehow stuck and disregards the LMB release as the indication to execute Box Select. It needs another LMB to execute, or RMB/ESC to cancel.

Can you see if increasing the input preference for the tweak threshold makes any difference (you can set to 200 for eg).

OK, so I've increased the Tweak Threshold to 200. Effectively it nulls everything tweak stands for as the distance is so large that it's useless. But ... for the sake of argument, I've done a whole bunch of clicking - and I can not reproduce the Box Select to get stuck. Not really surprised there.

If I drop it down to 40, I can still reproduce it. Yet 40 is still such a large distance that again it nulls the point of having this Tweak feature.

If I drop it down to the lowest value of 3, I can't see that it's any worse than what I had (on 6).

Also increasing the Drag Threshold does not seem to have noticeable impact.

It's a special kind of click BTW, really short click (that it's fair to assume goes over the Tweak Threshold in the meantime). I'm using a tablet where that kind of click is what I get often. But I can reproduce that on a mouse using similar mechanics.
Nonetheless, whatever happens in terms of click events, it should not impact Box Select having a different behavior than "usual".

I don't know how to describe this better. You have the video I recorded that has ScreenCast Keys Displayed. But oddly that second LMB click to execute Box Select; or RMB to cancel is not registered by ScreenCast Keys Addon. Now that right there should tell you something. You can see it in the video on 0:50 - 1:02. At 1:02 I press the RMB to exit it and nothing is picked up by ScreenCast Keys Addon.

If you want to mark it as user error, I have to live with it. I'll wait 6 mnths / 1 yr, and if you guys don't catch it on your end and fix it - than it'll be time to again raise this to your attention, hopefully with better luck.

Anyway, thanks for your efforts, appreciate all the hard work. Keep it up.

@0rAngE (undo), thanks for the info, Somehow this time I managed to redo the error very easily, I must have been testing on too simple a file before. (or not making the kind of mouse motion to cause problems).

Committed fix,
Even if the scene is so laggy as to not manage to draw the border, click-drag-release will execute the border select as expected.

So it should work reliably now, without getting stuck.

I think it's a combination of a file that needs to be a bit more 'heavy' in lack of other terms.
But even more so, it's a special type of motion that would trigger it, something that comes natural when using tablets, not really a natural mouse type motion.

Anyway, big THANKS!!!!!!
You have no idea what this fix means for me, much appreciated!!!

Looking forward to tomorrow and downloading a build with the fix.

Thanks again on the effort to stick with testing this and catching the culprit!

I downloaded a build with the patch off buildbot.
That was it! You nailed it.

  1. I can't replicate it any more.
  2. The selections (Tweak Events) are so much smoother overall. No sense of lag any more.

I don't know if you guys can actually notice how much smoother everything is, but with my custom setup this is a world of difference!

Thanks!!!!