Driver's scripted expression does not work for animation render. #39697
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#39697
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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
I don't think relevant. Windows 8.1. nVidia GeFroce GT 730M.
Blender Version
Broken: 2.70a
Short description of error
If I add a driver to one of sequence properties in sequencer it works like a charm for preview and image render. However if I do animation render driver values seem to be stuck on the value for currently selected frame, not the one being rendered.
Exact steps for others to reproduce the error
Video Editing
Add
->Effect
->Color Strip
and make it i.e. whiteAdd
->Effect
->Color Strip
and make it i.e. red (make sure red is over white)Opacity
property and add a driverScripted Expression
and enter expressionbpy.context.scene.frame_current / 26
Final result can be seen here animation_driver_bug.blend.
Hit
ctrl-a
to see expected result, hitctrl-f12
to see broken behaviour.Changed status to: 'Open'
Added subscriber: @elmo
Changed status from 'Open' to: 'Archived'
Context is NOT available during render.
Changed status from 'Archived' to: 'Open'
Different approach same issue. Steps as described above, but change steps from setting
Scripted Expression
:Scripted Expression
toframe / 26
frame
which is of typeTransform Channel
, for objectCube
, setType
toX Location
andSpace
toWorld Space
Cube
'sX
to 0, add key frame on that propertyCube
'sX
to 26, add key frame on that propertyIssue still persists even though I don't refer anywhere to
context
.I forgot to attach animation_driver_bug.blend in previous post.
Also reading through documentation I see in Drivers section:
which strongly suggests that I can use either (and seems I didn't have to introduce my own variable in second example I attached).
In addition I don't see any mention that there will be anything odd going on during animation render with scripted expressions.
Added subscriber: @mont29
Added subscriber: @willi-2
Already closed meanwhile, though...: the point is not only that context is not available. In fact, the current frame does not change during animation rendering. Consequently, frame_current does not change either, and you are referring to the wrong value. However, we obviously do not have access to the frame number used for rendering one frame of the animation. During animation rendering, the indicator in the timeline does not reflect the scene's current frame but the frame currently being rendered.
Workaround:
@willi-2 that's what I've basically done in the second example (or not?). Just to be sure I also just tried with variable name
f
instead offrame
(in case there is any clash), but the problem still persists.It would be nice to see a working .blend file.
@elmo, no you're referring to frame again. I don't:
#39697.blend
However, there seems to be a problem that is not related to "frame" or "frame_current" that makes the value not being updated.
This indeeds seems to require a fix.
EDIT: You've named the variable "frame", too, which was a bit confusing. We're now actually talking about the same problem now.
@willi-2 Yeah, when I created my second example I didn't know that
frame
is reserved. Hence my comment about trying it out withf
.FWIW my actual usage contains a call to my custom function in expression and one of arguments was current frame number (with offset applied). After adding
print()
in it I didn't see any output during render, which would suggest that issue is not with referring to other properties/stale values being substituted, but with scripted expressions not being evaluated at all.For now I think my workaround will be generation of FCurve points instead of using driver (which means I will have to rerun my generation each time input changes, but in my current case that is not a big problem). However it does seem like a fix is required.
Changed status from 'Open' to: 'Duplicate'
✘ Merged into blender/blender#39820.