Operating system: Windows-10-10.0.18362 64 Bits
Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 431.60
Broken: version: 2.80 (sub 75), branch: master, commit date: 2019-07-29 14:47, hash: rBf6cb5f54494e
Short description of error
I'm writing a rigging addon for Blender that uses curve objects to do things like smooth, relax, etc. The operators in my addon work fine until they get to this line: dataCrv = bpy.data.curves.new(name, 'CURVE'). If an operator runs this line, however, this weird bug occurs:
(this is from the devtalk page I opened asking for help)
When I change armature layers and then use the operators defined in my addon, and then use the Adjust Last Operation panel, the armature layers are changed back to whatever they were before I used my operators.The change in layers only occurs if I use a float or int bpy_prop and drag my mouse on the Adjust Last Operations panel. Also, the “restore point” is re-set when I do certain operations, like switching modes or moving a bone with the g key and confirming (it doesn’t work if I don’t move the bone).
Exact steps for others to reproduce the error
First, open the attached .blend file and install the bug_operator addon. Then. change bone layers to any other layer, select a bone and run the addon by pressing F3 and searching for the "dummy" operator. Now, move the bar labeled Change Me back and forth. The visible bone layers will change and (if the operator did anything in the first place) the operator will cease to be functional.
I think the operators in my addon cease to be functional because they rely on bpy.context to tell them which bones are selected. If they are selected in a hidden layer, bpy.context.active_bone doesn't return anything useful. So the operator actually still is functioning, it's just not doing anything because it doesn't get any input