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
0answers
39 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
106 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
56 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
74 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
86 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
103 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
51 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
149 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
49 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
43 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
22 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
69 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
557 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
31 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
29 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
129 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
51 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 ...
1
vote
1answer
97 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
2answers
1k 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
58 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
33 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 ...
1
vote
2answers
185 views

merge vertices at center bmesh

I have a script that makes 2 circles extrude them then bridge loop them and finally solidify. After solidify is done I noticed that the inner vertices are overlapping instead of merged. (See ...
0
votes
1answer
75 views

Select vertices, edges, faces of individual objects

I add 1 circle using this code ...
1
vote
0answers
49 views

How can I run Bmesh ops interactively inside an operator with a popup?

I would like to add some bmesh operators to one of my operator class. The operator has pop up menu invoked by return wm.invoke_props_dialog( self) so the values are ...
0
votes
1answer
140 views

best way to select edge to use bmesh.ops.bevel

I would like to bevel some of the edges of my object. I tried this code (works but is not consistent) ...
0
votes
1answer
149 views

Python Script - Addon; Bmesh Clean

I've purchased an Addon called 'Bmesh Clean' which basically systematically cleans up any selected mesh. I'm trying to write my own script that will automate a process, which will include using the ...
1
vote
1answer
25 views

how to symetrize a part of the mesh in its normal orientation/position in edit mode?

how can i symmetrize this mesh in this position? i mean to do it by the median point and by the normal orientation rather than local or global transforms orientation, in this case in the X axis in ...
1
vote
2answers
103 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
67 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 ...
1
vote
0answers
174 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
173 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
154 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
392 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
40 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 ...
1
vote
1answer
151 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 ...
2
votes
0answers
744 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 ...
2
votes
0answers
97 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 ...
1
vote
2answers
147 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
333 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: ...
1
vote
2answers
115 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
108 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
156 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
2answers
2k 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 ...
1
vote
1answer
159 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
131 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....
1
vote
1answer
73 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
81 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 ...
1
vote
1answer
1k 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
95 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? ...