Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • 1
    $\begingroup$ Hello, it is not clear if this is a bug report or a question, and if it's the latter could you please narrow the scope of your question a little bit ? Currently it is quite hard to answer because it would mean basically parsing your script line by line to find the potential problem where it doesn't look exactly identified. Just note that as a rule of thumb indices of mesh elements should not be taken as immutable and should not be used as a reference because they are not always ensured to stay the same. There is no such thing as a "static" index unless you use your own heuristic to define them $\endgroup$ Commented May 7, 2025 at 6:24
  • 1
    $\begingroup$ Also I would really discourage from keeping references to bmvertices inside a list or a dictionary, the pointers are invalidated in some operations and will lead to errors or even crashes if you try to access an invalid pointer. $\endgroup$ Commented May 7, 2025 at 6:28
  • $\begingroup$ As Gorgious pointed out, it's important to reduce your script to a Minimal, Reproducible Example that clearly demonstrates the issue. This helps others quickly understand what's going wrong and how to reproduce it, without having to analyze the full script line by line. The goal is to isolate the problem as simply and clearly as possible. You might even find the root cause yourself during the simplification process. $\endgroup$ Commented May 7, 2025 at 8:05
  • $\begingroup$ @Gorgious I'm using Blender's API in a fairly casual way, so I'd prefer to frame this as a question rather than assert it's a bug—I'll leave that to the experts. My situation is quite specific, and I'm not sure how to generalize it effectively. I've already removed more than half of the original code, but I'll try reproducing the bug on a more general case and I'll revise my question to better highlight the core issue. $\endgroup$ Commented May 8, 2025 at 10:15
  • $\begingroup$ Regarding the term "static index": I'm referring to the vertex index accessible via obj.data.vertices, as opposed to the BMesh vertex index. I understand that this index isn't truly static—it can change when the mesh geometry is modified (e.g., when vertices are added or removed). However, in my case, the vertex count remains unchanged, so I consider the indices effectively static for the context of my problem. $\endgroup$ Commented May 8, 2025 at 10:16