Search found 6 matches

by ssontech
Wed May 22, 2013 5:15 pm
Forum: Python
Topic: Mesh building with Tessfaces and tessface_uv_textures
Replies: 9
Views: 3054

mshobj = bpy.data.meshes.new('myObject') mshobj.vertices.add(len(coords)) vertices_flat = [f for v in coords for f in v] mshobj.vertices.foreach_set("co", vertices_flat) del vertices_flat nbr_faces = len(faces) mshobj.polygons.add(nbr_faces) mshobj.loops.add(nbr_faces * 3) eekadoodle_faces = [] for ...
by ssontech
Tue May 21, 2013 1:09 am
Forum: Python
Topic: Mesh building with Tessfaces and tessface_uv_textures
Replies: 9
Views: 3054

"maybe use bmesh module instead" --- LOL! I would do that, if there was something that told me how. I don't have a couple days to waste figuring something out that worked fine before. I need a piece of code that does what I said above. It was, and should be, simple. Other people are looking for it t...
by ssontech
Tue May 21, 2013 12:37 am
Forum: Python
Topic: Mesh building with Tessfaces and tessface_uv_textures
Replies: 9
Views: 3054

Adding new stuff was necessary, but breaking the old stuff is less obvious. What I'm doing is quite the common case. I've seen those docs, they aren't particularly helpful. They just say... use this not that, but not what the details of using this are, and there's substantial hidden undisclosed fine...
by ssontech
Mon May 20, 2013 8:37 pm
Forum: Python
Topic: Mesh building with Tessfaces and tessface_uv_textures
Replies: 9
Views: 3054

Mesh building with Tessfaces and tessface_uv_textures

I'm trying to build a mesh with UV texture coordinates from python, continuation of http://www.blender.org/forum/viewtopic.php?t=25915 I'm trying to get the tessfaces to work. I don't get any error messages now --- or mesh for that matter. What's the right incantation to make this work? I've wasted ...
by ssontech
Thu Dec 13, 2012 7:21 pm
Forum: Python
Topic: Creating Meshes with UV from Python
Replies: 3
Views: 2186

since 2.63 (bmesh), there can't be uv1-uv4 anymore, as each face can have unlimited number of vertices (ngons). Therefore, the API and the internal data structures changed. Have a look at the official import scripts Yes, I know the data structures have changed and have seen those documents and a nu...
by ssontech
Thu Dec 13, 2012 12:06 am
Forum: Python
Topic: Creating Meshes with UV from Python
Replies: 3
Views: 2186

Creating Meshes with UV from Python

I have an existing data-transfer script for recreating meshes inside Blender using Python.... a script creates these scripts. It applies UV coordinates to the vertices from a pre-built texFaces array using the following code: texFaces = [ [[0, 0], [0.04166666667, 0.08333333333], [0, 0.08333333333]],...