We’re rewarding the question askers & reputations are being recalculated! Read more.

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.

74 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
40 views

Getting Color Values Produced by Dynamic Paint

I am having trouble with the python code to get the colors of vertices when using Dynamic Paint. If I try painting a cube using the Vertex Paint mode I can get the rgb values of the vertices using the ...
3
votes
1answer
306 views

How do I grab the active texture on a face in python?

So I'm pretty much done with designing a script to export meshes I (or others within my group) make in Blender for use in another piece of software (VoxelStudio). Everything has been slow going due ...
3
votes
1answer
285 views

How to subdivide concave face into quads

I'm aware of bpy.ops.mesh.vert_connect_concave() and the result is similar to what I'm looking to implement. However, with ...
2
votes
0answers
32 views

bmesh from_edit_mesh points to old dead bmesh after free

I've been struggling with a bmesh problem for a while now and I can't wrap my head around it. When I free my bmesh data and try to make a new bm instance with the same object, it points to the old ...
2
votes
0answers
92 views

Python: bmesh.verts not loading all vertices of mesh

As the title says, I am using bmesh.verts to load in all the vertices of a mesh to then check if their coordinates are within a certain box, and if they are select them. The problem is that the ...
2
votes
0answers
297 views

Separate mesh into separate batches with python

I am working on an export / import addon for a custom model file format which stores its geometry in the so-called "render batches", the structures aimed at optimizing geometry for effecient live ...
2
votes
0answers
17 views

split edge at multiple points without distorting uv or other data

Here's a bmesh edge: +-----------------------------+ Say I want to cut it at multiple points, in the middle and 3/4 from the end like so: ...
2
votes
0answers
176 views

Why is mesh.from_pydata resulting in segmentation faults?

I have vertex and face data loaded from a cube that was subdivided many times, with a total of 26138 vertices and slightly fewer faces. I am loading the object in a script, and whenever I try to load ...
2
votes
1answer
62 views

Bmesh: Immediately encounter strange error after adding new layer and running bmesh op

The script is simple: ...
2
votes
0answers
371 views

Unwrap mesh with spherical projection in python

I would like to have the same result with python as in the UI when I do unwrap > sphere projection on a mesh. I know it's possible to use the operator ...
2
votes
0answers
180 views

Shrinkwrap with ray_cast isn't accurate

I'm trying to create my own similar Shrinkwrap-Modifier with raycast. Unfortunately the result isn't accurate and I don't know why. It work's with Spheres, all other primitives are inaccurate. ...
2
votes
0answers
520 views

BMesh Grid Fill doesn't work on closed edge loop

I've been trying to automate the task of deleting the ngon cap on the end of a cylinder and replacing it with quads using the Grid Fill tool. Something similar to this: I'm using this script: <...
2
votes
0answers
237 views

Mark Seams on Edges of Camera View

I am trying to write a script to mark a seam on an object around the vertices of the object that are in the field of view of the camera. Unfortunately, some of my ...
1
vote
0answers
33 views

Is there any XOR option for Boolean Modifier?

Let say we got two object, I want to get the sum of the difference for calculating error between two meshes. As the sum of red and blue area following image showed: Somehow the Boolean Modifier doesn'...
1
vote
1answer
37 views

Reverse armature deformation on vertex in python

I have a mesh with armature modifier (active+posed) and wish to do some modifications with vert coords (after armature deformations) saved in shape key on that mesh. But currently it seems not ...
1
vote
0answers
170 views

Rotating selected vertices around given point using a matrix? (python, bmesh, modal, without bmesh.ops.rotate)

Is there a way to rotate bm.verts around a given point (another vertex, cursor etc) by multiplying v.co with Marix.Rotation and not using bmesh.ops.rotate? Like this: ...
1
vote
1answer
40 views

How to get “bpy.ops.mesh.select_more()” working for a bmesh?

When I select some meshes of my object by hand or with a script, the selection of some meshes "fades out". With "Select - Select More/Less - More) I can select these mesehs, too. But with a script I ...
1
vote
0answers
91 views

Detecting mesh overlaps of objects inside another object

How can we detect the overlap between two objects one has been placed inside the other? I'm writing a placement algorithm and it seems regular BVH mesh overlap doesn't work for this case. Is there a ...
1
vote
0answers
45 views

How to find the distance from a face of one object to the surface of another object, along the face's normal

I feel like this has probably been answered, but I searched and couldn't find an exact solution. What I want is a quick way to take a selected set of faces on an object (or the vertices that make up ...
1
vote
0answers
57 views

bpy.ops.bridge_edge_loops() vs bmesh.ops.bridge_loops()

Why is the bmesh bridge tool so limited? There's no argument to control segments(number_cuts) and no argument to control interpolation. Am I missing something? I was under the impression the bpy ...
1
vote
0answers
68 views

How do I remove the original faces when extruding with Bmesh?

I followed this and ended up with a closed mesh. ...
1
vote
0answers
221 views

Calculate a surface by checking if meshes intersect

In addition to this unresolved question, I would like to add another problem: The main problem is that I made a few hundreds of random non overlapping circles that belong to the same mesh object, and ...
1
vote
0answers
484 views

Edge Loops and Python. Enumerating and Analysis

Does Blender Provide any Edge Loop identification in Mesh or BMesh? If yes, what is the link or document that describe such support? Showing edge indices of a selection. Image Above. Crude Console ...
1
vote
0answers
34 views

Tris inversion from OpenGL rendering to blender internal

I create a plane, made of 2 tris, and move up one vertex to highlight the presence of the tris. Why if I switch to blender internal renderer the tris are reversed ?
1
vote
0answers
740 views

How can I change the resting position of a rig from T-pose to A-pose

