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

    TagPlugin bc refresh when reloadPlugin

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 476 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 22/04/2017 at 07:24, xxxxxxxx wrote:

      I have made a tag for storing purpose like that I can retrieve data to his. Everything is working fine. I store my data into the bc of this tag. So I don't have to care about Write/Read and in CopyTo I just made a reset of the bc like that I get a fresh new one.

      But Reload python plugin seem to reset the BaseContainer of my TagPlugin. Is there any workaround for this? 🙂

      Thanks in advance

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

        On 24/04/2017 at 02:17, xxxxxxxx wrote:

        Hi,

        starting with an empty BaseContainer in CopyTo() sounds a bit strange to me. Can you explain the reason for doing this? I mean, CopyTo() is for example involved in most rendering situations, so I'd expect your tag to fail there as well. And this is most likely also the reason for the issue with reload Python plugins.

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

          On 24/04/2017 at 02:40, xxxxxxxx wrote:

          Thanks Andreas for let me know. So I have to rethink my infrastructure or at least to deal with it.

          My goal is to have an unique ID for each type of objects. (basicly my uniqueID are 1,2,3,4,5,6,7 and it's used for sort my object independently of the Object Manager) 
          In my CommandPlugin(who lunch a GeDialog) I list all thoses type of objects. Then I grab the tag. I sort them according to the unique ID. if there is no tag I create one, I append of my already get uniqueID (like that the new one are listed after in my list)

          Then basicly my tag is just for storing ListIndex.
          I reset it on CopyTo because I don't want to have two time the same index because it will be impossible for me to know which one is the original. So it's why I reset it. Since I reset his bc my Dialog can see his bc is empty so this one is newlly created.

          Hope it make more sense.
          I chosse tag because it must be hidden to the user. It must be document AND object dependant (if doc change or obj change than data must be reset).

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