no way to know if a datablock is in editmode #35984
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#35984
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?
%%%--- Operating System, Graphics card ---
Windows 7, 64bit
r57892
If object is mode=='EDIT', bm.from_edit_mesh(me) is used to wrap the bmesh, is_wrapped should therefore be True.
If it's wrapped, bmesh.update_edit_mesh(me) needs to be called to flush changes instead of bm.to_mesh().
But neither works if a mesh object, that is a linked duplicate (same mesh datablock), is in editmode!
Duplicate the default cube and run attached script. Enter edit mode and re-run. All fine.
Duplicate again and tick "Linked" in redo panel. Enter edit mode and re-run - it will complain about mesh being in editmode.
If you invert the condition to "if bm.is_wrapped", it will complain about mesh NOT being in editmode - so there is no way to write back changes!
It should be possible to do so without switching mode.%%%
Changed status to: 'Open'
%%%I think the real problem is that checking ob.mode == 'EDIT' is wrong, Blender only has one object in edit mode. Problem is there doesn't seem to be a way to check this, except for running bm.from_edit_mesh and seeing if an exception is generated.%%%
%%%added 'is_editmode' property to meshes and other datatypes which support editmode r57980.
closing.%%%
Changed status from 'Open' to: 'Resolved'