diff options
author | Willian Padovani Germano <wpgermano@gmail.com> | 2003-07-31 01:15:41 +0400 |
---|---|---|
committer | Willian Padovani Germano <wpgermano@gmail.com> | 2003-07-31 01:15:41 +0400 |
commit | fe07b232b7e7e80569733de2b42e391874de6477 (patch) | |
tree | 5c6d95e7869855163aea95d38fff9b485d5d6d12 /source/blender/python/api2_2x/doc/NMesh.py | |
parent | 35c4c3222caea20d603e51191b3e85790cd76202 (diff) |
* got rid of a warning in editipo.c:
changed "get_ipo(key, ..." to "get_ipo((ID *)key, ..." in line 107.
* changed insert_meshkey(Mesh *me) to insert_meshkey(Mesh *me, short offline):
To call this function from a script, so that it doesn't pop the
"relative / absolute" dialog window when the "offline" arg is non-zero.
Exppython:
* NMesh module:
- Added method NMesh.addMaterial(mat) to the NMesh module:
alternative safer (aka slower) way to add materials.
- Added optional arg to NMesh_update():
if given and equal to 1, the mesh normals are recalculated.
- Fixed NMesh.getVertexInfluences: it was segfaulting when a NULL bone was
linked to the vertex. Thanks to Jiba on the bf-python mailing list for
bug report and sample .blend file. Also made this method give an IndexError
when the vertex index is out of range.
* Material module:
Added specR, specG, specB vars for compatibility with the 2.25 API.
Pointed by Manuel Bastioni.
* Image module:
Exposed image width, height and depth parameters.
From a suggestion by jms.
* BPython Ref Doc:
- Small updates to reflect the above additions.
- Added info for the Bone type in the Armature doc.
Diffstat (limited to 'source/blender/python/api2_2x/doc/NMesh.py')
-rw-r--r-- | source/blender/python/api2_2x/doc/NMesh.py | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/source/blender/python/api2_2x/doc/NMesh.py b/source/blender/python/api2_2x/doc/NMesh.py index c8fe8390a1e..f631726029b 100644 --- a/source/blender/python/api2_2x/doc/NMesh.py +++ b/source/blender/python/api2_2x/doc/NMesh.py @@ -110,11 +110,15 @@ def GetRaw(name = None): def GetRawFromObject(name): """ - Get the mesh data object from the Object in Blender called I{name}. + Get the raw mesh data object from the Object in Blender called I{name}. @type name: string @param name: The name of an Object of type "Mesh". @rtype: NMesh @return: The NMesh wrapper of the mesh data from the Object called I{name}. + @warn: This function gets I{deformed} mesh data, already modified for + rendering (think "display list"). It also doesn't let you overwrite the + original mesh in Blender, so if you try to update it, a new mesh will + be created. """ def PutRaw(nmesh, name = None, recalculate_normals = 1): @@ -187,7 +191,7 @@ class NMFace: @param vertex: An NMVert object. """ -class NMesh : +class NMesh: """ The NMesh Data object ===================== @@ -201,6 +205,16 @@ class NMesh : @cvar faces: The list of NMesh faces (NMFaces). """ + def addMaterial(material): + """ + Add a new material to this NMesh's list of materials. This method is the + slower but safer way to add materials, since it checks if the argument + given is really a material, imposes a limit of 16 materials and only adds + the material if it wasn't already in the list. + @type material: Blender Material + @param material: A Blender Material. + """ + def hasVertexColours(flag = None): """ Get (and optionally set) if this NMesh has vertex colours. @@ -272,14 +286,18 @@ class NMesh : and its weight is a float value. """ - def insertKey(frame = None): + def insertKey(frame = None, type = 'relative'): """ Insert a mesh key at the given frame. Remember to L{update} the nmesh before doing this, or changes in the vertices won't be updated in the Blender mesh. @type frame: int + @type type: string @param frame: The Scene frame where the mesh key should be inserted. If None, the current frame is used. + @param type: The mesh key type: 'relative' or 'absolute'. This is only + relevant on the first call to insertKey for each nmesh (and after all + keys were removed with L{removeAllKeys}, of course). @warn: This and L{removeAllKeys} were included in this release only to make accessing vertex keys possible, but may not be a proper solution and may be substituted by something better later. For example, it @@ -301,9 +319,12 @@ class NMesh : add them. """ - def update(): + def update(recalc_normals = 0): """ Update the mesh in Blender. The changes made are put back to the mesh in Blender, if available, or put in a newly created mesh object if this NMesh wasn't linked to one, yet. + @type recalc_normals: int + @param recalc_normals: If given and equal to 1, the vertex normals are + recalculated. """ |