Physics simulation cache appears to share start & end frame drivers (but not if numeric start/end values) #119710

Open
opened 2024-03-20 17:57:29 +01:00 by James Tomkinson · 1 comment

System Information
Operating system: Windows-10-10.0.22631-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2060/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 546.33

Blender Version
Broken: version: 4.0.2, branch: blender-v4.0-release, commit date: 2023-12-05 07:41, hash: 9be62e85b727
Worked: (newest version of Blender that worked as expected)

Short description of error
In a multi-cache simulation, I can set separate start/end frames, but a driver is shared by both cache settings.

Exact steps for others to reproduce the error
I'm not sure if the following is a bug or current product limitation.

I need to cease a physics simulation for a series of frames, and possibly re-bake the simulation when I adjust the animation by scaling areas that will include certain timeline markers. This will also allow for correct re-bakes from command line, driven by timeline markers.

To achieve this I create two caches with appropriate stop and stop times:

0.png 1.png

These start/end times appear to be set per-cache. Now I want to drive the start/end frames from timeline marker names and problems begin. If I add drivers to start/end of both caches end edit in Drivers Editor, I can see that the cache names are distinguished in the editor, but changes to the first or second caches driver variables:

2.png

are then forced upon the other caches values:

3.png

example blend file: separate simulations.blend

**System Information** Operating system: Windows-10-10.0.22631-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 2060/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 546.33 **Blender Version** Broken: version: 4.0.2, branch: blender-v4.0-release, commit date: 2023-12-05 07:41, hash: `9be62e85b727` Worked: (newest version of Blender that worked as expected) **Short description of error** In a multi-cache simulation, I can set separate start/end frames, but a driver is shared by both cache settings. **Exact steps for others to reproduce the error** I'm not sure if the following is a bug or current product limitation. I need to cease a physics simulation for a series of frames, and possibly re-bake the simulation when I adjust the animation by scaling areas that will include certain timeline markers. This will also allow for correct re-bakes from command line, driven by timeline markers. To achieve this I create two caches with appropriate stop and stop times: ![0.png](/attachments/d8b02b65-e4c8-4dc2-93d5-f8c9438b095f) ![1.png](/attachments/d5ba90a9-fb01-4935-a76f-bb79a50cd9e5) These start/end times appear to be set per-cache. Now I want to drive the start/end frames from timeline marker names and problems begin. If I add drivers to start/end of both caches end edit in Drivers Editor, I can see that the cache names are distinguished in the editor, but changes to the first or second caches driver variables: ![2.png](/attachments/dc3d69a7-d3b2-4854-977e-e1357d71680b) are then forced upon the other caches values: ![3.png](/attachments/a0b75d9d-d6ca-4e35-8dd7-cd8b705d848a) example blend file: [separate simulations.blend](/attachments/18dbbb83-3e5c-49a9-adf8-59f695756f34)
James Tomkinson added the
Priority
Normal
Status
Needs Triage
Type
Report
labels 2024-03-20 17:57:29 +01:00

Hi @jamestomk, thanks for the report.

What is happening is that the driver is updating the point_cache that is active.
It does not differentiate which point_cache is being used.
I'm not sure if it's possible to specify which point cache is the driver's focus, but the behavior described is expected as far as I can see.

One way I've found to specify a point_cache is by accessing the list of point caches within a point_cache.
C.object.modifiers['Softbody'].point_cache.point_caches['second']

But I'm not sure if it's possible to add a driver for it.

Not a bug AFAICS, but I think it deserves input from a developer... maybe @JacquesLucke (Nodes & Physics) or @ideasman42 (Python API).

Hi @jamestomk, thanks for the report. What is happening is that the driver is updating the `point_cache` that is active. It does not differentiate which `point_cache` is being used. I'm not sure if it's possible to specify which point cache is the driver's focus, but the behavior described is expected as far as I can see. One way I've found to specify a point_cache is by accessing the list of point caches within a `point_cache`. `C.object.modifiers['Softbody'].point_cache.point_caches['second']` But I'm not sure if it's possible to add a driver for it. Not a bug AFAICS, but I think it deserves input from a developer... maybe @JacquesLucke (`Nodes & Physics`) or @ideasman42 (`Python API`).
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
2 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#119710
No description provided.