Questions tagged [bmesh]

Blender's new mesh system that was added in 2.63, with full support for N-sided polygons instead of only triangles and quads.

Filter by
Sorted by
Tagged with
1
vote
1answer
14 views

Convert polygons or ngons to quads using bmesh

I have imported an SVG keyboard layout into Blender (2.83), which arrives as filled curves in the XY plane. For each key, after converting the curve to mesh, I have managed to dissolve some edges ...
2
votes
0answers
12 views

Persistence of element tag and select using bound bmesh

For bmesh code I often used tag to flag a visited element. On noticing the tags persisted it was required to "detag" the entire bmesh element collection ...
2
votes
2answers
74 views

How to detect disconnected parts within a selection?

Consider the following edge selection: What would be the fastest way to return the indices of the different parts of this selection? I am aiming for an output similar to this: edge_indices = [[24, 46,...
0
votes
0answers
12 views

Index order after multiple bmesh.ops.subdivide_edges() calls

I'm looping over several meshes. For each mesh I perform several bmesh.ops ...
1
vote
0answers
30 views

Naming object issues

I'm trying to add some items to the scene and rename them but ran into some issues. Example code: ...
0
votes
1answer
21 views

bisect_plane not clearing in python API

Here is my bisect plane command, which does infact produce new verticies along the bisected plane (Blender 2.90): ...
0
votes
0answers
24 views

How to fix my mesh texture is transparent

help me can someone help me here because I am in trouble the textures are not rendering
1
vote
2answers
68 views

Using python to scale/resize a selected groups of faces with individual origin

question based on this topic Using python and bmesh to scale/resize a face in place where each face was scaled separately. So actually the question in the title. I'm newbie to python. I tried to find ...
1
vote
1answer
39 views

Blender crashes from replacing mesh data via script

I'm working on a script that will generate a mesh based on handles (empties) in the 3D interface. So when the user drags a handle it replaces the mesh data, but leaves the object intact. Here's part ...
2
votes
0answers
17 views

Python to get Rgb of mesh faces

This is my first use of Python in blender, although I have had Python experience elsewhere some time ago (Arcpy). I have a mesh object with several faces that has a material calculated for each face ...
1
vote
1answer
29 views

Python api - Rotate selected around vertex using bpy operator

I want to rotate a selected item around a specific vertex like this: vertex.select=true bpy.ops.transform.rotate(value=1) This code basically rotates at the ...
1
vote
0answers
55 views

When to use “.ensure_lookup_table()”?

For modifying meshes (in the hereunder example removing vertices), I use the script as follows: ...
0
votes
0answers
14 views

Top surface multiple face selection

Does anybody have experiences with multiple face selection? I’ve recently encountered this topic, and I am trying to find the best way to select only the top surface with a code. One of my ideas is to ...
0
votes
0answers
8 views

Change edge length using BMesh Operators

I have read some articles about access to the Mesh primitives like edge and vertex, but all those are outdated today for my understanding (such as this). My question is how by utilising python script (...
0
votes
0answers
17 views

How to know if two UV loops are conected using Python?

I know how to get all UV Loops using bmesh, get the mesh vertex and loop uv coordinates and index, select, translate, etc.: ...
0
votes
1answer
30 views

Understanding BMLoops: Does every loop enclose a face?

I'm using bmesh to alter my geometry via python. Now I don't seem to understand loops correctly. I thought that a BMLoop always covers the edges of a face as in it loops around it once. I can manouver ...
0
votes
0answers
42 views

What does Bmesh mean as opposed to mesh in animation nodes mean?

I tried to find the answer on Google and it did not give any answers for me. I also tried on this forum and I did not get any answers here either. So what is the difference between Bmesh and mesh ...
1
vote
1answer
35 views

Change proportion on base mesh

I discovered a video that shows a very quick way to make base mesh (skin modifier as everyone already knows) but it's a timelapse, so there's no explanation at all. In 01:00 he starts to scale vertex ...
1
vote
1answer
41 views

Insert new vertices into face using pyhton & bmesh

I want to add vertices to a face. Can I only do this by redrawing the whole face with bmesh.faces.new(loop_vertices) or can I also just add some to an existing face?...
1
vote
1answer
30 views

Unexpected vertices when looping through meshes in Scene Collection

I would like to loop through meshes in my Scene Collection to find the coordinates of Verts (single points added via Add Mesh Extra Objects addon) or the volume of a mesh (the default Cube). I have ...
1
vote
0answers
26 views

Calculating edges and polygon indices in python numerically to build mesh

I can calculate the vertices and faces but how does one calculate edges and polygon indices numerically in python? ...
1
vote
3answers
96 views

Updating objects parameters using python creates multiple objects

I can update a text curve object when I change the frame and it doesn't create multiple objects but how can I do the same with a mesh object. Code: ...
0
votes
0answers
17 views

Creating / Re-creating the X,Y,Z mesh Surface functions with the (u,v) options using python [duplicate]

Creating / Re-creating the X,Y,Z mesh Surface function with the (u,v) options using python in Blender 2.8x Does an example exist / anyone have an example of how to reproduce the X,Y,Z mesh Surface ...
0
votes
0answers
12 views

Guideline for using mesh(bmesh) library in blender [duplicate]

I am a new blender API/addon developer. I am really bad at the mesh(bmesh) library. Do you guys know any guide or tutorial to use mesh library of blender API? the docs of Blender are really useless. I ...
2
votes
1answer
62 views

What is the bmesh equivalent to bpy.ops.mesh.shortest_path_select()?

Basically I am trying to replace a call to bpy.ops.mesh.shortest_path_select() in an Add-on of mine. While many bpy.ops.mesh ...
0
votes
0answers
43 views

Can not move polygons but only vertices of an object by bmesh!

I can only move the vertices of the monkey to (2,4,6) but not by polygons and effects look strange. What is the right way to calculate the polygons by the vertices according to their Z value? ...
0
votes
0answers
38 views

How to move the polygons of an object into other location by bmesh frame by frame? [duplicate]

How to move the polygons of an object into other location by bmesh frame by frame? I tried below way but failed. Is it possible to generate polygon movement animation effects like in Animation Nodes ...
1
vote
1answer
57 views

How to draw a circle hole by bmesh on the plane?

How to draw a circle hole or a square hole by bmesh on the plane object? I tried with below but failed it only draws circle rather than a hole. ...
0
votes
0answers
45 views

Joining/Union of complex objects

So I have two Objects (one is complex sculpted and one imported from an cad stl) I would like to combine for 3D-Printing, therefore it would be great to not have any inner surfaces. But when I combine ...
0
votes
0answers
22 views

Why vertices are selected after adding mesh?

I have encountered weird situation with self-made addon where vertices are selected in Edit Mode after adding mesh. Is this to do with bmesh? Edit: Figured that one out, just selected all verts during ...
1
vote
0answers
44 views

How to get normal of the edge

In the Blender api, it is possible to get the normal of the vertex and face, but it is not possible to get the normal of the edge. Is there any formula for calculating normal of the edge or some other ...
1
vote
1answer
80 views

Extend Blender Python Class

Note: both Blender SE and google are currently useless for this somewhat simple subject, so bump this question up for others like me. I would like to extend a blender class (BMesh.types.BMEdge) into ...
1
vote
1answer
40 views

Split Off BMesh selected faces

I have a BMesh that I loop through and select some faces. I would now like to create a new BMesh out of all the faces I just selected. How can this be achieved in python? In addition, since faces have ...
1
vote
1answer
28 views

How do you store the edge locations of a cube with python?

Basically I want to find the edges for the default cube, so I can store their location, then use the locations to draw grease pencil strokes. I have been successful at figuring out how to print out ...
0
votes
3answers
100 views

Convert “Existing” Mesh to Bmesh (AttributeError: module 'bmesh' has no attribute 'from__mesh')

In Blender2.79, the "Main Script" below converts an existing mesh(default_cube) to a "Bmesh" (using bmesh.from_mesh()) and stores the selected vertices of the mesh in a list. On testing,this Bmesh ...
0
votes
1answer
32 views

Bmesh - Append selected vertices to a List (Working script not “Reloading” correctly)

In Blender2.79,the script below calculates the selected vertices and stores them in a list. As there were issues with calculating these vertices directly on a mesh instance ,the object's mesh had to ...
0
votes
0answers
37 views

Getting Faces from vertex group using bmesh

So I have a vertex group, and I want to hide the faces using the vertex from vertex group. So to do this, I need to either make a check if the face is in a vertex group, or I need to get the faces ...
1
vote
0answers
20 views

is there a way to generate a mesh from pts using bmesh without a loop in python?

I am very new but far as I know there are at least two ways that one could generate a mesh via python from raw points (such as from a xyz file or something else that isn't directly supported in ...
0
votes
0answers
31 views

Get tangents from bmesh

From the Mesh class I can get the tangents like this: mesh.calc_tangents() for loop in mesh.loops: print(loop.tangent) How ...
0
votes
0answers
37 views

when adding custom-data layers to bmesh object, where does the data get stored once bpy mesh object is updated?

I am trying to add custom-data layers to mesh vertices so that I may use the values to generate a colorramp on the surface during rendering. Currently, I first map the data to RGBA values and then ...
0
votes
2answers
265 views

How to select vertices, then convert to face selection with Python?

I am brand new to Python, and cobbling things together from various sources, so I have next to NO idea what works, what doesn't work, or WHY things work. I'm creating a script to apply a mirror ...
0
votes
1answer
23 views

Gridifying Objects using BMesh

I'm working on a script which generates a bunch of cuboids with integer length sides. From there I would like to effectively turn each face into a grid in which each vertex is aligned to the world ...
0
votes
0answers
27 views

Why is deselecting vertices with bmesh not working?

I want to make use of the bmesh module to update mesh selection. To select vertices works as expected, but to unselect vertices does not work for me... Am I ...
1
vote
0answers
72 views

Merging multiple Objects, removing excess inner geometry for 3d printing 2.82

I tried searching but could only find old non-2.8+ related info I am trying to merge 30 disks to a supporting geometry, and the intersecting geometry will not let me 3d print properly. Boolean search ...
0
votes
0answers
35 views

Simulating and visualising arbitrary curvature flows in Blender - Is it possible?

I would like to simulate the evolution of surfaces under various different curvature flows e.g. mean and gauss among others. I have a background in Mathematics and have ran basic simulations before ...
0
votes
1answer
66 views

Recursive search for selected vertices

i am working on a tool and need to get selection islands in the mesh. I want to keep only the biggest connected vertex selection in the mesh. I wrote a function that recursively searches a ...
2
votes
1answer
691 views

Remesh a selected surface

Is there any modifier that allows me to remesh let's say a one selected surface (triangulation)? I'm working on complex boolean objects. The problem when I apply boolean operations the mesh gets nasty ...
1
vote
1answer
34 views

Fast access to bmesh verts/edges/faces from python?

I'm trying to build a large BMesh from scratch in python. I know you can add vertices (or faces or edges) to a BMesh one at a time: ...
0
votes
1answer
30 views

Creating a new vert with bmesh resets previously created verts

I'm creating new vertices using bmesh at 3d cursor position but every time I add a new one, all the previously created vertices jump to their original positions (if ...
0
votes
0answers
18 views

Need help with inconsistent edge selection in python (using bmesh)

I've been writing a script for generating buildings but am running into issues with edge selection and (I suspect) bmesh. Specifically, I've written a function that determines an edge's direction ...

1
2 3 4 5 6