Being that I have Blender 2.64, I do not have some of the new features that Blender has to offer. In such, I wanted to develop a script that allows the user to transfer selected bone weights with the masking of vertex selection and a given a vertex group to be transferred onto.
However, I have been having some troubles with my script, where I need the properties to reset to their defaults when a user selects a new object. my biggest problem is how to workaround the illegal to change properties in draw state. So far, I was able to accomplish toggling the display of the Panel on and off by using certain criterias. My script is so screwed up there is really nothing good to post here except to give you a general idea. Basically, the first time running the script, it waits until a user selects a mesh object that has an armature attached to it and the context mode must be in ‘PAINT_WEIGHT’ mode. When this all falls true an EnumProperty of choice, listing the available vertex groups, and an Initialize button is posted in the panel. By clicking on Initialize, this initially sets the properties needed for the script. However, if you deselect->select new object, the old properites displays in the panel instead of going back to the initialize state. I want the Panel to display the default start-up state, so that the old data can be cleared and replaced with the new data. I have searched here and Google, and found very little except the possibillity of using handlers or callbacks, but I have never got into this type of programming with C/C++ or Blender Python. Furthermore, looking at the 2.64 docs, I do not see a handler that handles object selection state changes in the bpy.app.handler page. Is there a way I can get around this delima?