Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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

    object visibility [SOLVED]

    SDK Help
    0
    4
    418
    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.
    • H
      Helper
      last edited by

      On 11/04/2015 at 03:25, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   14-16 
      Platform:   Windows  ;   Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      Is there an easy way to determine if a object is visible in a BaseView?

      By that i don't mean if it is in the view frustum. I merely want to know if it can be seen according to various filter settings.

      I wrote a little SnapData plugin. And i don't want it to snap to invisible stuff.

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 13/04/2015 at 09:07, xxxxxxxx wrote:

        Hello,

        I'm afraid there is no very simple answer. To check if an object is covered by the viewport filters you can simply use CheckDisplayFilter(). To use this function you should use the BaseDraw handed over in the SnapStruct argument.

        But if an object is visible in the editor you must also check it's "Visible in Editor" parameter and the parameters of all parent objects.

        Best wishes,
        Sebastian

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          On 15/04/2015 at 02:13, xxxxxxxx wrote:

          Thanks. CheckDisplayFilter() looks useful. Does it include Layers, too? It appears not.

          I think an API function which combines all the visibility switches would be very nice to have.

          Cheers,
          Michael

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            On 15/04/2015 at 06:36, xxxxxxxx wrote:

            Hello,

            CheckDisplayFilter() only checks the filter settings. To check if a layer is applie one can use GetLayerData().

            Indeed, a API function to manage all this would be handy. We will try to improve the API.

            best wishes,
            Sebastian

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