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
0
votes
2answers
29 views

How can I get a vertex count for an edge loop in Python for Blender 2.8?

I have an object that consists of two polygons. I'm trying to get a vertices count for the first polygon so I can select it's last two vertexes by index. I know that it starts at Index 1. I can use ...
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
25 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
42 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
48 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
16 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.
2
votes
0answers
29 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 ...
0
votes
0answers
15 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: ...
1
vote
2answers
124 views

Help modeling this dome

I am very new to blender and still using 2.78, I have this idea in my head and but can't think of how to model a dome shape with a cross on top if that makes sense. I attached a sketch of how I want ...
0
votes
1answer
52 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
29 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 <...
1
vote
2answers
41 views

BMesh: Accessing edges of created mesh

Let’s say I created a bunch of these cones in my_bmesh object: c = bmesh.ops.create_cone(my_bmesh, segments=8, diameter1=1, diameter2=1, cap_ends=True) Is there ...
0
votes
1answer
43 views

How to scale plane 2d with bmesh and floatproperty in ui?

THe classic method of scale 2d object is like to ...
1
vote
1answer
30 views

Creating bmesh from an object: why is scale ignored?

I notice that when you create a bmesh from an object using bm = bmesh.new() bm.from_mesh(obj.data) the scale of the object is ignored, in the sense that you get ...
0
votes
0answers
37 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
45 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
15 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 ...
1
vote
1answer
48 views

Select multiple vertices using a list of coordinates with KDTree

I want to select (or to put into active selection) some vertices using their coordinates so I've seen an answer there : Automatic select vertices by given coordinates But it only works when I'm in ...
0
votes
0answers
51 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
1answer
24 views

Way to get vertex index to use in new vertex group from selected faces

I try and not undertand if i am on the right way, that code i want to set the select faces, make a vertex group, this is a piece of code: ...
2
votes
3answers
67 views

Mesh reverts back to the state before the script was run

I created a script (operator) that converts a selection of quads into a diamond pattern. It works fine but when I try to Inset the newly created selection and change any of the options (like ...
0
votes
0answers
11 views

How to get list of vertices edges, which border on 2 or more different types of material / uv in bmesh? (2.79)

I try to find that in the api ,but I couldn't find. I try with the bmesh.ops.dissolve_limit method, but not work fine ,does not save all the borders bordering with ...
0
votes
1answer
245 views

Setting mesh's origin in python (2.8)

If I create a cube, the origin is originally at the center of mass. I know how to move the origin to the center of one of its faces using the interface, but how can I do the same thing via Python?
1
vote
1answer
33 views

Bmesh bevel is inverted

This looks cool and all, but it's beveled in the wrong direction. How can I flip the direction it bevels, so it looks more like a rounded cube, rather than a rounded plus-sign? ...
1
vote
0answers
30 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'...
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
24 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 "...
1
vote
1answer
32 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 ...
3
votes
1answer
173 views

Align Object A to Object B to their respective active faces with python

i want to Align two objects depending on their active faces like in this gif below didn't find any answers but only this clue below from this question: Align to face normal vector but it only align ...
0
votes
0answers
24 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
1answer
69 views

how can i quickly optimize this mesh out from a curve?

this is a hair that i have done for my character there, so its made out from a curve, after convert it to mesh, it gave me too much verts or poly count, i need to optimize it, i tried the unsubdivide ...
0
votes
0answers
31 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
40 views

BMesh create rotation

I am creating a bmesh from a list of points in 3d space (e.g. a circle): ...
1
vote
1answer
39 views

How to create a list containing lists of bm.verts based on their deform layer (vertex group)?

I have been struggling with trying to find a way to do this. It's related to my previous efforts here: How to get list of bm.verts that belong to a deform layer? When I do this ...
0
votes
1answer
36 views

I Can't Create a Face from Several Circles

Just like the problem appears in the image, I want to make a face triangulated around all circles. Instead, a face is created that overlaps everything I selected. What its the technique to join all of ...
1
vote
1answer
96 views

Finding a specific face/vertex/edge based on position value, not indices value

[Looking for answers possible via python] Hi everyone! I'm trying to select a face/vertex/edge based on location rather than selecting it based on its specific index. After the specific face/vertex/...
0
votes
1answer
154 views

Change circle segment depends on diameter

I want to program a tool for checking radial parts of a mesh. The idea is: You push a button, the scripts add an object (circle) to the scene. Then you grab it place it and when you scale this circle ...
0
votes
1answer
47 views

How to get list of bm.verts that belong to a deform layer?

I have a previously assigned Vertex Groups on my object. After creating the bmesh, if I understand correctly that Vertex Group should now be ...
1
vote
0answers
143 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
44 views

Should I convert my quad mesh to triangles? If so, can I do it in this script?

I have topographical data which is height on a square lat/lon grid and I've generated a mesh with the script shown below. My polygons are all quadrangles (close to, but not quite squares in this case) ...
0
votes
1answer
80 views

Overlapping faces : how to create new faces (interception and complements) with Python API?

Suppose I have a mesh with two overlapping faces (in general, all vertices are different): ...
0
votes
0answers
18 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 ...
1
vote
1answer
129 views

Bmesh : how do I keep track of vertices in edited topology?

I'm trying to write a script to bisect Ngon rectangles, horizontally or vertically, at a given percentage of the distance along their sides. (The sides may consist of more than one edge). Some of the ...
0
votes
1answer
29 views

Delete components script crashes

I wrote an addon that removes components (using BMesh) depending on the context of the selection. The problem is that he crashes a Blender. I cannot establish a pattern, but most often this happens ...
0
votes
1answer
86 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 ...
3
votes
2answers
44 views

Argument values in `bmesh.ops.similar_verts()`

Can someone please help me understand the values for the arguments in the function bmesh.ops.simlar_verts(bm, verts, type, thresh, compare) I understand that: <...
1
vote
1answer
193 views

How to update Blender's naming index thing (.001, .002, etc.) after joining objects

I've been trying to reuse certain parts of code as functions in my bpy scripts. But that means that the same bmesh will be created as 'my_bmesh.001' the next time I run that function. To deal with ...
0
votes
0answers
59 views

What happened to my straight lines in 2.8?

I modeled these letters in 2.7 no problem. I just brought them into 2.80 and the straight lines have this "back forth" look along the geometry. The normals are all outside, I tried to re-do the ...
0
votes
0answers
23 views

Python bmesh.update_edit_mesh() doesn't work as I expect

I've been doing something like: cube = bmesh.ops.create_cube(bm) bmesh.update_edit_mesh(mesh) print(mesh.vertices) The return is ...
0
votes
0answers
43 views

How select Material Slot with one active face in python

hello guys i have a problem by selecting the material slot. when selecting the material slot, has no active Face... how can i make him select an active Face under the selected Faces ?