Viewport shading fails when a newly added primitive (from custom script) is modified in the redo panel #64362

Closed
opened 2019-05-09 08:47:53 +02:00 by Jesse Yurkovich · 6 comments

System Information
Operating system: Windows-10-10.0.18362 64 Bits
Graphics card: Quadro 600/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 369.09

Blender Version
Broken: version: 2.80 (sub 60), branch: master, commit date: 2019-05-08 20:08, hash: 733811330c
Worked: last known good hash: a8a11d3537

Short description of error
Upon initial creation of the primitive mesh everything is fine. However, once you tweak one of the properties on the redo panel, the newly added mesh loses all shading. It remains like this until you enter/exit Edit mode for the mesh in question.

Initial creation:
initial-good.png

After tweaking Redo panel:
bad.png

Exact steps for others to reproduce the error
shading_on_redo.blend

  • Load attached .blend
  • Click "Run Script" in the editor that's already open
  • In the 3D Viewport, Search for the newly added "Test: Test Add Primitive" operator and invoke it
  • A subdivided cube appears on screen (Good!)
  • Tweak one of the properties of this new object in its Redo panel
  • Observe how all shading is lost (Bad)
    • Enter/Exit Edit mode for the primitive and notice it returns to normal

Git bisect ended up blaming the following commit:
[733811330c] master: Workbench: Use common_view_lib and remove NormalMatrix usage

**System Information** Operating system: Windows-10-10.0.18362 64 Bits Graphics card: Quadro 600/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 369.09 **Blender Version** Broken: version: 2.80 (sub 60), branch: master, commit date: 2019-05-08 20:08, hash: `733811330c` Worked: last known good hash: `a8a11d3537` **Short description of error** Upon initial creation of the primitive mesh everything is fine. However, once you tweak one of the properties on the redo panel, the newly added mesh loses all shading. It remains like this until you enter/exit Edit mode for the mesh in question. Initial creation: ![initial-good.png](https://archive.blender.org/developer/F7019927/initial-good.png) After tweaking Redo panel: ![bad.png](https://archive.blender.org/developer/F7019929/bad.png) **Exact steps for others to reproduce the error** [shading_on_redo.blend](https://archive.blender.org/developer/F7019931/shading_on_redo.blend) - Load attached .blend - Click "Run Script" in the editor that's already open - In the 3D Viewport, Search for the newly added "Test: Test Add Primitive" operator and invoke it - A subdivided cube appears on screen (Good!) - Tweak one of the properties of this new object in its Redo panel - Observe how all shading is lost (Bad) - Enter/Exit Edit mode for the primitive and notice it returns to normal Git bisect ended up blaming the following commit: [733811330c9] master: Workbench: Use common_view_lib and remove NormalMatrix usage
Author
Member

Added subscriber: @deadpin

Added subscriber: @deadpin
Clément Foucault was assigned by Sebastian Parborg 2019-05-10 12:34:58 +02:00
Clément Foucault removed their assignment 2019-05-10 15:08:58 +02:00
Sergey Sharybin was assigned by Clément Foucault 2019-05-10 15:08:58 +02:00

Added subscriber: @fclem

Added subscriber: @fclem

This is because we now assume the inverse matrix is up to date when drawing.
I'm not sure how you do that in Python or if the depsgraph should handle this on its own.

This is because we now assume the inverse matrix is up to date when drawing. I'm not sure how you do that in Python or if the depsgraph should handle this on its own.
Author
Member

Good news: This appears to be fixed as of some checkin yesterday
Bad news: I didn't spot any obvious depsgraph change for this but there was the big eevee refactor... so I'm not sure if this was a happy accident that will regress again soon or if it's actually fixed :)

Good news: This appears to be fixed as of some checkin yesterday Bad news: I didn't spot any obvious depsgraph change for this but there was the big eevee refactor... so I'm not sure if this was a happy accident that will regress again soon or if it's actually fixed :)

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

This was fixed by be5fd9c. Makes total sense actually :)

Thanks for the report, closing it now.

This was fixed by be5fd9c. Makes total sense actually :) Thanks for the report, closing it now.
Sign in to join this conversation.
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
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#64362
No description provided.