diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-03-13 09:02:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-03-13 09:02:20 +0300 |
commit | ca95a6f4153cbf7b2e0186af7624fd9e79a17d7a (patch) | |
tree | fbb871729a2441a3ddef13fec4ecdc83bd342a58 /release/scripts | |
parent | 6559209dbfddfc1cadb4d3509cee25a3434ef8e7 (diff) |
- lightmap pack wasnt reporting no mesh errors properly.
- cleanup headers.
- cmake on *nix was always writing to /bin/./2.56
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/op/uvcalc_lightmap.py | 61 | ||||
-rw-r--r-- | release/scripts/op/uvcalc_smart_project.py | 30 |
2 files changed, 36 insertions, 55 deletions
diff --git a/release/scripts/op/uvcalc_lightmap.py b/release/scripts/op/uvcalc_lightmap.py index e514ddc1732..b7c48cf149b 100644 --- a/release/scripts/op/uvcalc_lightmap.py +++ b/release/scripts/op/uvcalc_lightmap.py @@ -1,37 +1,22 @@ -#!BPY -""" -Name: 'Lightmap UVPack' -Blender: 242 -Group: 'UVCalculation' -Tooltip: 'Give each face non overlapping space on a texture.' -""" -__author__ = "Campbell Barton aka ideasman42" -__url__ = ("blender", "blenderartists.org") -__version__ = "1.0 2006/02/07" - -__bpydoc__ = """\ -""" - -# ***** BEGIN GPL LICENSE BLOCK ***** +# ##### BEGIN GPL LICENSE BLOCK ##### # -# Script copyright (C) Campbell Barton +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# ***** END GPL LICENCE BLOCK ***** -# -------------------------------------------------------------------------- +# ##### END GPL LICENSE BLOCK ##### + +# <pep8 compliant> import bpy import mathutils @@ -526,17 +511,17 @@ def unwrap(operator, context, **kwargs): PREF_ACT_ONLY = kwargs.pop("PREF_ACT_ONLY") + meshes = [] if PREF_ACT_ONLY: obj = context.scene.objects.active - if obj == None or obj.type != 'MESH': - operator.report({'error'}, "No mesh object.") - return - meshes = [obj.data] + if obj and obj.type == 'MESH': + meshes = [obj.data] else: - meshes = {me.name: me for ob in context.selected_objects if ob.type == 'MESH' for me in (ob.data,) if not me.library if len(me.faces)}.values() - if not meshes: - Draw.PupMenu('Error%t|No mesh objects selected.') - return + meshes = {me.name: me for obj in context.selected_objects if obj.type == 'MESH' for me in (obj.data,) if not me.library if len(me.faces)}.values() + + if not meshes: + operator.report({'ERROR'}, "No mesh object.") + return {'CANCELLED'} lightmap_uvpack(meshes, **kwargs) diff --git a/release/scripts/op/uvcalc_smart_project.py b/release/scripts/op/uvcalc_smart_project.py index 241442d562a..dd5fe2c7e4c 100644 --- a/release/scripts/op/uvcalc_smart_project.py +++ b/release/scripts/op/uvcalc_smart_project.py @@ -1,24 +1,20 @@ -# -------------------------------------------------------------------------- -# Smart Projection UV Projection Unwrapper v1.2 by Campbell Barton (AKA Ideasman) -# -------------------------------------------------------------------------- -# ***** BEGIN GPL LICENSE BLOCK ***** +# ##### BEGIN GPL LICENSE BLOCK ##### # -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. # -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -# ***** END GPL LICENCE BLOCK ***** -# -------------------------------------------------------------------------- +# ##### END GPL LICENSE BLOCK ##### # <pep8 compliant> |