Page MenuHome

When set value of "custom property" by python , driver not up-date correctly (for posed bone)
Open, Confirmed, MediumPublic


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: rB797539e76ccf

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

  1. load attached blend file for 2.8 or current 2.7 beta build

  1. Select armature (if not), then goto properties editor>object>Custom properties
  2. change "prop" value to 1.0
  3. It move "Bone" to (1.0, 0, 0) by driver
  4. Open python console, and input, C.object["prop"] = 0.00
  5. 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.



Event Timeline

Sebastian Parborg (zeddb) triaged this task as Confirmed, Medium priority.Apr 25 2019, 2:52 PM
Sebastian Parborg (zeddb) claimed this task.

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

depth = C.evaluated_depsgraph_get()

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?