PLY import fails when called during frame_change_pre handler #85770
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#85770
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?
System Information
Operating system: Windows 10, Kubuntu 18.10
Graphics card:
Blender Version
Broken:
2.91.0, 2.91.2 (see https:*developer.blender.org/rBA089cfd12a5511829aafad3790417a5218955a3ad)
Worked:
2.83.12
Short description of error
When the PLY importer is called during the frame_change_pre handler, the import fails with the following message:
Added subscriber: @JustinJensen
Added subscriber: @t.schumacher77
This is still an issue in Blender 2.93.6
I suggested a simple fix in my bug report above.
Added subscriber: @OmarEmaraDev
Changed status from 'Needs Triage' to: 'Needs User Info'
I can't replicate this with the following code snippet:
Should I have done something differently?
Thanks for taking a look at this.
My addon calls
bpy.ops.import_mesh.ply()
(see https:*github.com/neverhood311/Stop-motion-OBJ/blob/v2.2.0.alpha.18/src/stop_motion_obj.py#L304)In your code snipped, it looks like you're calling
export_mesh()
import_mesh
seems to work as well here.But regardless, when an operation like this uses a context element that might not be available, like the window in this case, usually what you do is override the window member of the context with any window. See https://docs.blender.org/api/current/bpy.ops.html#overriding-context.
However, regardless, I think the PLY add-on should put a condition on that in case it gets executed in a window-less environment as you suggested.
I am not sure if such a patch would be accepted. But you seem familiar enough, so why don't you try to create a patch to fix this? https://wiki.blender.org/wiki/Process/Contributing_Code
Changed status from 'Needs User Info' to: 'Confirmed'
Added subscriber: @oystelan
Dear Justin and Omar,
I stumbled upon this problem aswell when using an addon similar to stop-motion-obj. I managed to overcome the problem by modifying the following two functions in the import_ply scripts:
in init.py (line 65):
and in import_ply.py (line 413):
This may not be a perfect fix, but it seems to work (tested in blender 3.3).