I gave it more thought and I think I have solution. I can manually increase/decrease the usercount in a set function of the rna property. It sounds hacky for me and I'm still not even sure it will work (I haven't tried rna setfuncs for pointers).
I think a more elegant solution would be to use (fictional name) PROP_POINTER_LINK and have it handled internally. I don't know about the internals though. Regards, Dalai 2010/5/25 Dalai Felinto <[email protected]>: > Hello there, > quick question: Is there a way to have a PROP_POINTER property that > doesn't increase the id user count when "selected"? > > Explanation: > Some times (e.g. BGE Logic TouchSensor) we want to point to a > datablock but don't want to affect its user counting (i.e. stop this > block from being deleted). > > In 2.49 (maybe by design or by bug) we are not increasing user > counting for those in readfile.c (there we are using newlibadr instead > of newlibadr_us). This will give you different usercounting for a > datablock after you re-open it, what is strange. So I was wondering if > is there a way (or it's an acceptable design) to have a Rna Prop > linking to a datablock but without changing it id counting. > > Regards, > Dalai > _______________________________________________ Bf-committers mailing list [email protected] http://lists.blender.org/mailman/listinfo/bf-committers
