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
2answers
20 views

Get bmesh and list of vertices

I try to get the are_inside function working from: https://blender.stackexchange.com/a/80781/21443 No matter what I try, I just get new errors. My scene is as ...
0
votes
0answers
14 views

How to average the normals of mesh to corner angles using Bmesh

I am trying to do the same as bpy.ops.mesh.average_normals(average_type='CORNER_ANGLE') but using Bmesh instead, since Bmesh doesn't have a command for this i thought i would have to edit each vert ...
0
votes
0answers
18 views

Blender Script: How can I replace one vertex of a face?

I am writing an exporter addon for Blender 2.79 and I would like to know if it's possible access a face by script and replace one of its vertex by some other. One solution that I found is creating a ...
1
vote
0answers
13 views

ensure_lookup_table creates indices in random order?

I have a python script that creates a sphere, then randomly selects a face and extrudes it. This creates new geometry and deletes the old geometry, so I need to call bm.faces.ensure_lookup_table. ...
0
votes
0answers
36 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
19 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
2answers
44 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
14 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
153 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
18 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
34 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
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: ...
1
vote
2answers
125 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
63 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
35 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
51 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
46 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
36 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
47 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
56 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 ...
1
vote
1answer
53 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
60 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
1answer
373 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
35 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
36 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
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 "...
1
vote
1answer
41 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
238 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
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
1answer
85 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
37 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): ...
1
vote
1answer
43 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
39 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
135 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
157 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
60 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
203 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
86 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
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 ...
1
vote
1answer
158 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
30 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
100 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 ...