Maniphest T96856

Cycles: BoolProperties not updating from the python console
Closed, Duplicate

Assigned To
None
Authored By
Dean Jones (DeanKingsley)
Mar 29 2022, 3:21 PM
Tags
  • BF Blender
  • Render & Cycles
  • Python API
Subscribers
Dean Jones (DeanKingsley)
Philipp Oeser (lichtwerk)
Pratik Borhade (PratikPB2123)

Description

System Information
Operating system: MacOS Monterey

Blender Version
Broken: 3.2.0 Alpha and 3.1.0
Worked: ---

*All done in Cycles with rendering preview*
Setting bpy.context.object.data.cycles.cast_shadow = False in the python console will run but produce no changes. The UI button will not update. Changing to another tab (ie. Object Constraint Property) and then changing back will show that the UI button has now updated. The change will not affect the scene though. Running another command such as: bpy.context.object.data.energy = 500 or manually changing another property will then update the boolean.
I was able to experience this with cast_shadow in the Object Data Property, use_camera_cull and a custom BoolProperty that are both in Object Property. More specifically: cycles/blender/addon/properties.py - CyclesObjectSettings() and CyclesLightSettings()
I'm not sure if this is caused by the BoolProperty itself or because of the context that it is in.
To note: other boolean properties such as the Viewport Display -> Show Name do work through the python console.

Steps to Reproduce

  • Open default scene and switch render engine to cycles
  • Select light in viewport and Change to scripting workspace
  • Change to Object data properties tab and see the Cast shadow (default enabled)
  • Run bpy.context.object.data.cycles.cast_shadow = False in console

Value does not update in User interface unless we perform some action there (resize properties window, change property tab, etc.)

Event Timeline

Dean Jones (DeanKingsley) created this task.Mar 29 2022, 3:21 PM
Pratik Borhade (PratikPB2123) changed the task status from Needs Triage to Confirmed.Mar 30 2022, 6:29 AM
Pratik Borhade (PratikPB2123) added projects: Render & Cycles, Python API.
Pratik Borhade (PratikPB2123) added a subscriber: Pratik Borhade (PratikPB2123).
Pratik Borhade (PratikPB2123) renamed this task from BoolProperties not updating from the python console to Cycles: BoolProperties not updating from the python console .Mar 30 2022, 6:34 AM
Pratik Borhade (PratikPB2123) updated the task description.
Philipp Oeser (lichtwerk) added a subscriber: Philipp Oeser (lichtwerk).Mar 30 2022, 10:30 AM

A more specific incarnation of the "no-update-on-py" is this one T96829: Cycles: modifying properties through the Python console does not trigger updates.