Using python to translate grease pencil vertices in edit mode causes crash #59654
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#59654
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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: Arch Linux
Graphics card: GTX 1060
Blender Version
Broken: 2.80, d46d8e831ce
Exact steps for others to reproduce the error
Error Message
Added subscriber: @doakey3
Added subscriber: @JacquesLucke
Simply executing the script below in the text editor, also crashes Blender. No other setup needed.
Added subscriber: @antoniov
@JacquesLucke I can reproduce with --factory-startup, so it's not related to grease pencil.
Problem is here:
rv3d is NULL.
Call stack extract:
Added subscriber: @mont29
Changed status from 'Confirmed' to: 'Archived'
Eeeeek!
bpy.context.area.ui_type = 'VIEW_3D'
Seriously? You know you are changing the current active editor to 3D View with that, right? You cannot, absolutely cannot, do that in a py script and expect things to work... UI will simply not update quickly enough, and you'll call the transform operator with a completely broken context.
What you want to do here is to create a fake context to call your ops with, with all required data. See https://docs.blender.org/api/current/bpy.ops.html#overriding-context