Merge pull request #26703 from tetektoza/fix/25840_draw_parts_of_constraints_ontop_of_others
Gui: Render constraint text, arrowheads and constraint icons above geometry lines
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include <Inventor/SbVec3f.h>
|
||||
#include <Inventor/SoPickedPoint.h>
|
||||
#include <Inventor/nodes/SoAnnotation.h>
|
||||
#include <Inventor/nodes/SoDepthBuffer.h>
|
||||
#include <Inventor/nodes/SoDrawStyle.h>
|
||||
#include <Inventor/nodes/SoGroup.h>
|
||||
#include <Inventor/nodes/SoImage.h>
|
||||
@@ -2985,10 +2986,21 @@ void EditModeConstraintCoinManager::createEditModeInventorNodes()
|
||||
editModeScenegraphNodes.EditRoot->addChild(editModeScenegraphNodes.constrGrpSelect);
|
||||
setConstraintSelectability(); // Ensure default value;
|
||||
|
||||
// disable depth testing for constraint icons so they render ON TOP of geometry lines
|
||||
// check issues #25840 and #11603
|
||||
SoDepthBuffer* constrDepthOff = new SoDepthBuffer();
|
||||
constrDepthOff->test.setValue(false);
|
||||
editModeScenegraphNodes.EditRoot->addChild(constrDepthOff);
|
||||
|
||||
editModeScenegraphNodes.constrGroup = new SmSwitchboard();
|
||||
editModeScenegraphNodes.constrGroup->setName("ConstraintGroup");
|
||||
editModeScenegraphNodes.EditRoot->addChild(editModeScenegraphNodes.constrGroup);
|
||||
|
||||
// re-enable depth testing for the rest of the nodes
|
||||
SoDepthBuffer* constrDepthOn = new SoDepthBuffer();
|
||||
constrDepthOn->test.setValue(true);
|
||||
editModeScenegraphNodes.EditRoot->addChild(constrDepthOn);
|
||||
|
||||
SoPickStyle* ps = new SoPickStyle(); // used to following nodes aren't impacted
|
||||
ps->style.setValue(SoPickStyle::SHAPE);
|
||||
editModeScenegraphNodes.EditRoot->addChild(ps);
|
||||
|
||||
Reference in New Issue
Block a user