3
Name: 'Copy Active to Selected'
6
Tooltip: 'For every selected object, copy the active to their loc/size/rot'
9
# ***** BEGIN GPL LICENSE BLOCK *****
11
# Script copyright (C) Campbell Barton
13
# This program is free software; you can redistribute it and/or
14
# modify it under the terms of the GNU General Public License
15
# as published by the Free Software Foundation; either version 2
16
# of the License, or (at your option) any later version.
18
# This program is distributed in the hope that it will be useful,
19
# but WITHOUT ANY WARRANTY; without even the implied warranty of
20
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
# GNU General Public License for more details.
23
# You should have received a copy of the GNU General Public License
24
# along with this program; if not, write to the Free Software Foundation,
25
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27
# ***** END GPL LICENCE BLOCK *****
28
# --------------------------------------------------------------------------
31
from Blender import Window, sys, Draw
34
def my_object_util(sce):
35
ob_act = sce.objects.active
38
Draw.PupMenu('Error%t|No active object selected')
41
mats = [ob.matrixWorld for ob in sce.objects.context if ob != ob_act]
44
ob_copy = ob_act.copy()
45
sce.objects.link(ob_copy)
47
ob_copy.Layers = ob.Layers
51
sce = bpy.data.scenes.active
57
if __name__ == '__main__':