viewport drawing with gpu module #81334
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
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#81334
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: Darwin-17.7.0-x86_64-i386-64bit 64 Bits
Blender Version
Broken: version: 2.91.0 Alpha, branch: master, commit date: 2020-09-29 22:41, hash:
e5aa9decb2
Worked: 2.90.1, 2.83.6
Started with
216d78687d
Short description of error
viewport drawing with gpu module, when scene is changed (something is deleted), object matrix is not correct until scene update, see video
Exact steps for others to reproduce the error
add an mesh (important, on empty it does not happen) object, run code, add another object, delete it, now matrix sent to shader is not correct (looks inverted?) until you for example select first object, if matrix is printed it is still the same, so i suspect something is happening on gpu
demo.mov
Added subscriber: @JakubUhlik
#82843 was marked as duplicate of this issue
Added subscribers: @Jeroen-Bakker, @dfelinto
Changed status from 'Needs Triage' to: 'Confirmed'
@Jeroen-Bakker did anything change in 2.91 viewport that could have introduced that?
Added subscriber: @lichtwerk
I'll bet on
536c2e0ec9
, will bisect.Well, it started with
216d78687d
, then crashed for a couple of days, then no crash anymore somewhere arounde4932d1167
(but bad as reported here)Probably related: blender/blender-addons#80730 (BGL deprecation)
Added subscriber: @fclem
CC @fclem
I can't reproduce. Does that needs release builds? I don't understand how that would come from the refactor. Does that happens if you also deselect all object (alt+A)?
Happens in Debug builds as well. It also happens on deselection.
Now that I actually read the provided code, I am not sure if this is a bug anymore.
Upon deletion, there is no active object anymore, so accessing its matrix will fail
216d78687d
it looks like the uniform doesnt change at all when active object changes216d78687d
I am actually getting an error (havent noticed before) : "StructRNA of type Object has been removed" [which seems correct]@JakubUhlik : is the intention to stick this on the active object [and also change when active object changes]?
Then this line should move into the draw_handler function (with some fallback if no active object exists)?
If should just stick to the object that was active at the time of script execution (no change on change of active object), I guess you should get the matrix (or a copy) outside the draw handler function?
Changed status from 'Confirmed' to: 'Needs Developer To Reproduce'
So might not be a bug here in the end, there has been a change in behavior in
216d78687d
, but @fclem would have to comment again.intention is, to draw something like it is part of an object, that is why i need its matrix for every draw i need to reflect its changes. if you swap
active_object
to something more defined, likeo = bpy.data.objects['Plane']
problem is still therefor a side note, sorry if the example is a bit crude, but this worked for me from 2.80 until now, i wanted to isolate problem with least code amount possible while it being portable enough
https://github.com/uhlik/bpy#point-cloud-visualizer-for-blender-280
https://www.blendermarket.com/products/pcv
i played with it a bit more, there is no need to delete object (that is only i discovered there is something wrong)
selecting none, i.e. selecting background is all it needs.
also if code is run and no object is selected, i draw ok until view is moved, then it is wrong until any (!) object is selected
also checked win10, behaves the same
also prints from draw function are as they should, in this case
b.mov
Added subscriber: @ideasman42
@JakubUhlik I was looking into another bug caused by
216d78687d
and thought it might be related.Could you check if this bug is still happening?
I can't redo the error with
e5aa9decb23f
or latest master (862aa2a66bba922fbc4a24cc8a43a16e290e64cf
)Could you list exact steps to redo the error? (while it may seem obvious, since I can't redo it - there may be some step I'm missing).
Changed status from 'Needs Developer To Reproduce' to: 'Needs User Info'
@ideasman42 yes, it is still happening in
version: 2.92.0 Beta, branch: master, commit date: 2021-01-18 17:08, hash:
b5c3f26cba
, type: Releaseversion: 2.93.0 Alpha, branch: master, commit date: 2021-01-19 22:43, hash:
6290091bac
, type: Releaseand
bgl.glDepthFunc(bgl.GL_LEQUAL)
fixes that behaviorah, steps, add a Plane, run script, click outside to deselect Plane, drawn dots will be flipped
version: 2.93.0 Alpha, branch: master, commit date: 2021-01-27 22:47, hash:
df135b74fc
, type: Release - broken as wellone more thing, if there is an empty in scene, it works as it should, if there is only mesh objects it flips on deselect
Still cant redo:
39cfc95c2cc3829d6dbc5e1f6fdda3a0e053ed4d
[AMD/ATI] Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT]
you have to have with empty scene, no camera, no anything drawn with lines, like this
a.mp4
this is related i think https://developer.blender.org/T82843
This issue was referenced by
8948f73784
Changed status from 'Needs User Info' to: 'Resolved'
Added subscribers: @MACHIN3, @mano-wii, @Pinnhead