diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-02-07 08:05:41 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-02-07 08:05:41 +0300 |
commit | ad8c79405ac053bafea606ee954c4324d066d5fa (patch) | |
tree | 6f4a92c29fbc134330118a94f39b2665c7c0c0a9 /source/blender/blenkernel/intern/idprop.c | |
parent | a018bfba9ad925e563dfa7f1512b2e5925547ea1 (diff) |
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/
Diffstat (limited to 'source/blender/blenkernel/intern/idprop.c')
-rw-r--r-- | source/blender/blenkernel/intern/idprop.c | 6 |
1 files changed, 6 insertions, 0 deletions
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; |