When set value of "custom property" by python , driver not up-date correctly #63793
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
14 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#63793
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.17134 64 Bits
Graphics card: GeForce GTX 980 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 419.67
Blender Version
Broken: version: 2.80 (sub 58), branch: master, commit date: 2019-04-21 20:30, hash:
797539e76c
Short description of error
[Please fill out a short description of the error here]
When set custom property value by script (use console, or code), it not up-date pose-bone driven value. To up-date it, need to toggle pose-mode,
or need to clcik "Update Dependencies" of driver editor.
Exact steps for others to reproduce the error
load attached blend file for 2.8 or current 2.7 beta build
noupdate-driver.blend
Select armature (if not), then goto properties editor>object>Custom properties
change "prop" value to 1.0
It move "Bone" to (1.0, 0, 0) by driver
Open python console, and input, C.object["prop"] = 0.00
it change "prop" value to 0.00 (properties editor>object>Customproperties >prop value)
7 but it not update 3d view bone location.
8 toggle mode to object, or toggle mode to pose, bone move correctly to (0, 0, 0)
9 or need to use driver editor> "Update Dependencies" then bone locate correctly (driver up-date)
And there seems no good way to force up-date , without change mode.
"update dependencies" can not access by python.
I know there are already some reports for driver up-date (or dependency graph), but could not find about this specific case.
so just reported. Though I offer most simple case, but plug in often change "rig custom property values" from UI.
When direct input and change value , it up-date correctly., but if use function, (eg reset value of all proeprties) with UI button, it not up-date correctly.
Then I hope to know way to force up-date . (at current I toggle object pose-mode by python, then force up-date, but it is not good way I think)
if it is already reported , merge and close this please.
Added subscriber: @TakeshiFunahashi
#91588 was marked as duplicate of this issue
#91140 was marked as duplicate of this issue
Added subscriber: @ZedDB
Even though it will not be solved soon,, Is not there good way to force up-date from add-on(script) side?
which method or function, I can use ?
for 2.7 " toggle edit mode" only work. ( toggle-pose-mode work for 2.8)
But about Proxy rig, we can not use toggle edit mode (for rig obj ID properties) ,to up-date driver dependency graph, I think.
I expected if recent depthgraph change solve this issue,
but it seems not work still.
after step 5
I tried to update depthgraph by console
but it do nothing for this case. the custom property of armature actually get value as 0.5
then it should drive bone location (X) but not adapted untill I toggle mode, or change seleciton etc.
Is not there more better way to up-date with dependency?
Added subscriber: @AlfonsoAnnarumma
Same problem with driver on generic props (scale, node value etc...).
I've script with UI and custom prop attached to driver.
When I use the UI, the custom prop change the driver value.
When I use console or python script to change the custom prop, the driver value not change.
Yes it seems not only about pose bone. when script change "custom-prop" which drive other properties, manually change value can up-date driver, but change value by python, driver not work. There were many up-date about dependency graph, So if there is method to force it. but I can not find it.
I hope developer solve this issue, or offer way for bpy, if there were already simple solution, teach us please. Or for each case, we need many try and erroer and add un-necessary step, just up-date driver.
Any workaround?
Added subscriber: @lichtwerk
note: #48975 might be related/duplicate...
When set value of "custom property" by python , driver not up-date correctly (for posed bone)to When set value of "custom property" by python , driver not up-date correctlyAdded subscriber: @StanislasPaillereau
Added subscriber: @1seby
Added subscriber: @ideasman42
Added subscribers: @Sergey, @dr.sybren
@Sergey @ideasman42 do you know of any reason why setting a custom property via Python wouldn't trigger a depsgraph update?
Added subscriber: @MarcelLegindi
Added subscriber: @FinbarrORiordan
Added subscriber: @TuomoKeskitalo
This is the same issue as #74000. The issue is that an object is not "tagged for update" in the dependency graph when a custom property is changed by Python. "Tagged for update" means that Blender understands that the object (and everything that depends on it) should be updated. This is done for a few reasons:
some_ob["prop"]
, but not for nested cases likesome_ob["complex_prop"]- [x]["something"]
.After setting the custom property, call
C.object.update_tag()
. This should take care of the updates not "being seen" by dependencies. It won't trigger a full redraw of Blender's UI, though, so until that happens things on screen may still show the old status.Changed status from 'Confirmed' to: 'Archived'
Added subscriber: @Nicolas-Maquaire
Added subscribers: @SimonThommes, @iss
Added subscriber: @TeamwinFTW