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

    Crush using WorldBaseContainer and MessageDialog

    Scheduled Pinned Locked Moved Bugs
    2 Posts 0 Posters 643 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 30/07/2017 at 02:28, xxxxxxxx wrote:

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

      ---------
      Hi guys!
      There is a strange bug that i foung after updating Cinema4D to R18.057.

      import c4d
      from c4d import gui
        
      PLUGINID = 1234588880
        
      def main() :
        
          wbc = c4d.GetWorldContainer()
          if not wbc[PLUGINID]:
              bc = c4d.BaseContainer()
              #bc[1] = None # uncomment this string to fix bug
              wbc[PLUGINID] = bc
        
          bc = wbc[PLUGINID]
          gui.MessageDialog('Some text') # comment this string to fix bug 
        
          print bc[1]
          print 'All ok!' 
          return
        
      if __name__=='__main__':
          main()
      
      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 31/07/2017 at 03:13, xxxxxxxx wrote:

        Hi,

        This is a known issue in R18.057 when getting containers with the [] operator. It will be fixed in a future version.
        In the meanwhile, the workaround is to use GetContainer()/GetContainerInstance().

        Sorry for the inconvenience.

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