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
10 views

How to delete a face using BMESH.OPS? (SOLVED)

Sorry if the question is asked before, but I tried using the examples I found on StackExchange and it still didn't give me the right mesh. I am trying to create a tube that has a shape of cylinder at ...
3
votes
0answers
15 views

Find texture pixel on 3D mesh

I have a complicated mesh of a real object that I created with a 3D camera. The mesh has a corresponding large texture that maps onto the mesh. I imported the mesh into Blender and then applied the ...
1
vote
0answers
23 views

How to subdivide and calculate volume of an object without using operators

I'm using Blender for an unusual purpose (research) so my issue is probably a bit unusual, and Blender was likely not designed with the flexibility that I may need. I need to calculate the volume of a ...
0
votes
0answers
14 views

visual studio code bmesh gives weird error

i started making scripts in visual studio code for blender a few weeks ago but i ran into a weird problem, when trying to use bmesh specifically bm = bmesh.new() it ...
2
votes
1answer
48 views

How to create cylinder with varying radius at different height

My goal is to create a imperfect cylinder with a script, where some randomness is added to the radius of the cylinder at certain intervals. I am very new to blender unfortunately, and am lost at the ...
3
votes
2answers
132 views

List vertex colors from a bmesh

I'm working on a custom exporter for an external software. I need to get a list of the vertex colors from a triangulated mesh. To get the triangulated mesh I use this code: ...
0
votes
0answers
23 views

Add modifier to object created programmatically using Python API [duplicate]

I have created an object programmatically and want to add a modifier to it too, programmatically. Here is my current code ...
1
vote
1answer
36 views

Collect, apply modifiers, and triangulate meshes before export, without touching the original mesh

I try to export a collection of meshes such that The original meshes is not touched by the exporter All modifiers affect the exported mesh The exported mesh is triangulated It should not look like ...
1
vote
0answers
15 views

How to access/calculate tangent and bitangent vectors from BMLoop via script?

This question has an answer when using MeshLoops: Script access to tangent and bitangent, per face: how? But I'm working with BMLoops to collect vertex data. I haven't yet found a good way to ...
0
votes
0answers
13 views

Does the “diameter” in “bmesh.ops.create_uvsphere” actually mean “radius”?

I created a sphere using bmesh.ops.create_uvsphere(bm, u_segments=32, v_segments=16, diameter=1) but later I noticed the radius of the sphere was 1 grid. As the ...
1
vote
0answers
18 views

How to set loop (ie, vertex-face) normals from bmesh?

I'm trying to set face normals using a bmesh. I'm running this in response to a mouse click in an operator. In the below code, I'm able to run through my loops and set the vertex normals. While this ...
0
votes
0answers
18 views

bmesh How to remove data from the object after the function is performed, just like ctrl + z would do, but after many steps

I want to make a graph. There is a single horizontal line on x axis which is subdivided. I am able to select a particular vertex that I want with a function and bMesh to raise it by 1 unit let's say. ...
0
votes
0answers
13 views

blender shape face angle inside outside measurement [duplicate]

Background: I'm working on an blender exporter python script add-on. I'm processing shapes based on angles between vertices. I'm accessing this angle using: ...
0
votes
1answer
14 views

TypeError: MESH_OT_add_triangle.is_property_set(“location”) not found

I get this error when I add a mesh object to my scene, but I don't know what it means: ...
0
votes
0answers
19 views

Why is this code not capturing the mesh of the armature transformed object

I am trying to capture the mesh of an object modified by an armature. Below is an image of the object before being modified by the armature. The object is parented to the armature using "Armature ...
1
vote
2answers
65 views

Accessing my own mesh class

I'm scripting my own mesh class but don't manage to access to it. ...
0
votes
0answers
20 views

How to find minimal angle between edges?

I'm trying to write a script that will calculate a maximal angle in a given mesh. The problem is that both vertices and edge arrays are not in order. I was trying to use calculate_face_angle() but it ...
0
votes
1answer
24 views

Intersection of objects taking into account plane scale

After having a look at Loop at intersection of two objects (script) was wondering if I could do intersection of plane with mesh taking into account the plane scale... If I use the bmesh as is I get ...
1
vote
0answers
62 views

how to convert shape to volume?

I have a 3d model (.stl) of building and I want to use it in other software. The walls of the model are built with shapes, and I need the walls as volume. There problem is that the model was made by ...
0
votes
1answer
50 views

How can I use bmesh vert index as vertex color index?

I want to modify the vertex color by index, the bmesh vertex index value seems unequal to the colorlayer.data index, so it's difficult to draw a vert with several mesh cross. Is there any to fix this ...
1
vote
1answer
67 views

Python: Locate specific islands of geometry within a mesh object

If I have a mesh object, and the mesh data is made up of several disconnected islands of faces, and using Python I want to evaluate each island to check if it matches certain criteria, and if it does, ...
1
vote
0answers
23 views

Python: Nonsensical edge addresses when using bmesh.ops.create_circle

TL;DR: Two different faces created using bmesh.ops.create_circle have the same edges... sort of? ...
1
vote
1answer
38 views

How can I force mesh to remesh along a polyline?

Sorry if this is a basic question, I am coming from a scientific field and have begun to use blender more and more, and it is just amazingly powerful. But, sometimes I find that to do precision type ...
0
votes
0answers
23 views

How to change the colour of specific faces in a mesh using only scripting?

I am tring to create a script that would change the colour of specific faces of created circle. I have looked up that it is possible using bmesh. The script would have to select one ring of such ...
2
votes
1answer
49 views

Can't texture a plane created using BMesh API

