Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Which DisplayFilter affects ToolData.draw

    Cinema 4D SDK
    2023 2024 s26 python
    2
    3
    485
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • gheyretG
      gheyret
      last edited by ferdinand

      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 of BaseDraw.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?

      www.boghma.com

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand @gheyret
        last edited by

        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.

        1. 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).
        2. 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,
        Ferdinand

        Getting and setting the Geometry Only option:

        MAXON SDK Specialist
        developers.maxon.net

        gheyretG 1 Reply Last reply Reply Quote 0
        • gheyretG
          gheyret @ferdinand
          last edited by

          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

          www.boghma.com

          1 Reply Last reply Reply Quote 0
          • First post
            Last post