When attempting to update switch/DOF lists by clearing them from the scene variables and adding a new switch, it appears that any switch in the scene with a number greater than the highest edited switch in the xml gains an incorrect value. This means any saved Blender file that has a switch list stored in scene that does not match the current user's plugin install will break the switch references in the Blender file. If the switch.xml (and DOF/callback XMLs probably) are updated, many switches will have to be individually reassigned.
Switch empties appear to have no underlying reference to an appropriate switch number and bit mask integer. They appear to be saved by their name or an index in the switch.xml file. (And probably same for DOFs.) This is not a good system. The MAX plugin appears to save switch data as a switch number and bit integer, so that even if a user does not have an up-to-date switch list, they can manually assign a switch number and bit rather than solely selecting by name.
To Reproduce
Steps to reproduce the behavior:
- Load a blender file with switches of varying number
- Edit switch.xml (as if updating) and ensure the edited/added switch.xml block is on a smaller line number than at least one of the switches in the model.
- Clear the switch list scene variable from the blender file. (del bpy.context.scene['switch_list'])
- Save and reload the scene
- Check the switches in scene and note that any switch in scene that corresponds to a position in switch.xml below the user edit will no longer have the correct number/bit
Expected behavior
Ther user requires:
- A means to set a switch number and bit independent of the UI switch name list
- A means to see the number and bit value of the selected switch empty, rather than just the xml tag
- Switch number/bit mask integer saved in scene such that updates to switch.xml in scene variables does not reassign switches inaccurately.
Additionally, if switch list is to be stored in scene, user requires:
- A means to clear and update the switch list
When attempting to update switch/DOF lists by clearing them from the scene variables and adding a new switch, it appears that any switch in the scene with a number greater than the highest edited switch in the xml gains an incorrect value. This means any saved Blender file that has a switch list stored in scene that does not match the current user's plugin install will break the switch references in the Blender file. If the switch.xml (and DOF/callback XMLs probably) are updated, many switches will have to be individually reassigned.
Switch empties appear to have no underlying reference to an appropriate switch number and bit mask integer. They appear to be saved by their name or an index in the switch.xml file. (And probably same for DOFs.) This is not a good system. The MAX plugin appears to save switch data as a switch number and bit integer, so that even if a user does not have an up-to-date switch list, they can manually assign a switch number and bit rather than solely selecting by name.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Ther user requires:
Additionally, if switch list is to be stored in scene, user requires: