[Bf-python] Creating a simple mesh (b2.55) - Nicer methods than from_pydata?

Campbell Barton ideasman42 at gmail.com
Fri Jan 7 04:39:05 CET 2011


mesh.from_pydata() was added because it means you dont need to assign
values to arrays yourself with foreach_set() funcs,
its easier to pass the lists to create the data.

Can you suggest how a nicer function would work?

The problem with mesh creation is you are modifying blender data
directly, and its very easy to leave the mesh in an invalid state.

So to avoid attempting to create a mesh construction api as we had in
2.4x which didnt end up being all that nice either (had its own set of
glitches and annoyances).
Since we may have bmesh/ngons in a future release I rather not spend a
lot of time on writing api's that we may need to throw away when bmesh
is merged.

On Thu, Jan 6, 2011 at 8:09 PM, Philip Gillißen <guerda at freenet.de> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Stephen!
>
> Thanks for your fast reply!
>
> Am 06.01.2011 19:59, schrieb Stephen Swaney:
>> The mesh data structure is essentially a list of vertices and
>> lists of which verts make the edges and faces.
>>
>> Perhaps you could explain exactly what you mean by 'a nicer way'?
> I don't know how to determine the correct sequence of the single
> vertices. In my application, I only know the vertices, but not, how they
> are connected. The array the method accepts needs the correct order of
> vertices otherwise, the faces aren't correct.
>
> Are there any methods/tricks whatever to determine the order in a
> "intelligent" way?
>
> Greetings, Philip
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk0mIZEACgkQYNYFUFLXAD0QzgCghn33IGxAKnTn6LYg5knDnPi4
> Bv4An0+dzGrwxqUwb5D46+6AgyHecfnx
> =QrxG
> -----END PGP SIGNATURE-----
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://lists.blender.org/mailman/listinfo/bf-python
>



-- 
- Campbell



More information about the Bf-python mailing list