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
1answer
30 views

Create cube in bmesh at given position in a efficient manner

I want to create a cube in bmesh at a specific position. How can I accomplish this? I'm interested in as efficient solution as possible btw... there will be A LOT of cubes to create every frame.
1
vote
1answer
28 views

How do I rotate a face around an axis in normal orientation in Python?

I have a set of vertices for a BMFace that I'm trying to rotate around the x-axis but in the face's normal orientation. Currently I'm doing: ...
0
votes
0answers
26 views

How can I get sliced face information after a bmesh bisect?

I want to generate faces from the edges and vertices generated after running the bisect operation on a bmesh. However for non-trivial objects it frequently gets stuck or jumps/misorders the series of ...
1
vote
0answers
11 views

Duplicated vertices created by bmesh.ops.bisect_plane

I want to get a mesh's bisected surface's vertices and edges. I tried to bisect a sphere using bmesh.ops.bisect_plane. ...
0
votes
0answers
21 views

b-mesh area using like particle system

How can I put objects onto a random position of an objects face (or faces) pointing along the face normal axes? I found this here on StackExchange, but I don't understand how to use the area result. ...
4
votes
0answers
105 views

Strategy for script-generating a buckled honeycomb lattice mesh (hex faces) for animating 2D materials?

In this post I show how one can script-generate a square lattice with buckling. By scripting it there's memory of each vertex's identity which can be used later to animate certain behaviors. When ...
1
vote
1answer
46 views

Need to modernize my scripting, this bpy based script from 2.77 doesn't run in 2.92 so I can't post my main question yet [duplicate]

I need to make a custom mesh, don't know how and want to post a question about it. However before I do I want to run an example of something simple. I've been away for several years, this runs on 2.77....
3
votes
1answer
37 views

Color vertex by deformation value in an animation

Hi I have been trying to develop code which shows the amount of deformation on a mesh's edges by coloring the vertices a value which depends on the average change in edge length for the connected ...
0
votes
0answers
15 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
19 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
28 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
17 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
52 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
166 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
34 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
53 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
33 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
18 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
22 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
19 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
14 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
19 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
69 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
26 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
71 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
75 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
94 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
25 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
49 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
28 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
62 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
133 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 ...
3
votes
0answers
21 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
125 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
15 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
34 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
91 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
29 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
83 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
105 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
24 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
66 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
414 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
16 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
11 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
20 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
44 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
86 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
2 3 4 5
7