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

    BaseDocument.GetBaseDrawCount() Always returns 40

    Scheduled Pinned Locked Moved Bugs
    3 Posts 0 Posters 1.2k 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 25/01/2018 at 16:17, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   19 
      Platform:      
      Language(s) :       PYTHON  ;

      ---------

        
      """Print BaseDrawCount   
      prints the document's BaseDrawCount()"""   
        
      import c4d   
      from c4d import gui   
        
      def main() :   
          if not doc:   
              return   
             
          bd_count = doc.GetBaseDrawCount()   
          print bd_count   
        
      if __name__=='__main__':   
          main()   
      

      No matter how many ViewPanels I have open, or how they're split, I always get 40.

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

        On 26/01/2018 at 04:20, xxxxxxxx wrote:

        Hi Donovan,

        can you please verify, it's actually returning 40?
        I tested here and it seems to work, although I have to admit it may not be immediately obvious.

        Here by default BaseDrawCount() returns 4, even if there's only for example perspective view visible in the view panel. But you can switch to the four split views. And all BaseDraws needed for these do exist. For example they will store the zoom state and position each split view, so it can be restored after switching to single view and back to split.

        Now, when you create an View Panel from the Window menu, then BaseDrawCount() will return 8. For the same reason as above, you can again split this view panel in four views.

        And BaseDrawCount() will continue to return 8, even if this new View Panel gets closed. Again, for the same reason, after re-opening it, it will still show the same views as before closing.

        So, the behavior might seem a bit strange, but it's not a bug, assuming yours is not really returning 40 all the time...

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

          On 12/02/2018 at 23:08, xxxxxxxx wrote:

          Hey Andreas,

          Thanks for clarifying. I think the issue is that I had opened up 10 different view panels at one point and then closed them. It seems (as you describe) C4D keeps a memory of any view panel that has been opened.

          With that in mind, do you know of any way of figuring out which view panels are currently open/visible to the user?
          Thanks!

          Donovan

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