I'm really new to blender (2.9) and I'm exploring its Python API. I'm also comparing the API with the normal GUI tools. At the moment I'm trying to create a textured plane without the use of the ...
1
vote
1answer
101 views

Convert polygons or ngons to quads using bmesh

I have imported an SVG keyboard layout into Blender (2.83), which arrives as filled curves in the XY plane. For each key, after converting the curve to mesh, I have managed to dissolve some edges ...
2
votes
0answers
18 views

Persistence of element tag and select using bound bmesh

For bmesh code I often used tag to flag a visited element. On noticing the tags persisted it was required to "detag" the entire bmesh element collection ...
2
votes
2answers
117 views

How to detect disconnected parts within a selection?

Consider the following edge selection: What would be the fastest way to return the indices of the different parts of this selection? I am aiming for an output similar to this: edge_indices = [[24, 46,...
0
votes
0answers
13 views

Index order after multiple bmesh.ops.subdivide_edges() calls

I'm looping over several meshes. For each mesh I perform several bmesh.ops ...
1
vote
0answers
32 views

Naming object issues

I'm trying to add some items to the scene and rename them but ran into some issues. Example code: ...
0
votes
1answer
48 views

bisect_plane not clearing in python API

Here is my bisect plane command, which does infact produce new verticies along the bisected plane (Blender 2.90): ...
0
votes
0answers
26 views

How to fix my mesh texture is transparent

help me can someone help me here because I am in trouble the textures are not rendering
1
vote
2answers
74 views

Using python to scale/resize a selected groups of faces with individual origin

question based on this topic Using python and bmesh to scale/resize a face in place where each face was scaled separately. So actually the question in the title. I'm newbie to python. I tried to find ...
1
vote
1answer
83 views

Blender crashes from replacing mesh data via script

I'm working on a script that will generate a mesh based on handles (empties) in the 3D interface. So when the user drags a handle it replaces the mesh data, but leaves the object intact. Here's part ...
2
votes
0answers
22 views

Python to get Rgb of mesh faces

This is my first use of Python in blender, although I have had Python experience elsewhere some time ago (Arcpy). I have a mesh object with several faces that has a material calculated for each face ...
1
vote
1answer
47 views

Python api - Rotate selected around vertex using bpy operator

I want to rotate a selected item around a specific vertex like this: vertex.select=true bpy.ops.transform.rotate(value=1) This code basically rotates at the ...
1
vote
0answers
247 views

When to use “.ensure_lookup_table()”?

For modifying meshes (in the hereunder example removing vertices), I use the script as follows: ...
0
votes
0answers
15 views

Top surface multiple face selection

Does anybody have experiences with multiple face selection? I’ve recently encountered this topic, and I am trying to find the best way to select only the top surface with a code. One of my ideas is to ...
0
votes
0answers
10 views

Change edge length using BMesh Operators

I have read some articles about access to the Mesh primitives like edge and vertex, but all those are outdated today for my understanding (such as this). My question is how by utilising python script (...
0
votes
0answers
18 views

How to know if two UV loops are conected using Python?

I know how to get all UV Loops using bmesh, get the mesh vertex and loop uv coordinates and index, select, translate, etc.: ...
0
votes
1answer
37 views

Understanding BMLoops: Does every loop enclose a face?

I'm using bmesh to alter my geometry via python. Now I don't seem to understand loops correctly. I thought that a BMLoop always covers the edges of a face as in it loops around it once. I can manouver ...
0
votes
0answers
65 views

What does Bmesh mean as opposed to mesh in animation nodes mean?

I tried to find the answer on Google and it did not give any answers for me. I also tried on this forum and I did not get any answers here either. So what is the difference between Bmesh and mesh ...
1
vote
1answer
39 views

Change proportion on base mesh

I discovered a video that shows a very quick way to make base mesh (skin modifier as everyone already knows) but it's a timelapse, so there's no explanation at all. In 01:00 he starts to scale vertex ...
1
vote
1answer
87 views

Insert new vertices into face using pyhton & bmesh

I want to add vertices to a face. Can I only do this by redrawing the whole face with bmesh.faces.new(loop_vertices) or can I also just add some to an existing face?...
1
vote
1answer
31 views

Unexpected vertices when looping through meshes in Scene Collection

I would like to loop through meshes in my Scene Collection to find the coordinates of Verts (single points added via Add Mesh Extra Objects addon) or the volume of a mesh (the default Cube). I have ...
1
vote
0answers
39 views

Calculating edges and polygon indices in python numerically to build mesh

I can calculate the vertices and faces but how does one calculate edges and polygon indices numerically in python? ...
1
vote
3answers
195 views

Updating objects parameters using python creates multiple objects

I can update a text curve object when I change the frame and it doesn't create multiple objects but how can I do the same with a mesh object. Code: ...
0
votes
0answers
18 views

Creating / Re-creating the X,Y,Z mesh Surface functions with the (u,v) options using python [duplicate]

Creating / Re-creating the X,Y,Z mesh Surface function with the (u,v) options using python in Blender 2.8x Does an example exist / anyone have an example of how to reproduce the X,Y,Z mesh Surface ...
0
votes
0answers
12 views

Guideline for using mesh(bmesh) library in blender [duplicate]

I am a new blender API/addon developer. I am really bad at the mesh(bmesh) library. Do you guys know any guide or tutorial to use mesh library of blender API? the docs of Blender are really useless. I ...
3
votes
1answer
90 views

What is the bmesh equivalent to bpy.ops.mesh.shortest_path_select()?

Basically I am trying to replace a call to bpy.ops.mesh.shortest_path_select() in an Add-on of mine. While many bpy.ops.mesh ...

1
2 3 4 5 6