Python update-Callback infinite recursion #27793
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#27793
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?
%%%Hi,
OS: Windows 7 64bit
3D-Card: Nvidia GTX 560
Blender Version: 2.58 r37724
the new update-callbacks for python go into a (indirect) recursion
if the variable which called the update-callback is changed within the update-callback.
The following example crashes if the String- and IntProperty are changed.
If the StringProperty is substituted with a FloatProperty or if only the StringProperty is changed
it doesnt crash.
import bpy
def func(self, context):
class MaterialSettings(bpy.types.PropertyGroup):
bpy.utils.register_class(MaterialSettings)
bpy.types.Scene.my_settings = \
bpy.context.scene.my_settings.my_string = "start"
bpy.context.scene.my_settings.my_int = 2
%%%
Changed status to: 'Open'
%%%Assigning to campbell, he's with holidays now so it'll take a week or more.%%%
%%%Campbell, do you have any progress here? :)%%%
%%%Thinking about this, a property update function should remain low level, IMHO its reasonable to have users responsible for not getting into problematic situations where infinite recursion happens, Added note to docs saying this.
closing.%%%
Changed status from 'Open' to: 'Archived'