RuntimeError when baking multiple dynamic paint surfaces in a script #117186
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#117186
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.22621-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 4090/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 536.99
Blender Version
Broken: version: 4.1.0 Alpha, branch: main, commit date: 2024-01-16 15:56, hash:
da6b45f9b831
Worked:
Short description of error
I am trying to run a script to bake multiple dynamic paint surfaces as an image sequence but am receiving an error, crash, or incomplete caches upon running the script.
In this setup I have two objects with a dynamic paint canvas added. Each canvas contains two DynamicPaintSurfaces and each is set to output an image sequence to a different cache path. This is the script being used to bake the dynamic paint surfaces:
When running the script, there seems to be different random outcomes:
Exact steps for others to reproduce the error
Attached is a Blend file containing the setup and script: dpaint_bake_error.blend
Result: RuntimeError or other outcomes mentioned above.
Let me know if anything else is needed, or if I am misusing the Python API within the script.
Thanks for the report. Can confirm when baking more than one paint-surface. Looks like changing
active_index
caused this. Because error is triggered prior to second bake function.Maybe expected behavior since this is terminated when update was sent to viewlayer but depsgraph evaluation wasn't completed
Does it help updating the viewlayer after setting its object active (I cant repro the issues anymore after doing that)?
So using this script
That still triggers the error
Thanks for the updates. I am also still triggering the error with the
view_layer.update()
script.I was trying to find a workaround to this issue by launching a new Blender instance between bakes and baking each surface individually through a script. The scripts complete without an error, but there seems to be a problem where setting
canvas_surfaces.active_index
does not take effect for the bake.For example, if the active_index is currently set to 0 and script sets the value to 1 and runs the bake, this is the result:
This is the script I am using and adding
view_layer.update()
does not seem to affect the result:Script output:
Blend file including the setup and script: dpaint_bake_incorrect_cache_path.blend
If this should be opened as a separate issue, let me know.
I see, it still writes to the path of previous active surface.
@lichtwerk , I think this can be marked as
confirmed
@PratikPB2123 @rlguy : I still cannot repro for some reason but feel free to confirm if you can
Just confirming that I am able to reproduce the issue on:
Windows-10-10.0.22621-SP0 64 Bits
4.1.0 Beta, branch: blender-v4.1-release, commit date: 2024-02-13 23:35, hash:
c6e229d3e470
4.2.0 Alpha, branch: main, commit date: 2024-02-14 11:02, hash:
2cec7e3aa59b