Curve with bevel radius appears black after using Redo Panel (undo issue). #85807
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#85807
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
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
Blender Version
Broken: version: 2.91.2, branch: master, commit date: 2021-01-19 16:15, hash:
5be9ef4177
(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
Result: one of the curves turns black in the viewport.
Known Fixes:
black_curve_script.txt
Added subscriber: @ArmoredWolf
Added subscriber: @mano-wii
Changed status from 'Needs Triage' to: 'Confirmed'
In my case the curve turns flat gray:
The python code is simple and I haven't found anything that explains that behavior.
I'm not sure if the problem is really in the Undo system, but I'm confirming and tagging the #core project for now.
Added subscribers: @fclem, @Sergey, @Jeroen-Bakker, @dr.sybren, @mont29
Think this is an update flag issue... But am still trying to figure out what exactly is going on here, this is fairly weird. Could also be a missing bit in depsgraph update?
Basically, the first curve object (the one turning black) gets
ID_RECALC_GEOMETRY | ID_RECALC_SHADING | ID_RECALC_COPY_ON_WRITE
recalc
flags in DEG eval just after the undo, and shading is not updated. If we addID_RECALC_TRANSFORM
to it, shading does get updated and there is no more black object.Not sure what exactly is the issue here, to me it makes little sense that you'd have to use
TRANSFORM
update flag to get shading updated? Would like to get @Jeroen-Bakker and @fclem input here, and maybe also @Sergey or @dr.sybren for the depsgraph side of things, before diving deeper in the problem.Note that
BKE_object_add_only_object
(which is called from RNA object creation) does not set anyrecalc
flag, while higher-level functions likeBKE_object_add_for_data
(which gets called from Editor code, including operators, when creating a new object) does flag new object withID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION
...From what I can tell,
rna_Main_objects_new
is not doing anyrecalc
tagging at all actually? Looks suspicious...Can confirm that adding a
DEG_id_tag_update_ex(bmain, &ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
torna_Main_objects_new
also fixes the issue, think all those RNAnew
ID functions should do somerecalc
tagging in fact?New objects in depsgraph are supposed to be fully evaluated. As in, in theory, you don't need to tag individual flags after adding new object to depsgraph, depsgraph will decide it for you.
One possible thing thought, is that depsgraph doesn't really handle shading itself: shading is done by the draw manager.
So as a quick fix for annoying issue doing tags is acceptable (although, a bit weird and maybe need
ID_RECALC_SHADING
in this case?). But it feels that the issue might be a bit deeper in the way how the draw manager is listening to changes and reacts to them.But it depends on whether it is draw manager is not doing something, or whether there is no data ready for the draw manager. This is not very clear from the explanations here.