Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-11-24 15:12:24 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-11-24 15:12:24 +0300
commitb863bf98e53a709e3353e80d87f574f860187cdb (patch)
tree75de687c7876300674e1d2b6e215e46fdb49f3dd /source/blender/makesrna/intern/rna_internal_types.h
parent10c58adba975530f549aeb0f73f3ea3e2888149e (diff)
RNA
* Wrap most user editable data in DNA_mesh_types.h and DNA_meshdata_types.h. Still needs to be improved in some areas though, especially how to deal with data layers (expose per element or as array, or both?), and data in face corners (bmesh type data structures are more logical here). Tweaks to RNA defining to make some cases easier: * Added range callback function for int/float. * Added 'skip' callback for listbase and array iterators to skip items in the collection. * Extra error print when calling wrong define_property_*_sdna functions. * Also made button code respect non_editable flag, is quick change though, need to add support for properly graying out etc.
Diffstat (limited to 'source/blender/makesrna/intern/rna_internal_types.h')
-rw-r--r--source/blender/makesrna/intern/rna_internal_types.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h
index 3cb4bbea63e..c878d33d87d 100644
--- a/source/blender/makesrna/intern/rna_internal_types.h
+++ b/source/blender/makesrna/intern/rna_internal_types.h
@@ -37,6 +37,7 @@ struct bContext;
/* Function Callbacks */
typedef void (*NotifyFunc)(struct bContext *C, struct PointerRNA *ptr);
+typedef int (*EditableFunc)(struct PointerRNA *ptr);
typedef struct StructRNA *(*StructRefineFunc)(struct PointerRNA *ptr);
typedef int (*PropBooleanGetFunc)(struct PointerRNA *ptr);
@@ -47,10 +48,12 @@ typedef int (*PropIntGetFunc)(struct PointerRNA *ptr);
typedef void (*PropIntSetFunc)(struct PointerRNA *ptr, int value);
typedef int (*PropIntArrayGetFunc)(struct PointerRNA *ptr, int index);
typedef void (*PropIntArraySetFunc)(struct PointerRNA *ptr, int index, int value);
+typedef void (*PropIntRangeFunc)(struct PointerRNA *ptr, int *min, int *max);
typedef float (*PropFloatGetFunc)(struct PointerRNA *ptr);
typedef void (*PropFloatSetFunc)(struct PointerRNA *ptr, float value);
typedef float (*PropFloatArrayGetFunc)(struct PointerRNA *ptr, int index);
typedef void (*PropFloatArraySetFunc)(struct PointerRNA *ptr, int index, float value);
+typedef void (*PropFloatRangeFunc)(struct PointerRNA *ptr, float *min, float *max);
typedef void (*PropStringGetFunc)(struct PointerRNA *ptr, char *value);
typedef int (*PropStringLengthFunc)(struct PointerRNA *ptr);
typedef void (*PropStringSetFunc)(struct PointerRNA *ptr, const char *value);
@@ -93,6 +96,9 @@ struct PropertyRNA {
/* callback for notifys on change */
NotifyFunc notify;
+
+ /* callback for testing if editable/evaluated */
+ EditableFunc editable;
};
/* Property Types */
@@ -119,6 +125,8 @@ typedef struct IntPropertyRNA {
PropIntArrayGetFunc getarray;
PropIntArraySetFunc setarray;
+ PropIntRangeFunc range;
+
int softmin, softmax;
int hardmin, hardmax;
int step;
@@ -136,6 +144,8 @@ typedef struct FloatPropertyRNA {
PropFloatArrayGetFunc getarray;
PropFloatArraySetFunc setarray;
+ PropFloatRangeFunc range;
+
float softmin, softmax;
float hardmin, hardmax;
float step;