diff --git a/release/scripts/bpymodules/BPyMessages.py b/release/scripts/bpymodules/BPyMessages.py index dbf8d8524a3..0ff8e178ac1 100644 --- a/release/scripts/bpymodules/BPyMessages.py +++ b/release/scripts/bpymodules/BPyMessages.py @@ -12,7 +12,6 @@ def Error_NoMeshUvActive(): def Error_NoMeshMultiresEdit(): Draw.PupMenu('Error%t|Unable to complete action with multires enabled') - # File I/O messages def Error_NoFile(path): '''True if file missing, False if files there @@ -36,6 +35,18 @@ def Error_NoDir(path): return True 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): '''Returns - True to save, False dont save''' if sys.exists(sys.expandpath(path)): @@ -44,3 +55,5 @@ def Warning_SaveOver(path): return False return True + + diff --git a/release/scripts/unweld.py b/release/scripts/unweld.py index 4fd13f647d6..89cf495181c 100644 --- a/release/scripts/unweld.py +++ b/release/scripts/unweld.py @@ -215,9 +215,11 @@ def collecte_edge(listf2v,me,thegood): OBJECT=Blender.Scene.GetCurrent().getActiveObject() -if OBJECT and OBJECT.getType()=='Mesh': +if OBJECT and OBJECT.type=='Mesh': if OBJECT.getData(mesh=1).multires: BPyMessages.Error_NoMeshMultiresEdit() + elif not BPyMessages.Warning_MeshDistroyLayers(OBJECT.getData(mesh=1)): + pass else: EDITMODE=Blender.Window.EditMode() Blender.Window.EditMode(0) diff --git a/source/blender/python/api2_2x/doc/API_intro.py b/source/blender/python/api2_2x/doc/API_intro.py index 4e2c71f3afc..74022f45d9c 100644 --- a/source/blender/python/api2_2x/doc/API_intro.py +++ b/source/blender/python/api2_2x/doc/API_intro.py @@ -12,7 +12,7 @@ The Blender Python API Reference ----------- - L{Blender} - - L{bpy} + - L{bpy} (experemantal) Submodules: ----------- @@ -39,7 +39,7 @@ The Blender Python API Reference - L{Mesh} (*) - L{MeshPrimitives} (*) - L{Metaball} (*) - - L{NMesh} (*) + - L{NMesh} (deprecated) - L{Noise} - L{Object} (*) - L{Modifier} (*) @@ -235,8 +235,6 @@ A note to newbie script writers: @see: U{www.python.org} @see: U{www.python.org/doc} @see: U{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 new Blender release. But you can build the current CVS diff --git a/source/blender/python/api2_2x/doc/NMesh.py b/source/blender/python/api2_2x/doc/NMesh.py index 464d057a06e..aa52400656f 100644 --- a/source/blender/python/api2_2x/doc/NMesh.py +++ b/source/blender/python/api2_2x/doc/NMesh.py @@ -3,12 +3,14 @@ """ The Blender.NMesh submodule. -B{New}: - - edges class (L{NMEdge}) and nmesh methods (L{NMesh.NMesh.addEdge}, etc.); - - new optional arguments to L{NMesh.NMesh.update}; - - L{NMesh.NMesh.transform}; - - L{GetNames}; - - L{GetRawFromObject} supports Surface/Curve/Text/Meta objects +B{Deprecated}: +This module is now maintained but not actively developed. + +Access to data such as properties, library, UVLayers and ColorLayers is not available +further more, a mesh modified with NMesh will destroy inactive UV and Color layers +so writing tools that use NMesh is discouraged. + +Use L{Mesh} instead. Mesh Data =========