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" +# ##### 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 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. +# +# ##### END GPL LICENSE BLOCK ##### -__bpydoc__ = """\ -""" - -# ***** 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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# ***** END GPL LICENCE BLOCK ***** -# -------------------------------------------------------------------------- +# 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 ##### # diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 5572977f157..436d2f41749 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -196,7 +196,7 @@ if(WITH_INSTALL) 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()