2006-09-25 05:12:37 +00:00
|
|
|
from Blender import Draw, sys
|
2006-07-29 07:14:11 +00:00
|
|
|
def Error_NoMeshSelected():
|
2007-02-06 11:16:49 +00:00
|
|
|
Draw.PupMenu('Error%t|No mesh objects selected')
|
2006-12-15 22:14:33 +00:00
|
|
|
def Error_NoActive():
|
2007-02-06 11:16:49 +00:00
|
|
|
Draw.PupMenu('Error%t|No active object')
|
2006-07-29 07:14:11 +00:00
|
|
|
def Error_NoMeshActive():
|
2007-02-06 11:16:49 +00:00
|
|
|
Draw.PupMenu('Error%t|Active object is not a mesh')
|
2006-07-29 07:14:11 +00:00
|
|
|
def Error_NoMeshUvSelected():
|
2007-02-06 11:16:49 +00:00
|
|
|
Draw.PupMenu('Error%t|No mesh objects with texface selected')
|
2006-07-29 07:14:11 +00:00
|
|
|
def Error_NoMeshUvActive():
|
2007-02-06 11:16:49 +00:00
|
|
|
Draw.PupMenu('Error%t|Active object is not a mesh with texface')
|
|
|
|
def Error_NoMeshMultiresEdit():
|
|
|
|
Draw.PupMenu('Error%t|Unable to complete action with multires enabled')
|
2007-11-22 16:30:14 +00:00
|
|
|
def Error_NoMeshFaces():
|
|
|
|
Draw.PupMenu('Error%t|Mesh has no faces')
|
2007-02-06 11:16:49 +00:00
|
|
|
|
2006-09-26 04:39:46 +00:00
|
|
|
# File I/O messages
|
|
|
|
def Error_NoFile(path):
|
2006-11-03 20:04:56 +00:00
|
|
|
'''True if file missing, False if files there
|
|
|
|
|
|
|
|
Use simply by doing...
|
|
|
|
if Error_NoFile(path): return
|
|
|
|
'''
|
2006-09-26 04:39:46 +00:00
|
|
|
if not sys.exists(sys.expandpath(path)):
|
|
|
|
Draw.PupMenu("Error%t|Can't open file: " + path)
|
|
|
|
return True
|
|
|
|
return False
|
|
|
|
|
2006-11-03 20:04:56 +00:00
|
|
|
def Error_NoDir(path):
|
|
|
|
'''True if dirs missing, False if dirs there
|
|
|
|
|
|
|
|
Use simply by doing...
|
|
|
|
if Error_NoDir(path): return
|
|
|
|
'''
|
|
|
|
if not sys.exists(sys.expandpath(path)):
|
|
|
|
Draw.PupMenu("Error%t|Path does not exist: " + path)
|
|
|
|
return True
|
|
|
|
return False
|
|
|
|
|
2007-04-09 07:03:26 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2006-09-25 05:12:37 +00:00
|
|
|
def Warning_SaveOver(path):
|
|
|
|
'''Returns - True to save, False dont save'''
|
|
|
|
if sys.exists(sys.expandpath(path)):
|
|
|
|
ret= Draw.PupMenu('Save over%t|' + path)
|
|
|
|
if ret == -1:
|
|
|
|
return False
|
|
|
|
|
|
|
|
return True
|
2007-04-09 07:03:26 +00:00
|
|
|
|
|
|
|
|