From 5d0a207ecb843c4c73be897cfccbf3a0d2db574b Mon Sep 17 00:00:00 2001 From: Chris Want Date: Wed, 16 Apr 2008 22:40:48 +0000 Subject: Patch from GSR that a) fixes a whole bunch of GPL/BL license blocks that were previously missed; and b) greatly increase my ohloh stats! --- source/blender/blenkernel/intern/property.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'source/blender/blenkernel/intern/property.c') diff --git a/source/blender/blenkernel/intern/property.c b/source/blender/blenkernel/intern/property.c index a60c03c4840..f55bdd15279 100644 --- a/source/blender/blenkernel/intern/property.c +++ b/source/blender/blenkernel/intern/property.c @@ -4,15 +4,12 @@ * ton roosendaal * $Id$ * - * ***** BEGIN GPL/BL DUAL 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. The Blender - * Foundation also sells licenses for use in proprietary software under - * the Blender License. See http://www.blender.org/BL/ for information - * about this. + * 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 @@ -30,7 +27,7 @@ * * Contributor(s): none yet. * - * ***** END GPL/BL DUAL LICENSE BLOCK ***** + * ***** END GPL LICENSE BLOCK ***** */ #include -- cgit v1.2.3 From a9988317c9d9cf312ec5de7f9c6bb3fb1e161847 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 21 Sep 2008 10:12:33 +0000 Subject: Added select grouped property (objects with shared property names will be selected) (updated select group toolbox and header menu) Added 2 copy property options - Replace All and Merge All, since there was no way to remove all properties, or set all objects game properties to be the same as the active objects. Added set_ob_property(ob, prop) to property api. bugfix in python api, copyAllPropertiesTo, it didnt check for duplicates or that it wasnt copying from/to the same object. --- source/blender/blenkernel/intern/property.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'source/blender/blenkernel/intern/property.c') diff --git a/source/blender/blenkernel/intern/property.c b/source/blender/blenkernel/intern/property.c index f55bdd15279..d2eb058a9a0 100644 --- a/source/blender/blenkernel/intern/property.c +++ b/source/blender/blenkernel/intern/property.c @@ -83,8 +83,7 @@ bProperty *copy_property(bProperty *prop) void copy_properties(ListBase *lbn, ListBase *lbo) { bProperty *prop, *propn; - - lbn->first= lbn->last= 0; + free_properties( lbn ); /* incase we are copying to an object with props */ prop= lbo->first; while(prop) { propn= copy_property(prop); @@ -139,7 +138,7 @@ bProperty *new_property(int type) return prop; } -bProperty *get_property(Object *ob, char *name) +bProperty *get_ob_property(Object *ob, char *name) { bProperty *prop; @@ -151,6 +150,17 @@ bProperty *get_property(Object *ob, char *name) return NULL; } +void set_ob_property(Object *ob, bProperty *propc) +{ + bProperty *prop; + prop= get_ob_property(ob, propc->name); + if(prop) { + free_property(prop); + BLI_remlink(&ob->prop, prop); + } + BLI_addtail(&ob->prop, copy_property(propc)); +} + /* negative: prop is smaller * positive: prop is larger */ -- cgit v1.2.3