Mesh Solo Crashes Cloud Generator AddOn ( user persp (local) bug ) #40706
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
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#40706
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
OSX 10.9 16gb
Intel HD4000
Blender Version
Broken: Blender 2.71 RC2
Short description of error
When a mesh is soloed using the num pad slash "/" and the Cloud generator is run the result is an error in the cloud generator script.
Exact steps for others to reproduce the error
Open the default scene.
Select the cube.
Press the numpad "/" key to solo the cube.
Click the cloud generator button.
A context error occurs. This error condition should be handled better. Once the error occurs the AddOn becomes useless and you have to restart Blender to try again.
Edited by meta-androcto: To include several other addons affected by the same bug
Changed status to: 'Open'
Added subscriber: @AtomP
#38659 was marked as duplicate of this issue
#40327 was marked as duplicate of this issue
Added subscriber: @BrendonMurphy
hi, I can confirm this bug,
I'm really not sure why this is happening.
Traceback (most recent call last):
RuntimeError: Operator bpy.ops.object.editmode_toggle.poll() failed, context is incorrect
location: :-1
I've tested also discombobulator addon with similar result:
Traceback (most recent call last):
AttributeError: 'NoneType' object has no attribute 'data'
location: :-1
might be best to ask ideasman to look at.
hi, testing further addons,
Object Mangle Tools: if run in User Persp (local) the addon runs, but when returning to camera perspective mode, there's a temp object visible. this does not happen when the addon is run in Camera View.
Added subscribers: @b1657022405, @mont29, @lopataasdf, @eclectiel
◀ Merged tasks: #40327.
Merged in bsurfaces local view report, it throws the same error as Cloud Gen.
RuntimeError: Operator bpy.ops.object.editmode_toggle.poll() failed, context is incorrect
I've gone back to Blender 2.63 & the same error exists.
This makes me wonder if it's not a longer term bug that's only recently come to light.
Mesh Solo Crashes Cloud Generator AddOnto Mesh Solo Crashes Cloud Generator AddOn ( user persp (local) bug )Added subscribers: @scheherazade, @CodeManX
◀ Merged tasks: #38659.
Added subscriber: @lichtwerk
first investigation shows that indeed the context's active object is NULL in that case; investigating further...
my take on this:
addons might add (helper-)objects along the way of their execution.
if this happens in localview the new object will be 'correctly' linked to the scene etc. but it will not
be assigned the same localview-layer as we are currently in in the 3dview (and there doesnt seem to be a way to do this via python afterwards).
this in turn will result in a context that is not suited for possible calls to bpy.ops.XXX (context might be None for 'context.active_object', 'selected_editable_objects' etc.)
for example:
setting context.active_object in localview to an object that is existing, but not in the same localview-layer will:
a lot of operators (bpy.ops) will poll for this and throw an error if there is no active object [just like the message we can see in the report]
for a very simple example have a look at attached 'T40706_simple_example.blend'T40706_simple_example.blend
So how could this be fixed? Some ideas:
(1) expose write-access from python to an object's 'layers_local_view' array
this way I assume we could change the addons to correctly add their objects to the localview-layer as well
(which will then most certainly return something good for 'context.active_object' as well, I guess)
will have a look if I get that working...
(2) change the addons to leave localview before execution (and return to local afterwards?)lame...(3) change the addons to override the context with the active_object in question
does this even work for all ops? quite tedious, and I couldnt get it to work all the way
see attached patch 'T40706_override_context_try.patch'T40706_override_context_try.patch
(4) 'fix' context to return an active_object etc. (even though this is not in the same localview-layer)
not sure about consequences this has...
Let me know what you think
Added subscriber: @AditiaA.Pratama
committed initial fix somewhat baindaid to prevent execution in local view mode with print warning & prevent ui draw with Cycles active in object_cloud_gen
4ac0fa2ac5
moving this to To Do as it affects other addons & is not entirely solved.
Changed status from 'Open' to: 'Archived'
closing as archived, it's possible to add a poll to addons which don't work correctly in local view on a per addon basis.
As it's an issue we are aware of, it's hopeful to solve/improve with the new viewport in 2.8.