The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
2
votes
1answer
238 views

How calc value of translate with constraint_orientation=“VIEW”?

I want to translate some vertices in X axis with constraint_orientation="VIEW" but I dont' know how calc the values??... next code should work but I don´t know how calc the value in this parameters ...
4
votes
3answers
1k views

Finding the lists of connected indices associated with disjoint mesh elements

Is there a fast way (without looping over all edges/faces/verts) using ops.mesh or bmesh to get the lists of indices associated ...
2
votes
1answer
1k views

bisect plane normal (mesh and bmesh) how calc the 3th vector to mathutils.geometry?

UPDATE 1: how calc the 3th vector to mathutils.geometry.normal(vectors)?? After @Chebhou answer I tried my "bisector tool" again... with mesh and bmesh.. now the problem is the 3th vector to calc ...
2
votes
1answer
482 views

Fix t-junction in mesh

I'm currently modifying a mesh using a Python script. I just realised that my mesh have a few t-junctions, which I would like to fix. Is there any way to fix t-junctions in Blender? If so, is it also ...
1
vote
1answer
288 views

Blender Alters .Obj vertex list

I have a wavefront .obj file and a sharp edge list which are mapped with the vertex index form the .obj file. Now I want to add some functionality in the .obj file based on the sharp edge list. But ...
7
votes
2answers
3k views

Assigning material to every second face via python

I want to do something like this with a python script and selecting the vertex in the middle: I tried with many ideas as: ...
5
votes
1answer
432 views

How can I find out the correct order of vertices to create a quad face with bmesh?

Let's say I have 4 vertices and want to create a quad face with bmesh. Is there way to figure out the right order of the vertices to not get a face like this But rather a face like this.
6
votes
1answer
847 views

Are there any tools for making irregular polygons regular?

Are there any tools in Blender that take irregular polygons and make them regular (approximate a circle)? I'm specifically looking for a solution that works with preexisting polygons. Also, it would ...
2
votes
1answer
339 views

how access to new vertices after bmesh.ops.bisect_edges?

I'm trying to access to new vertices after apply bmesh.ops.bisect_edges API say that newly created vertices and edges will be in geom_split. I can print"geom_split" data, but I can't access to new ...
4
votes
1answer
597 views

Replacing all mesh elements in a Mesh object

I'm working on the Animation Nodes Addon and want to create some new nodes which can work with mesh data like polygons. To output the created mesh I have to put it onto an object like this: ...
1
vote
1answer
535 views

Python: Access mesh selection history data

I want to write an addon that can combine two selections with a logical AND. For example, the user use via normal gui bpy.ops.mesh.select_similar(type='LENGTH') ...
15
votes
1answer
12k views

How can n-gons be selected?

Editing a mesh for a while I didn't notice that I created a n-gon. After adding a subsurf modifier the mesh heavily deformed, it took while until I found this: Is there an easy way to select n-gons?
0
votes
0answers
543 views

Using closest_point_on_mesh on object manipulated as bmesh

I am trying to script some object manipulation using the bmesh module. During steps of this scripting I would like to be able to use the closest_point_on_mesh ...
3
votes
0answers
101 views

how to find all faces linked to a specific face [duplicate]

I need to find all parts of a mesh which are separated by seams, or which are unconnected sub meshes. As an illustration see the following image: I need to get the sets of faces for each of the 5 ...
2
votes
1answer
936 views

Set active vertex through python

I am having a problem trying to set the active vertex in blender. I have a list of vertices but I cannot set the active vertex. I am able to retrieve the active vertex through select_history of the ...
0
votes
0answers
144 views

Dead bmesh loaded from operator in edit_mode

I'm trying to make an operator for my algorithm that worked fine runned just from script main function, but bmesh in edit mode loaded from operator is dead... So i just can't do anything with it. ...
1
vote
1answer
1k views

bmesh/python - list directly or indirectly connected verts

For a single vertex, how can I create a list of all the vertices connected directly or indirectly to it? Similar to Select Linked but without actually selecting anything.
3
votes
1answer
938 views

What is the loop order of bmesh faces?

