Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Blender's new mesh system that was added in 2.63, with full support for N-sided polygons instead of only triangles and quads.

1
vote
2answers
7 views

How to remove dead BMVerts from a list?

I am trying to fix a bug in my script that happens in rare instances. I believe the bug occurs due to the very last thing the script is doing, which is: ...
0
votes
2answers
18 views

How to determine whether my bm.select_history.active is a BMVert, BMFace or a BMEdge?

I am trying to write a conditional statement for my script. If the user has one Active Edge Selected, then the script will run. Otherwise it won't. I know that if I have an active edge, then bm....
0
votes
0answers
40 views

How to work with Bmesh correctly?

I'm writing a window generator script. Here is a current version of my script: https://gist.github.com/romanvolodin/3bfd349795443118a2298819349a0b3c Windows config: https://gist.github.com/...
0
votes
1answer
15 views

bmesh.ops.scale how to scale vert selection relative to active edge, but not along the edge vector?

I am looking into vectors and matrices but don't yet understand how I could achieve one of my goals for a script I'm making. I want to use bmesh.ops.scale() and scale selected verts relative to my ...
0
votes
0answers
27 views

Modify skin radius using bmesh

this might be a very basic question. I am trying to modify the skin radius using a bmesh command. The index of the vertex is known. I just wonder what the bmesh command is to access the skin radius ...
1
vote
2answers
62 views

Python: Bisect mesh into n parts, without separate 'LOOSE'

Using Python I want to split a mesh into tiles. All the solutions to this question rely on bpy.ops.mesh.separate(type='LOOSE'). But this leads to problems in the ...
0
votes
1answer
23 views

Types of Edges In a Triangulated Mesh

I added the triangulate modifier on a mesh and then applied it. For this mesh in edit mode, I see two types of edges, thick bright ones from the original mesh and thin black ones, newly created by the ...
0
votes
0answers
34 views

List of contiguous faces of bmesh

Is there a way to get the list of the connected faces of the bmesh in their connection order? In other words, if I start from any random face within a continuous bmesh I should get the list of all the ...
0
votes
0answers
24 views

Imitate the F hotkey in python (create face from vertices)

I have a bunch of vertices that i want to connect as a face in python. I managed to do it using the F key in GUI mode, achieving this result: I tried doing the same thing in python using this line of ...
0
votes
1answer
20 views

Getting BMesh Face Index from UV Face Index

