I have been following the development discussion…
but this matter is quite confusing to me, so I decided to
post this doubts.
What is the future?
Mesh or NMesh?
From the docs I see that NMesh will be discarded…or
…this is what I have understood!!
From my experience I see that NMesh provide a deeper
acces to the raw object, I mean:
in the export routine if an objects has been subdivided
the mesh is exported subdivided.
Using Mesh don’t provide such advantage.
The mesh is exported with the “original” faces.
So, no subdivision.
The new FunBlender (and the Creator versions that I compiled)
gives errors when importing NMesh.
While Publsher accepts both.
So, this make me think that I have to began to think to
count only on Mesh module.
[Post] Posted: Sun Jan 19, 2003 9:01 pm Post subject:
…which module is yet in the PythonAPI?
Well, Publisher got both…FunBlender use Mesh.
And a quick look at the source answer the question.
NMesh.py:
“”"The Blender NMesh module
This module provides access to the raw Mesh data block.
Examples will not be given, as the life time of this module will be
most probably limited. Use the ‘Mesh’ module instead.
“”"
But NMesh and Mesh doesn’t do the same thing…
…from my tests on YaBle I see that exporting using Mesh don’t give the opportunity
to access the same data that I can access using NMesh.
NMesh ->GetRawFromObject()
Mesh?
I would like to know how to export an object with the subdivided faces.
With Mesh I was able to export only the original set of faces…
i.e.
A subdivided cube with NMesh is exported fine.
The same using Mesh is exported “as is” (six faces).
S68 is right, don’t pay much attention to what is in the docs, they were part of plans back then. Besides that it was never completed, parts of the new API don’t work properly, NaN went bankrupt in the midst of development, lots of things were still being tested at that point (with the help of the now defunct ‘BlenderLeague’). Just keep using NMesh, until something ‘official’ comes along.
As for the ‘funblender’, as far as I understand, these are experimental releases, nothing official, so don’t base an entire script on that.
btw, I also have only NMesh in ‘funblender’, not Mesh.
Ok, I hope that other like me that incurred in this mismatch
now get things clear!!
Now it is clear.
Sorry jms…I visit my windows partition only few times…
I tried Fun Blender and changed the import…
I was sure that was NMesh out, not Mesh…
I remembered the wrong module…
OK, LET’S USE NMESH !
I hope that the following lines will justify me!!
These are the funny lines:
from NMesh.py
def GetRawFromObject(name):
“”“This returns the mesh as used by the object, which
means it contains all deformations and modifications.”“”
pass
override all these functions again, because we only used them for
documentation – NMesh will be no longer supported in future
New = _NMesh.New
GetRaw = _NMesh.GetRaw
PutRaw = _NMesh.PutRaw
GetRawFromObject = _NMesh.GetRawFromObject
Const = _NMesh.Const
Vert = _NMesh.Vert
Face = _NMesh.Face
Col = _NMesh.Col
And the one pointed by jms in Mesh.py:
from Blender.Types import NMFaceType
import Blender.Material as Material
These comments in the py modules are probably still from Strubi (Martin Strubel) who was the last person to work on Blender’s Python API.
I guess if you really want to be sure about future plans for the API, ask on blender.org. But I don’t think there are as of yet any concrete plans though, only idea’s as far as I know.