[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [35508] trunk/blender: - lightmap pack wasnt reporting no mesh errors properly.

Campbell Barton ideasman42 at gmail.com
Sun Mar 13 07:02:21 CET 2011


Revision: 35508
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35508
Author:   campbellbarton
Date:     2011-03-13 06:02:20 +0000 (Sun, 13 Mar 2011)
Log Message:
-----------
- lightmap pack wasnt reporting no mesh errors properly.
- cleanup headers.
- cmake on *nix was always writing to /bin/./2.56

Modified Paths:
--------------
    trunk/blender/release/scripts/op/uvcalc_lightmap.py
    trunk/blender/release/scripts/op/uvcalc_smart_project.py
    trunk/blender/source/creator/CMakeLists.txt

Modified: trunk/blender/release/scripts/op/uvcalc_lightmap.py
===================================================================
--- trunk/blender/release/scripts/op/uvcalc_lightmap.py	2011-03-13 02:44:25 UTC (rev 35507)
+++ trunk/blender/release/scripts/op/uvcalc_lightmap.py	2011-03-13 06:02:20 UTC (rev 35508)
@@ -1,38 +1,23 @@
-#!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,18 +511,18 @@
 
     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)
 
     if is_editmode:

Modified: trunk/blender/release/scripts/op/uvcalc_smart_project.py
===================================================================
--- trunk/blender/release/scripts/op/uvcalc_smart_project.py	2011-03-13 02:44:25 UTC (rev 35507)
+++ trunk/blender/release/scripts/op/uvcalc_smart_project.py	2011-03-13 06:02:20 UTC (rev 35508)
@@ -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>
 

Modified: trunk/blender/source/creator/CMakeLists.txt
===================================================================
--- trunk/blender/source/creator/CMakeLists.txt	2011-03-13 02:44:25 UTC (rev 35507)
+++ trunk/blender/source/creator/CMakeLists.txt	2011-03-13 06:02:20 UTC (rev 35508)
@@ -196,7 +196,7 @@
 	if(UNIX AND NOT APPLE)
 
 		if(WITH_INSTALL_PORTABLE)
-			set(TARGETDIR_VER ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/${BLENDER_VERSION})
+			set(TARGETDIR_VER ${TARGETDIR}/${BLENDER_VERSION})
 		else()
 			set(TARGETDIR_VER ${CMAKE_INSTALL_PREFIX}/share/blender/${BLENDER_VERSION})
 		endif()




More information about the Bf-blender-cvs mailing list