SceneHook polling and refreshing
-
On 24/05/2013 at 01:55, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R14
Platform: Windows ;
Language(s) : C++ ;---------
Hi Folks,I'm polling the mouse while in a scenehook plugin. However I'm not able to get the viewport to update while the poll is running.
I've tried EventAdd() and DrawViews() with various flags to no avail. I've also tried sending a message (e.g. MSG_UPDATE) but this yields the same result.
The viewport does update with EventAdd/DrawViews but only when I let go of the mouse button. I really need it to refresh while it's down and polling if possible. Can this be done from a scenehook?
WP.
-
On 24/05/2013 at 02:06, xxxxxxxx wrote:
Hi WickedP,
DrawViews() should actually do it. What flags do you pass?
-Nik
-
On 24/05/2013 at 02:10, xxxxxxxx wrote:
Hi there Nik,
this was the last one I tried "DRAWFLAGS_FORCEFULLREDRAW".
Thanks for your quick response!
WP.
EDIT: that flag is the one that's in the latest build incidently too... no refresh until the mouse is let go.
-
On 24/05/2013 at 02:20, xxxxxxxx wrote:
Hm.. I usually use this combination of flags (see below) and it worked fine for me always.
Though, I've never implemented MouseInput() in a SceneHookPlugin. But it shouldn't differ much from
the way you would do it in a ToolData plugin. Maybe you want to try flags like this:DrawViews(DRAWFLAGS_ONLY_ACTIVE_VIEW | DRAWFLAGS_NO_THREAD | DRAWFLAGS_NO_REDUCTION | DRAWFLAGS_STATICBREAK);
My guess is that you must pass DRAWFLAGS_NO_THREAD if you want a synchronous redraw.
-Nik
-
On 24/05/2013 at 02:41, xxxxxxxx wrote:
Yeah - that seems to have done the trick. I'm a little surprised the full redraw didn't work on it's own. But it's all going now!
Thanks Nik,
WP.