Crush using WorldBaseContainer and MessageDialog



  • 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()
    


  • 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.


Log in to reply