Let's suppose I create a bmesh with the following commands: import bmesh bm = bmesh.new() bm.from_mesh(obj.data) bmesh.ops.triangulate(bm, faces=bm.faces) Have a ...
4
votes
1answer
1k views

Order of vertices added using Python script and bmesh

I am using Blender 2.71 and Python 3.4.0 and I would like to add a row of vertices in such a way that I can call them using bmesh.verts[] in the same order that I ...
1
vote
2answers
1k views

What is the fastest way of creating a large mesh/object built from smaller mesh “building blocks”

I realize similar questions have been asked before and I followed the advice given there but I hope to gain more insight on the matter here. I've added a lot of details, I hope it's not too much. I ...
2
votes
2answers
1k views

How to use bmesh.ops.transform?

I could not find an example for the Bmesh function: bmesh.ops.transform(bm, matrix = matrix, space, verts_extrude_b1) What is the matrix argument and what do you ...
1
vote
1answer
615 views

How to duplicate and move a selected edge in normal direction?

I want to duplicate a selected edge and translate it to another location, based on the normal direction. (source: shshop.da.to) This is my current code: ...
1
vote
1answer
484 views

Is there a better way to rotate the order of vertices of currently selected faces in edit mode?

I've been playing with duplifaces and it turns out the orientation of the copied geometry depends on the order of the vertices in the face (https://developer.blender.org/T30547). Since I'm unhappy ...
0
votes
0answers
40 views

Halfedge UV-coordinates [duplicate]

I am programming a Python script, which takes a mesh from a external tool and adds it to the blender scene. I transmit a texture and the mesh, and it actually works. But I have trouble with the UV ...
3
votes
1answer
798 views

Manipulate Vertex group names in the bmesh API

When importing an object with my own script (Yes, I need one, no functional script exists) I want to import it with help of the bmesh-module. It seems to be the ...
2
votes
1answer
864 views

Script to separate an object's mesh without using bpy.ops

I've seen several posts suggesting that it's better to write functions that manipulate bpy.data directly, instead of using the bpy.ops operators. I can understand the argument about how operators such ...
4
votes
2answers
3k views

How to fix ngons overlapping wire edges?

I am trying to make a retopo of my human head. But it seems that I already have several ngons because I couldn't create an edge loop. So I checked it with mesh lint and it showed me the ngons But ...
3
votes
2answers
5k views

How can I triangulate a mesh without changing the object?

I have to triangulate the object's mesh because the format I export to only understands triangles. Now I not only want to export geometry but also the uv-mappings for the mesh. Let's call the ...
0
votes
3answers
2k views

Re-Polygonize a tessellated / triangulated mesh?

I have this mesh: As you can see, the faces are triangulated. I want to know if there is a way to re-polygonize the entire mesh (make use of NGon support in Blender 2.63+), or a modifier or something ...
4
votes
1answer
753 views

How to access vertex_color layer directly from inside BMVert

I want to access vertex colors directly from inside BMVerts, but I don't know how. I am able to access vertex colors indirect for inside BMFaces: ...
13
votes
4answers
8k views

What is the technical difference between an Ngon and a bunch of Triangles?

I read somewhere that Ngons were nothing more than triangles masked as an Ngon. Some testing reveals this is not true, at least to some extent. Here are two sub-surfed cylinders, one with an Ngon, ...
16
votes
4answers
10k views

Efficient way to get selected vertices via python (without iterating over the entire mesh)

What's the best/fastest way to construct a list of selected vertices for a mesh object in python? I want to avoid iterating over every vertex in the mesh if possible, since that seems like a really ...
10
votes
2answers
8k views

How to add a UV Map to a Mesh Using Python

I've made a script that creates a mesh in Blender using a binary file containing mesh data. That works fine, but now I need to get textures on the mesh and I want to create a UV map from the UV data ...
16
votes
2answers
11k views

how to use BMesh to add verts, faces, and edges to existing geometry

I've puzzled about this for a while, but haven't found an answer I understood. This snippet below does add geometry (3 verts and a face) but it also generates an error, Does going to object mode make ...