I want to iterate over the square blocks of the UV map from left to right (and then top to bottom) and find the index in bmesh of the face(s) contained in each of the block (one block can contain ...
1
vote
1answer
47 views

How to add vertices into specific vertex roups

I have an xml file which contains a list of objects in space ("sectors") each sector has a list of more objects ("seats") which can be the same model or not. For each "sector" I create an object and ...
0
votes
0answers
20 views

bmesh.ops.extrude_face_region leaves a face behind, why?

I am running blender 2.79, this has burned a lot of my time today trying to figure this out. I have a couple function calls ...
1
vote
1answer
27 views

Convert a mathutils.Vector object into 3D coordinates

I've been working with both Python and Blender for the first time over the past few days and keep running into these mathutils Vector objects which I have no idea what to do with. I can't figure out a ...
2
votes
1answer
34 views

Adding multiple shape keys with python and bmesh while creating a mesh

I'm using a python script to generate mesh geometry and to add multiple shape keys in Blender using bmesh. The goal is to have 10 shape keys and each generated vertex is modified by just one of those ...
0
votes
0answers
40 views

Knife tool with bmesh API

I need to find the intersection curve between two (open) meshes, and I can do that interactively with the knife tool. In search for a way to do it from a script, I came across the following highly ...
1
vote
1answer
61 views

Extrude in python

As in title, I'm trying to extrude mesh via python as I have ~1.5k objects to extrude and when I do it in editor it works perfectly but when I run it via python it always go wrong. It just move face ...
2
votes
1answer
41 views

Is it possible to deselect element but keep it active?

In this question I found out uses for being able to deselect the active object. You can basically use the active-but-unselected object as a transform pivot point for the rest of the object selection ...
2
votes
0answers
173 views

Separate mesh into separate batches with python

I am working on an export / import addon for a custom model file format which stores its geometry in the so-called "render batches", the structures aimed at optimizing geometry for effecient live ...
3
votes
1answer
81 views

How to find a mesh loops and rings

I'm trying to find a clear, safe, simple explanation to the ring and loop madness. I select an edge: Then I run this script: ...
0
votes
0answers
193 views

Find boundary coordinates of a set of mesh points

I have a set of bmesh verts created like: import bmesh # ... bm = bmesh.new() # ... bm.verts.new(...) I intend to have all ...
0
votes
0answers
38 views

Find mesh verts relative to a base point

I have the following verts on a bmesh: The verts are created like this: ...
0
votes
1answer
109 views

Boolean creates a hollow object

I am trying to carve out some wear lines on a bullet, from where the barrel of a gun would cut into the metal. I am using a boolean modifier on the bullet, set to difference. It cuts into the object ...
1
vote
1answer
144 views

Navigate the disk cycle, like you can navigate the loop and radial loop cycles in bmesh?

So, in bmesh you can navigate the loop cycle via loop.link_loop_next loop.link_loop_prev You can navigate the radial loop cycle via ...
0
votes
0answers
17 views

Python plugin - Identify faces properly

This is a follow up from this question: Will vertex indices change? In that thread is was established that the index of a vertex is not a reliable identifier. Then in the comments this question was ...
0
votes
1answer
36 views

use python to randomly inset each face, bmesh?

I would like to create some interesting shapes with a script. I'm still pretty new to python and I'm having trouble understanding how to get BMesh to behave the way I want. Here is what I'm trying to ...
2
votes
0answers
14 views

split edge at multiple points without distorting uv or other data

Here's a bmesh edge: +-----------------------------+ Say I want to cut it at multiple points, in the middle and 3/4 from the end like so: ...
4
votes
1answer
100 views

Is there a way to clear sharp edges using bmesh in python?

I'm trying to speed up an addon that had to toggle into Edit Mode for sometimes thousands of object by staying at the object level using bmesh instead of ...
0
votes
0answers
49 views

bmesh.ops.bisect_edges interferes with my list of verts

I am trying to subdivide a face, using bmesh.ops.bisect_edges, followed by bmesh.ops.connect_verts. I collect a list of vertices, before subdividing further, but after I use bmesh.ops.bisect_edges ...
1
vote
0answers
28 views

How to find the distance from a face of one object to the surface of another object, along the face's normal

I feel like this has probably been answered, but I searched and couldn't find an exact solution. What I want is a quick way to take a selected set of faces on an object (or the vertices that make up ...
0
votes
0answers
26 views

How to select geometry below a bmesh bisect line using python?

I'm not overly experienced in python and could use some help. I've been looking for this answer and tried many things for several hours. I'd like to make a little clipping tool using bmesh.ops....
0
votes
0answers
18 views

Bmesh equivalent of detail_flood_fill

I love the sculpt tools "detail_flood_fill" and "simplify_brush" as a way to evenly distribute triangles at a particular resolution. This helps me with some metaball based modelling, giving me a ...
1
vote
0answers
31 views

bpy.ops.bridge_edge_loops() vs bmesh.ops.bridge_loops()

Why is the bmesh bridge tool so limited? There's no argument to control segments(number_cuts) and no argument to control interpolation. Am I missing something? I was under the impression the bpy ...
1
vote
1answer
70 views

How do you select an edge loop with BMesh?

Can someone please explain to me how I go about selecting edge loops in BMesh? I'm new to Blender scripting and am venturing into BMesh but I can not figure out how to actual select an edge loop. Let'...
4
votes
2answers
899 views

How is possible to create a tetrakaidecahedron? How can I keep only the edges?

The idea I have is to start from the tetrakaidecahedron, have the edges and create something organical as the photomicrograph below. Photomicrograph of open-cell foamed urethane
0
votes
1answer
200 views

There is a way to add custom split normal use Python API?

I can't find a way to achieve custom split normal effect. I want to use python (mesh normal/hard edge or soft edge) data collected from Maya then write to Blender mesh. How to do it using the ...
1
vote
1answer
25 views

Scripting: separating selection results in edgeless mesh

Whenever I use a script to separate a mesh by means of a selection the separated mesh contains no edges (only vertices). In contrast, separated meshes always contain edges when either manually ...
0
votes
1answer
133 views

How to use “bmesh.ops.subdivide_edges” on selected edges

I need to cut an edge into equal parts via script. Using the standart subdivide is out of question because i will need more then 100 cuts (und using subdivide several times to achieve this is not ...
0
votes
0answers
34 views

bpy.ops.transform.resize different when manually scaling and scaling with code

I'm trying to scale vertex groups using bpy.ops.transform.resize to make the vertex group a certain measurement. However, I've found that my code results in an incorrect output when compared to ...
0
votes
0answers
21 views

Why is my bmesh script not moving the vertices?

I am learning bmesh. The example given in the doc works well. But my code below does not. It returns no errors and the Cube object does not move. Any advice greatly appreciated! ...
1
vote
1answer
117 views

Can you extrude a mesh like a 'stroke'?

In a 2D app like Photoshop or GIMP, you can add a stroke to an object, and an outline is created for it that's of even distance around the shape. I want to do this for an irregular mesh in Blender. ...
0
votes
0answers
31 views

bmesh from_mesh doesn't work after undo

I have a modal script whereby I am letting the user create a mesh click by click. Each click creates a vert and, if appropriate, an edge joining that vert to the last vert. I would like the user to ...
0
votes
1answer
429 views

How to create edges in existing mesh based on a list of vertex indices with Python

I parse 2 csvs, one with vertex coordinates id,x,y,z,r,g,b 0,0.30778491,0.12740749,0.04903458,174.0,84.0,118.0 1,0.3315943,0.0922608,0.08094925,174.0,84.0,118.0 ...
0
votes
1answer
162 views

trying to create a bmesh from csv coordinate list

Hello fellow Blender snakehandlers, I have a list of coordinates in a csv file and I would like to create a mesh with only vertices from it. When I run it, it throws the following error, which I can'...
0
votes
0answers
68 views

How to obtain sequence of selected UV in Python?

Sorry for continuous post from below post. This question is related to it. How to obtain selected UV pairs on same edge in Python? I want to obtain sequence of selected UV in Python. But I did not ...
1
vote
1answer
66 views

How to obtain selected UV pairs on same edge in Python?

I have a problem about Python scripting in Blender. I want to get selected UV pairs on same edge and write below code. ...
0
votes
0answers
47 views

How to hardcode mesh objects as python variable declarations

I am doing an addon, and I need to load constantly some premade objects to reproduce and edit it, I through that making the data directly avaliable from python would help to build fast bmesh variants. ...
1
vote
0answers
39 views

How do I remove the original faces when extruding with Bmesh?

I followed this and ended up with a closed mesh. ...
1
vote
1answer
65 views

Can I permanently change some default settings like inset size, remove doubles threshold, new mesh size?

Ver. 2.79. I was hoping I could change some annoying settings by just editing some of the .PY files bundled with blender. Especially default inset amount. Maybe it's not that easy. But for example, I ...
0
votes
1answer
1k views

Create a UV Sphere / Object in Blender from Python

Referencing to this code: Create a Cube in Blender from Python ...
0
votes
0answers
100 views

How to create a new mesh from a subset of faces from an existing mesh?

I have a python method that extracts a specific subset of faces from a given mesh into a list, so that I have a bunch of faces from a given bmesh. How would I go ...