Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 1080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 461.40
Broken: version: 2.91.2, branch: master, commit date: 2021-01-19 16:15, hash: rB5be9ef417703
(also broken in 2.83, 2.90 and unreleased 2.92)
Worked: 2.82 (pre-undo improvements I believe)
Short description of error
Curve with bevel radius turns black if modifying the property through an operator's redo panel (posibly related to Undo algorithm).
Exact steps for others to reproduce the error
- Run the attached script from Blender's Text Editor.
- Make sure Undo Legacy is OFF.
- From the search menu run the "black curve test" operator TWICE (this will create two curves).
- Expand the redo panel(F9) and tweak the bevel radius.
Result: one of the curves turns black in the viewport.
- Enabling Undo Legacy in the Preferences fixes and prevents the issue from happening.
- Adding bpy.ops.ed.undo_push() in the script's Invoke method.
- Toggling IN and OUT of Edit Mode.
- Using bpy.ops to create the bezier curve instead of the manual approach seen in the attatched script.
- Run the operator once, then click on the viewport to select the curve before running the operator the second time. Not fully tested but having some extra step in between operator runs seems to prevent this bug.