-
-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
apiAPI changes or additionsAPI changes or additionsschemaJSON Schema v2 design and implementationJSON Schema v2 design and implementation
Description
Summary
Design and implement the Action.context field for operator context override.
Background
JSON Schema v2 includes a context field for type: "command":
{
"type": "command",
"value": "bpy.ops.mesh.primitive_cube_add()",
"context": "{'area': next(a for a in C.screen.areas if a.type == 'VIEW_3D')}"
}Purpose
In Blender 4.x+, operator context override requires with syntax:
# Blender 4.x style
with context.temp_override(**override_dict):
bpy.ops.some_operator()The context field allows users to specify this override as a Python expression.
Implementation Plan
TBD - Detailed implementation plan to be added.
Considerations
- How to safely evaluate the context expression
- Error handling for invalid expressions
- UI for editing context override
- Documentation and examples
- Backward compatibility with existing command strings
Metadata
Metadata
Assignees
Labels
apiAPI changes or additionsAPI changes or additionsschemaJSON Schema v2 design and implementationJSON Schema v2 design and implementation