The avatar is in a T-Pose and the weighing etc. works, but I want to put it in an A, standing position so that I can more easily create clothing for it. But whenever I reposition the rig, the weights ...
1
vote
1answer
400 views

BMesh and Bevel

I'm trying to perform a bevel operation using the bmesh API. My script either crashes blender, with the error message EXCEPTION_ACCESS_VIOLATION, or it doesn't do ...
1
vote
0answers
57 views

Merging 2 BMVert's with Python

Is it possible with bmesh to specify merge together 2 BMVerts easily? Or must I do it the manual way and delete faces, remove vertices, and recreate faces at the ...
1
vote
0answers
163 views

Exclude specific vertices from selected vertices

I have a mesh, and i use 'select boundary loop' to select all the vertices on the outline of my mesh. after that i need to exclude from this selection some vertices from a list of vertices stored in ...
1
vote
1answer
259 views

Knife tool with bmesh API

I need to find the intersection curve between two (open) meshes, and I can do that interactively with the knife tool. In search for a way to do it from a script, I came across the following highly ...
0
votes
0answers
26 views

Get Face Angle values info via python

I would like to get face angle information (same information you can see when "Mesh Display->Face Info: Angle" is enabled. I want to loop over the mesh to find triangles that fit certain angle ...
0
votes
0answers
18 views

How to retopolgise game character made of separate meshes with difficult to reach areas

I can't figure out how best to retopologise a character for a game engine when the character consists of multiple parts. Correct me if I wrong but I believe for a game engine such as unity my ...
0
votes
0answers
13 views

Select faces inside selected edges?

How could I do this with bmesh maybe? I need to select faces inside selected edges. This works only 50% of the time and I need it to work 100%. I'm currently selecting the weighted edges then ...
0
votes
0answers
26 views

Mesh shapes keeps changing while rigging

I have checked everything like double vertices but while mesh still keeps on changing its shape when I am trying to change the rotation of bone. Why the mesh is not retaining its shape? UPDATE- I ...
0
votes
1answer
45 views

Mesh is Grey after adding an Image/Texture to a material

I need some help making a mesh colorful. The image I add to a material does not show up on my mesh. A snippet of the code is below ...
0
votes
0answers
106 views

Blender 2.8 (Python) - how to put mesh into edit mode

For this line of code: bm = bmesh.from_edit_mesh(mesh) I am encountering the error 'ValueError: The mesh must be in editmode' I am not certain how to fix this ...
0
votes
0answers
17 views

Particle distribution map from cycles material data?

any ideas on how to translate cycles material to a texture/vertex distribution map ? it's for biome scattering. Preferably a non destructive way by not baking anything Best Answers will be rewarded.
0
votes
0answers
19 views

Building Object, Mesh, and UV Map with Python

I am trying to learn how to create new objects from vertices and face data and also include a uv map. I used the following code: ...
0
votes
1answer
57 views

Calculate Faces from Point Cloud with Python

I have a bunch of vertices in a point cloud stored in an obj file (i can change the file if need be). How do I calculate the faces from the point cloud using python? Example: ...
0
votes
0answers
30 views

BMesh: Bridge edge loops missing arguments

I'd like to connect two cylinders in bmesh using bridge edge loops. However, the bmesh.ops.bridge_loops function differs from <...
0
votes
0answers
42 views

Adding vertices to a BMesh

I am trying to create a face using bmesh. I am doing it by adding vertices to the mesh in for loop. V_r contains the list of vertices ...
0
votes
1answer
52 views

How can we remove overlapping edges?

I am cleaning up a friend's model and often run into this problem: Often, there are multiple edges of various lengths overlapping along the same line. Below is a visual example: ...that overlap to ...
0
votes
0answers
19 views

Blender Python Bmesh Shapekeys

I'm currently trying to create an importer, and i'm trying to create the meshes completely via the BMesh module. Adding vertices and faces works perfectly fine so far, but for some reason, after ...
0
votes
0answers
55 views

Blender python subdivision problem: mistake or bug?

I've been working on a python script in Blender (2.8) and so far everything's been going fairly smoothly, except for an infuriating problem I encountered yesterday. It seems that the 'bpy.ops.mesh....
0
votes
0answers
25 views

bmesh.ops.dissolve_limit trouble about “delimit” option with set in 2.79

I checked the api for this but I have to say that what I'm looking for is poorly documented: Limited dissolve have 5 options with multiple selection blender 2.79 : Normal, Material,Seam, Sharp, UVs in ...
0
votes
0answers
25 views

bmesh.ops.dissolve_limit not work fine?

I tried to emulate "limited dissolve" with bmesh, but it behaves differently from the various parameters in blender 2.79, delimit mode (in 2.79 with integer value and in 2.8 with string) Result by "...
0
votes
0answers
25 views

How to know if certain co-planar faces in Blender form a circle to apply quads later on?

I can get a set of co-planar faces from any mesh. Some of these co-planar faces form a circle while most of them do not. I eventually want to know which faces are forming a circle using Python, so ...
0
votes
0answers
35 views

Add faces to a mesh to make it solid with python and bpy

Basically what I want to do is subdividing a mesh in a lot of smaller meshes, all of them sharing the same the bounding box dimensions. Using bmesh.ops.bisect_plane...
0
votes
0answers
43 views

BMesh create rotation

I am creating a bmesh from a list of points in 3d space (e.g. a circle): ...
0
votes
0answers
19 views

Regular Bmesh operators

I'm new to Bmesh and Blender in general, but I would like to know if there's an equivalent for the knife tool in Bmesh. Long story short, I want to do a very regular mesh over a mesh plane; only ...
0
votes
1answer
93 views

Boolean on two simple bmesh

I'm a newbie in blender and I'm trying to play around with the boolean difference modifier. I have two concentric disks and I want to perform the boolean differece between them. I'm using the python ...