Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/12/2010 at 12:51, xxxxxxxx wrote:
User Information: Cinema 4D Version: 11 Platform: Windows ; Language(s) : C++ ;
--------- Hi all! I'm implementing an interactive modeling tool (ToolData), that operates on polygon objects and adds new geometry to the object. (Like, e.g., the extrude tool)
I'm having some problems with getting the object to update in the viewport. To update the viewport, i call "DrawViews" each time the user interacts with the object (drags the mouse). Most of the time it works just fine, but sometimes it seems a little buggy.
In general, what flags/messages must i use to make sure my scene is properly updated in the viewport after modifying a polygon object?
Best regards /Filip
On 08/12/2010 at 15:26, xxxxxxxx wrote:
win->MouseDragStart(KEY_MLEFT,mouseX,mouseY,MOUSEDRAGFLAGS_DONTHIDEMOUSE|MOUSEDRAGFLAGS_NOMOVE); while (win->MouseDrag(&dx,&dy,&device) == MOUSEDRAGRESULT_CONTINUE) { // No movement if (dx == 0.0 && dy == 0.0) continue; // Do your stuff ... // doc->AddUndo(UNDOTYPE_CHANGE_NOCHILDREN, op); // For asynchronous AM update while in Mouse loop GeSyncMessage(EVMSG_ASYNCEDITORMOVE); // Update display to show drag results DrawViews(DRAWFLAGS_ONLY_ACTIVE_VIEW|DRAWFLAGS_NO_THREAD|DRAWFLAGS_NO_ANIMATION); } if (win->MouseDragEnd() == MOUSEDRAGRESULT_ESCAPE) doc->DoUndo();
Careful, I'm using R12 enumeration flags here.
On 09/12/2010 at 00:21, xxxxxxxx wrote:
Yup, that's pretty much exactly what my code looks like. Seems like i've got to look for my bug elsewhere then.
Thanks a lot for the help!
/Filip