Core/Gui: Render primitives on top of the scene in PickGeometry
+ added some better grouping for items, which are assigned per object right now. For example, if we exceed 10 items per object it gets an additional group. Co-authored-by: realthunder <realthunder@users.noreply.github.com>
This commit is contained in:
@@ -44,7 +44,9 @@
|
||||
#endif
|
||||
|
||||
#include <Gui/Selection/SoFCUnifiedSelection.h>
|
||||
#include <Gui/Inventor/So3DAnnotation.h>
|
||||
|
||||
#include "ViewProviderExt.h"
|
||||
#include "SoBrepPointSet.h"
|
||||
|
||||
|
||||
@@ -81,6 +83,18 @@ void SoBrepPointSet::GLRender(SoGLRenderAction *action)
|
||||
return;
|
||||
if(selContext2->checkGlobal(ctx))
|
||||
ctx = selContext2;
|
||||
|
||||
// for pickgeometry, add this node to delayed path if it is highlighted and render it on
|
||||
// top of everything else (highest priority)
|
||||
if (Gui::Selection().isPickGeometryActive() && ctx && ctx->isHighlighted()
|
||||
&& !ctx->isHighlightAll() && ctx->highlightIndex >= 0
|
||||
&& !Gui::SoDelayedAnnotationsElement::isProcessingDelayedPaths) {
|
||||
viewProvider->setFaceHighlightActive(true);
|
||||
Gui::SoDelayedAnnotationsElement::addDelayedPath(action->getState(),
|
||||
action->getCurPath()->copy(),
|
||||
300);
|
||||
return;
|
||||
}
|
||||
|
||||
if(ctx && ctx->highlightIndex == std::numeric_limits<int>::max()) {
|
||||
if(ctx->selectionIndex.empty() || ctx->isSelectAll()) {
|
||||
@@ -121,8 +135,15 @@ void SoBrepPointSet::GLRender(SoGLRenderAction *action)
|
||||
}
|
||||
if(ctx2 && !ctx2->selectionIndex.empty())
|
||||
renderSelection(action,ctx2,false);
|
||||
else
|
||||
else if (Gui::SoDelayedAnnotationsElement::isProcessingDelayedPaths) {
|
||||
glPushAttrib(GL_DEPTH_BUFFER_BIT);
|
||||
glDepthFunc(GL_ALWAYS);
|
||||
inherited::GLRender(action);
|
||||
glPopAttrib();
|
||||
}
|
||||
else {
|
||||
inherited::GLRender(action);
|
||||
}
|
||||
|
||||
// Workaround for #0000433
|
||||
//#if !defined(FC_OS_WIN32)
|
||||
|
||||
Reference in New Issue
Block a user