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

    Change filter of the one view

    Scheduled Pinned Locked Moved PYTHON Development
    5 Posts 0 Posters 984 Views
    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 Offline
      Helper
      last edited by

      On 13/03/2018 at 07:25, xxxxxxxx wrote:

      Hi,

      I'm trying to change a grid filter that only the perspective view.

      I was predictable, my code doesn't work.
      The following code changes grid filter for all viewport.

          bd = doc.GetActiveBaseDraw()
          drawFilter = bd.GetDisplayFilter()
          cam = bd.GetEditorCamera()
          projection = cam.GetProjection()
          
          if projection == c4d.Pperspective:
              if drawFilter & c4d.DISPLAYFILTER_GRID:
                  bd[c4d.BASEDRAW_DISPLAYFILTER_GRID] = False
              else:
                  bd[c4d.BASEDRAW_DISPLAYFILTER_GRID] = True
          
          bd.Message(c4d.MSG_CHANGE)
          c4d.EventAdd()
      

      Could I change grid filter for one of a view or only perspective view?
      If it possible, where can I get this information in the SDK?

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

        On 14/03/2018 at 06:04, xxxxxxxx wrote:

        Hi,

        I'm afraid you've hit a limitation. It's not possible to change the filter for only one view.
        The display filter is synchronized for all views and the API doesn't allow to circumvent this limitation.

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

          On 14/03/2018 at 06:37, xxxxxxxx wrote:

          Hi Yannick,

          Thank you tell me this information👍

          Cheers,
          Makoto

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

            On 14/03/2018 at 09:57, xxxxxxxx wrote:

            In fact it's possible to change the filter for a specific view via the UI with the following steps:
            Options->Configure->Filter->Right-click on a parameter->Make Parameter Local

            Unfortunately there's no way to do this with the API.

            See the Cinema 4D documentation here.

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

              On 16/03/2018 at 04:43, xxxxxxxx wrote:

              Hi Yannick,

              Thanks to you I was able to make small scripts.
              Thank you!!

              Cheers🍺
              Makoto

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