1
$\begingroup$

There has a function in blender api:

bpy.ops.ed.flush_edits()

Here is the description of the document: https://docs.blender.org/api/current/bpy.ops.ed.html
Flush edit data from active editing modes

So, what does it mean?

$\endgroup$
5
  • $\begingroup$ I can't seem to find any reference to bpy.ops.ed anywhere in the Python code in the github mirror. $\endgroup$ May 28, 2022 at 17:47
  • $\begingroup$ @MartyFouts github.com/blender/blender/blob/master/source/blender/editors/… no idea what it's actually doing though :) also there are a few references to the operation there github.com/blender/blender/blob/master/source/blender/bmesh/… $\endgroup$
    – Gorgious
    May 29, 2022 at 10:25
  • $\begingroup$ @Gorgious interesting. Did you find the Python code that invokes it? I’ll try to figure it out when I am back on a keyboard. $\endgroup$ May 29, 2022 at 17:10
  • $\begingroup$ @Gorgious I've gone over that code, including looking at T84920 and I'm pretty sure you don't want to know what it's actually doing. $\endgroup$ May 30, 2022 at 15:47
  • 1
    $\begingroup$ @MartyFouts hehe thanks for the archeology trip ;) $\endgroup$
    – Gorgious
    May 30, 2022 at 18:59

1 Answer 1

2
$\begingroup$

It seems, from looking at the C source code that Gorgious discovered and some bug reports related to the source code such as T84920 that this family of functions isn't really meant to be used from Python. Certainly most of the functions don't have actual Python APIs.

Very roughly, edits are multiple step operations internally and the editors maintain state that they use during the multiple steps. The flush operation transfers the internal state to the actual state of the edited object.

Without actually asking the developers on Chat, I don't think we'll get a better understanding than this.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .