Which DisplayFilter affects ToolData.draw
-
Hi everyone!
I draw some element's like circle, hanle... with ToolData.draw(BaseDraw), and if I check "Geometry only" option in Viewport display filter, the elements will be hidden. but I try to menully close other options in the Viewport filter menu one by one, and my element's always display in viewport, this means that these options do not affect the element's display, even if i close all of them.
Only the Geometry only option makes the element's hidden in the viewport.I want to my element's always display in the viewport, so I try to
BaseDraw.GetDisplayFilter()
to get Geometry only filter, but whether or not the Geometry only option is turned on, the result ofBaseDraw.GetDisplayFilter()
is same to default of display filter (result: -629215265)Is there have any other way to get Geometry only state?
Or how do I keep element's in the viewport without being affected by the Geometry only option? -
Hello @gheyret,
Thank you for reaching out to us. Your posting is a bit contradictory for me as you ask for one thing in the title and another in the posting.
- Getting and setting the 'Geometry Only' option of a viewport: This attribute does not count towards the viewport filters, as implied by the name
BASEDRAW_DATA_ONLY_GEOMETRY
. You must read and write the attribute state directly from the viewport (which you can also do with the flags). - Which display filters affect ToolData.Draw: As you indirectly state yourself, you got things a bit backwards here. One is usually reacting to viewport flags in drawing methods and not the other way around. When you want things to be hidden, it is up to you to read the flags of the passed viewport and then not draw things.
Cheers,
FerdinandGetting and setting the Geometry Only option:
- Getting and setting the 'Geometry Only' option of a viewport: This attribute does not count towards the viewport filters, as implied by the name
-
Hi @ferdinand ,
I'm sorry that my title and description may be a little confused, maybe I misunderstood something and thought a little complicated.
And thank you very much for your answer, you always help me when my thinking is confused.Cheers!
Gheyret