Anti - NMesh commit.
unweld - warn that this tool destroys MultiUV/Col's (because of NMesh) API_intro and NMesh - note that NMesh is maintained but deprecated.
This commit is contained in:
@@ -12,7 +12,6 @@ def Error_NoMeshUvActive():
|
|||||||
def Error_NoMeshMultiresEdit():
|
def Error_NoMeshMultiresEdit():
|
||||||
Draw.PupMenu('Error%t|Unable to complete action with multires enabled')
|
Draw.PupMenu('Error%t|Unable to complete action with multires enabled')
|
||||||
|
|
||||||
|
|
||||||
# File I/O messages
|
# File I/O messages
|
||||||
def Error_NoFile(path):
|
def Error_NoFile(path):
|
||||||
'''True if file missing, False if files there
|
'''True if file missing, False if files there
|
||||||
@@ -36,6 +35,18 @@ def Error_NoDir(path):
|
|||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
def Warning_MeshDistroyLayers(mesh):
|
||||||
|
'''Returns true if we can continue to edit the mesh, warn when using NMesh'''
|
||||||
|
if len(mesh.getUVLayerNames()) >1 and len(mesh.getColorLayerNames()) >1:
|
||||||
|
return True
|
||||||
|
|
||||||
|
ret = Draw.PupMenu('Warning%t|This script will distroy inactive UV and Color layers, OK?')
|
||||||
|
if ret == -1:
|
||||||
|
return False
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
def Warning_SaveOver(path):
|
def Warning_SaveOver(path):
|
||||||
'''Returns - True to save, False dont save'''
|
'''Returns - True to save, False dont save'''
|
||||||
if sys.exists(sys.expandpath(path)):
|
if sys.exists(sys.expandpath(path)):
|
||||||
@@ -44,3 +55,5 @@ def Warning_SaveOver(path):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -215,9 +215,11 @@ def collecte_edge(listf2v,me,thegood):
|
|||||||
|
|
||||||
OBJECT=Blender.Scene.GetCurrent().getActiveObject()
|
OBJECT=Blender.Scene.GetCurrent().getActiveObject()
|
||||||
|
|
||||||
if OBJECT and OBJECT.getType()=='Mesh':
|
if OBJECT and OBJECT.type=='Mesh':
|
||||||
if OBJECT.getData(mesh=1).multires:
|
if OBJECT.getData(mesh=1).multires:
|
||||||
BPyMessages.Error_NoMeshMultiresEdit()
|
BPyMessages.Error_NoMeshMultiresEdit()
|
||||||
|
elif not BPyMessages.Warning_MeshDistroyLayers(OBJECT.getData(mesh=1)):
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
EDITMODE=Blender.Window.EditMode()
|
EDITMODE=Blender.Window.EditMode()
|
||||||
Blender.Window.EditMode(0)
|
Blender.Window.EditMode(0)
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ The Blender Python API Reference
|
|||||||
-----------
|
-----------
|
||||||
|
|
||||||
- L{Blender}
|
- L{Blender}
|
||||||
- L{bpy<Bpy>}
|
- L{bpy<Bpy>} (experemantal)
|
||||||
|
|
||||||
Submodules:
|
Submodules:
|
||||||
-----------
|
-----------
|
||||||
@@ -39,7 +39,7 @@ The Blender Python API Reference
|
|||||||
- L{Mesh} (*)
|
- L{Mesh} (*)
|
||||||
- L{MeshPrimitives} (*)
|
- L{MeshPrimitives} (*)
|
||||||
- L{Metaball} (*)
|
- L{Metaball} (*)
|
||||||
- L{NMesh} (*)
|
- L{NMesh} (deprecated)
|
||||||
- L{Noise}
|
- L{Noise}
|
||||||
- L{Object} (*)
|
- L{Object} (*)
|
||||||
- L{Modifier} (*)
|
- L{Modifier} (*)
|
||||||
@@ -235,8 +235,6 @@ A note to newbie script writers:
|
|||||||
@see: U{www.python.org<http://www.python.org>}
|
@see: U{www.python.org<http://www.python.org>}
|
||||||
@see: U{www.python.org/doc<http://www.python.org/doc>}
|
@see: U{www.python.org/doc<http://www.python.org/doc>}
|
||||||
@see: U{Blending into Python<en.wikibooks.org/wiki/Blender_3D:_Blending_Into_Python>}: User contributed documentation, featuring a blender/python cookbook with many examples.
|
@see: U{Blending into Python<en.wikibooks.org/wiki/Blender_3D:_Blending_Into_Python>}: User contributed documentation, featuring a blender/python cookbook with many examples.
|
||||||
@note: this documentation was generated by epydoc, which can output html and
|
|
||||||
pdf. For pdf it requires a working LaTeX environment.
|
|
||||||
|
|
||||||
@note: the official version of this reference guide is only updated for each
|
@note: the official version of this reference guide is only updated for each
|
||||||
new Blender release. But you can build the current CVS
|
new Blender release. But you can build the current CVS
|
||||||
|
|||||||
@@ -3,12 +3,14 @@
|
|||||||
"""
|
"""
|
||||||
The Blender.NMesh submodule.
|
The Blender.NMesh submodule.
|
||||||
|
|
||||||
B{New}:
|
B{Deprecated}:
|
||||||
- edges class (L{NMEdge}) and nmesh methods (L{NMesh.NMesh.addEdge}, etc.);
|
This module is now maintained but not actively developed.
|
||||||
- new optional arguments to L{NMesh.NMesh.update};
|
|
||||||
- L{NMesh.NMesh.transform};
|
Access to data such as properties, library, UVLayers and ColorLayers is not available
|
||||||
- L{GetNames};
|
further more, a mesh modified with NMesh will destroy inactive UV and Color layers
|
||||||
- L{GetRawFromObject} supports Surface/Curve/Text/Meta objects
|
so writing tools that use NMesh is discouraged.
|
||||||
|
|
||||||
|
Use L{Mesh} instead.
|
||||||
|
|
||||||
Mesh Data
|
Mesh Data
|
||||||
=========
|
=========
|
||||||
|
|||||||
Reference in New Issue
Block a user