From ad8c79405ac053bafea606ee954c4324d066d5fa Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 7 Feb 2011 05:05:41 +0000 Subject: Type checks for internal ID-Property UI min/max/tip & use defines to get values from ID-Props. Probably wouldn't cause a problem but manually editing these types through python could easily crash blender. also changed cmake, stub-makefile default build dir to be lower case and leave out architecture string, easier for documentation. Use ../build/linux/ rather then ../build/Linux_i686/ --- source/blender/blenkernel/intern/idprop.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender/blenkernel/intern/idprop.c') diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c index 633d3aeafb9..7829d9b5e0d 100644 --- a/source/blender/blenkernel/intern/idprop.c +++ b/source/blender/blenkernel/intern/idprop.c @@ -535,6 +535,12 @@ IDProperty *IDP_GetPropertyFromGroup(IDProperty *prop, const char *name) return (IDProperty *)BLI_findstring(&prop->data.group, name, offsetof(IDProperty, name)); } +IDProperty *IDP_GetPropertyTypeFromGroup(IDProperty *prop, const char *name, const char type) +{ + IDProperty *idprop= IDP_GetPropertyFromGroup(prop, name); + return (idprop && idprop->type == type) ? idprop : NULL; +} + typedef struct IDPIter { void *next; IDProperty *parent; -- cgit v1.2.3