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
On 24/04/2017 at 02:17, xxxxxxxx wrote:
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.
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).