Viewport 3d is not updated with VSE driver #70900

Open
opened 2019-10-17 16:01:19 +02:00 by Dante Leoncini · 22 comments

Blender Version
Broken: 2.82 (unknown which revision, custom build without buildinfo)
Worked: (unknown)

system-info.txt

Short description of error
Viewport is not updated for a material that is driven by a VSE driver.

Exact steps for others to reproduce the error
ejemplo.zip

Changing the VSE strip opacity doesn't update the viewport.

More info from user

I am creating an addon to transform eevee into a VSE. I encountered several problems, and one is that by changing the values ​​"chanel", "opacity" or moving the strip (it should disappear). the changes are not visible until the 3d view is moved. Just there it is updated. This makes it uncomfortable to work with the addon. The only change that works well is when changing the resolution X of the render, when playing the video or scrolling through the timeline, everything looks correctly.
Everything is being controlled by drivers.

**Blender Version** Broken: 2.82 (unknown which revision, custom build without buildinfo) Worked: (unknown) [system-info.txt](https://archive.blender.org/developer/F7829903/system-info.txt) **Short description of error** Viewport is not updated for a material that is driven by a VSE driver. **Exact steps for others to reproduce the error** [ejemplo.zip](https://archive.blender.org/developer/F7829898/ejemplo.zip) Changing the VSE strip opacity doesn't update the viewport. **More info from user** I am creating an addon to transform eevee into a VSE. I encountered several problems, and one is that by changing the values ​​"chanel", "opacity" or moving the strip (it should disappear). the changes are not visible until the 3d view is moved. Just there it is updated. This makes it uncomfortable to work with the addon. The only change that works well is when changing the resolution X of the render, when playing the video or scrolling through the timeline, everything looks correctly. Everything is being controlled by drivers.
Author

Added subscriber: @DanteLeoncini

Added subscriber: @DanteLeoncini

Added subscriber: @iss

Added subscriber: @iss

I can confirm change of opacity not working.

But I would need exact step to reproduce issue you have with drivers. I can play around, but exact steps may help me find issue more quickly.

I can confirm change of opacity not working. But I would need exact step to reproduce issue you have with drivers. I can play around, but exact steps may help me find issue more quickly.
Member

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker
Member

Lowering to low as this is an edge case.

Lowering to low as this is an edge case.
Member

Changed status from 'Confirmed' to: 'Needs User Info'

Changed status from 'Confirmed' to: 'Needs User Info'
Author

you have to create a plane with a material.
The material has a "mix shader" that controls the opacity. The factor is controlled with a driver: https://i.ibb.co/YTMBtn0/Captura-de-pantalla-de-2020-01-03-13-37-04.png
the driver has the corresponding strip value. in this case, the opacity of the strip in the VSE

Material:

  Path: sequence_editor.sequences_all["ejemplo.png"].blend_alpha
  https://i.ibb.co/DRDkkVm/Captura-de-pantalla-de-2020-01-03-13-44-40.png

but opacity is not the only thing that doesn't work well. to movel the strip chanel. we would have to move the plane in the 3d view and it doesn't happen until we move in the timeline.
That is also controlled by a driver. in this case the position of the plane according to the strip channel

and what works halfway. It is the visibility of the plane. according to whether the Strip is visible in the VSE. by moving through the timeline or playing the animation. everything works correctly. but if we move the Strip out of sight. the plane remains visible until we move in the timeline. The driver is a bit more complex than the previous ones: https://i.ibb.co/7KHXFxZ/Captura-de-pantalla-de-2020-01-03-13-54-49.png

I guess the 3 problems are the same. but I do not know

you have to create a plane with a material. The material has a "mix shader" that controls the opacity. The factor is controlled with a driver: https://i.ibb.co/YTMBtn0/Captura-de-pantalla-de-2020-01-03-13-37-04.png the driver has the corresponding strip value. in this case, the opacity of the strip in the VSE Material: ``` Path: sequence_editor.sequences_all["ejemplo.png"].blend_alpha https://i.ibb.co/DRDkkVm/Captura-de-pantalla-de-2020-01-03-13-44-40.png ``` but opacity is not the only thing that doesn't work well. to movel the strip chanel. we would have to move the plane in the 3d view and it doesn't happen until we move in the timeline. That is also controlled by a driver. in this case the position of the plane according to the strip channel and what works halfway. It is the visibility of the plane. according to whether the Strip is visible in the VSE. by moving through the timeline or playing the animation. everything works correctly. but if we move the Strip out of sight. the plane remains visible until we move in the timeline. The driver is a bit more complex than the previous ones: https://i.ibb.co/7KHXFxZ/Captura-de-pantalla-de-2020-01-03-13-54-49.png I guess the 3 problems are the same. but I do not know

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'
Member

Changed status from 'Confirmed' to: 'Needs Developer To Reproduce'

Changed status from 'Confirmed' to: 'Needs Developer To Reproduce'
Member

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren
Member

I would like to let the animation team do this triaging as this is an edge case and I am not aware of what is be supported and what not. @dr.sybren can you have a look at this report.

I would like to let the animation team do this triaging as this is an edge case and I am not aware of what is be supported and what not. @dr.sybren can you have a look at this report.

Changed status from 'Needs Developer To Reproduce' to: 'Archived'

Changed status from 'Needs Developer To Reproduce' to: 'Archived'
Sybren A. Stüvel self-assigned this 2020-01-16 10:51:55 +01:00

This report does not contain all the requested information, which is required for us to investigate the issue. At least include the Blender version in which you observed the bug, and make sure you test with the latest daily build from https://builder.blender.org/download/.

Please submit a new report and carefully follow the instructions. Be sure to provide system information, Blender version, the last Blender version which worked, and a .blend file with exact steps to reproduce the problem.

A guideline for making a good bug report can be found at https://wiki.blender.org/wiki/Process/Bug_Reports

This report does not contain all the requested information, which is required for us to investigate the issue. At least include the Blender version in which you observed the bug, and make sure you test with the latest daily build from https://builder.blender.org/download/. Please submit a new report and carefully follow the instructions. Be sure to provide system information, Blender version, the last Blender version which worked, and a .blend file with exact steps to reproduce the problem. A guideline for making a good bug report can be found at https://wiki.blender.org/wiki/Process/Bug_Reports

Added subscriber: @dfelinto

Added subscriber: @dfelinto

Changed status from 'Archived' to: 'Confirmed'

Changed status from 'Archived' to: 'Confirmed'

Just as an example of something that does work, this is an eevee material driven by a scene custom property:

eevee_material_drive.blend

What doesn't work, as reported here, is to use sequence_editor.sequences_all["image.png"].blend_alphato drive a shader property is not working (it updates the UI but not the material).
If this is indeed not supported the documentation should mention that not all properties are supported and the reason for that:

https://docs.blender.org/manual/en/latest/animation/drivers/drivers_panel.html#driver-variables

(marking as confirmed then, to either have the docs fixed or classified as bug or known issue)

Just as an example of something that does work, this is an eevee material driven by a scene custom property: [eevee_material_drive.blend](https://archive.blender.org/developer/F8281312/eevee_material_drive.blend) What doesn't work, as reported here, is to use `sequence_editor.sequences_all["image.png"].blend_alpha`to drive a shader property is not working (it updates the UI but not the material). If this is indeed not supported the documentation should mention that not all properties are supported and the reason for that: https://docs.blender.org/manual/en/latest/animation/drivers/drivers_panel.html#driver-variables (marking as confirmed then, to either have the docs fixed or classified as bug or known issue)
Dalai Felinto changed title from viewport 3d is not updated with VSE driver to Viewport 3d is not updated with VSE driver 2020-01-16 11:02:04 +01:00
Sybren A. Stüvel was unassigned by Dalai Felinto 2020-01-16 11:02:04 +01:00
Author

I did not understand. Do you want me to report it again or for more information? I made a video that shows the problem and how to reproduce it. Video

the problem occurs in blender 2.8 and 2.82.6 over ubuntu 18.04lts. I had already attached a file with the blender version and system information. I add an updated one system-info.txt

I did not understand. Do you want me to report it again or for more information? I made a video that shows the problem and how to reproduce it. [Video ](https://youtu.be/LEqTXoHL-j8) the problem occurs in blender 2.8 and 2.82.6 over ubuntu 18.04lts. I had already attached a file with the blender version and system information. I add an updated one [system-info.txt](https://archive.blender.org/developer/F8281919/system-info.txt)

I made a video that shows the problem and how to reproduce it.

Please write the steps to reproduce this issue. This is much faster for developers to read, and also allows the search engine to recognise keywords and let others find the issue based on those keywords. Although a video can clarify some things, having a step-by-step description generally is faster to understand.

I had already attached a file with the blender version and system information.

That file didn't contain the build hash, so it could have been any self-built version. Daily builds from the buildbot do include this hash.

the problem occurs in blender 2.8

"Blender 2.8" was more of a term for the development project, it's not a concrete version. Do you mean the 2.80 release?

> I made a video that shows the problem and how to reproduce it. Please write the steps to reproduce this issue. This is much faster for developers to read, and also allows the search engine to recognise keywords and let others find the issue based on those keywords. Although a video can clarify some things, having a step-by-step description generally is faster to understand. > I had already attached a file with the blender version and system information. That file didn't contain the build hash, so it could have been any self-built version. Daily builds from the buildbot do include this hash. > the problem occurs in blender 2.8 "Blender 2.8" was more of a term for the development project, it's not a concrete version. Do you mean the 2.80 release?

In #70900#850652, @dfelinto wrote:
What doesn't work, as reported here, is to use sequence_editor.sequences_all["image.png"].blend_alphato drive a shader property is not working (it updates the UI but not the material).

This works, I don't think it's the proper solution as no code in blendkernel calls WM_main_add_notifier().

diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 54432c8da74..0a541aa9c08 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -1615,8 +1615,12 @@ void paste_matcopybuf(Main *bmain, Material *ma)
   }
 }
 
+#include "../../windowmanager/WM_api.h"
+#include "../../windowmanager/WM_types.h"
+
 void BKE_material_eval(struct Depsgraph *depsgraph, Material *material)
 {
   DEG_debug_print_eval(depsgraph, __func__, material->id.name, material);
   GPU_material_free(&material->gpumaterial);
+  WM_main_add_notifier(NC_MATERIAL | ND_SHADING, material);
 }

This issue might be related to #72143, but that one isn't fixed with the above hack.

> In #70900#850652, @dfelinto wrote: > What doesn't work, as reported here, is to use `sequence_editor.sequences_all["image.png"].blend_alpha`to drive a shader property is not working (it updates the UI but not the material). This works, I don't think it's the proper solution as no code in `blendkernel` calls `WM_main_add_notifier()`. ``` diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index 54432c8da74..0a541aa9c08 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -1615,8 +1615,12 @@ void paste_matcopybuf(Main *bmain, Material *ma) } } +#include "../../windowmanager/WM_api.h" +#include "../../windowmanager/WM_types.h" + void BKE_material_eval(struct Depsgraph *depsgraph, Material *material) { DEG_debug_print_eval(depsgraph, __func__, material->id.name, material); GPU_material_free(&material->gpumaterial); + WM_main_add_notifier(NC_MATERIAL | ND_SHADING, material); } ``` This issue might be related to #72143, but that one isn't fixed with the above hack.

Added subscriber: @MarcelLegindi

Added subscriber: @MarcelLegindi
Author

system-info.txt I think this is new Sysinfo. I am now with an alpha version of Blender 2.83 hash: f051d47cdb (previous versions had the error)

steps to reproduce the error:

  1. create a flat mesh and assign a material
  2. in the material settings, change the "blend mode" to "alpha blend" and change the 3d view to the "material preview" mode to see the changes
  3. create a diffuse material, another transparent one and connect them in a mix shader. so that when the factor is zero, the material is invisible and when the value is 1 it is opaque
    Captura de pantalla de 2020-02-02 17-39-38.png
  4. add a driver to the mix factor (later we edit it)
  5. in the Blender VSE create a strip
  6. copy the "data patch" of the opacity of the strip
  7. edit the mix shader driver. in al expression just leave "var"
    The variable "var" has to be the "data path" copied. in the current scene (attached an image if it is not clear)
    Captura de pantalla de 2020-02-02 17-50-24.png

With that you can reproduce the error. when changing the opacity of the strip in the blender VSE. in the 3d view no change occurs. the change looks just when one moves in the timeline
The rest of the errors I mentioned are similar. I calculate that they are all the same problem. sorry for late reply

[system-info.txt](https://archive.blender.org/developer/F8317839/system-info.txt) I think this is new Sysinfo. I am now with an alpha version of Blender 2.83 hash: f051d47cdbce (previous versions had the error) steps to reproduce the error: 1) create a flat mesh and assign a material 2) in the material settings, change the "blend mode" to "alpha blend" and change the 3d view to the "material preview" mode to see the changes 3) create a diffuse material, another transparent one and connect them in a mix shader. so that when the factor is zero, the material is invisible and when the value is 1 it is opaque ![Captura de pantalla de 2020-02-02 17-39-38.png](https://archive.blender.org/developer/F8317856/Captura_de_pantalla_de_2020-02-02_17-39-38.png) 4) add a driver to the mix factor (later we edit it) 5) in the Blender VSE create a strip 6) copy the "data patch" of the opacity of the strip 7) edit the mix shader driver. in al expression just leave "var" The variable "var" has to be the "data path" copied. in the current scene (attached an image if it is not clear) ![Captura de pantalla de 2020-02-02 17-50-24.png](https://archive.blender.org/developer/F8317892/Captura_de_pantalla_de_2020-02-02_17-50-24.png) With that you can reproduce the error. when changing the opacity of the strip in the blender VSE. in the 3d view no change occurs. the change looks just when one moves in the timeline The rest of the errors I mentioned are similar. I calculate that they are all the same problem. sorry for late reply
Author

I just realized something weird. if in the previous example I try to move the mix shader factor and quickly start changing the opacity of the strip. the changes are seen in real time for a few seconds until the 3d view "stops updating"

I just realized something weird. if in the previous example I try to move the mix shader factor and quickly start changing the opacity of the strip. the changes are seen in real time for a few seconds until the 3d view "stops updating"
Philipp Oeser removed the
Interest
Animation & Rigging
label 2023-02-09 14:36:37 +01:00
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
6 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#70900
No description provided.