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:
authorJoshua Leung <aligorith@gmail.com>2009-11-25 15:00:31 +0300
committerJoshua Leung <aligorith@gmail.com>2009-11-25 15:00:31 +0300
commit6c881a7a6d9a5168ebbc5aa5339ed4324aef2154 (patch)
tree0e030b38e800a18929231ef368fe5ea15a7c900c /source/blender/makesrna/intern/rna_internal_types.h
parent4c5b43052035a5aa3b34b77acb558f06147f0292 (diff)
AnimSys - Transform Locks + RNA:
The Animation System now respects the Transform Locks too (i.e. lock x-location, etc.) when writing settings. This means that it is no longer necessary to set up "constant drivers" to make sure some values don't get accidentally animated. Internally, added a new callback for properties in RNA, which is responsible for checking if the item at some array-index is editable. This needs to be manually called for each place which uses rna to set settings for arrays (see the code changes in anim_sys.c for changes how to do this; the same thing needs to be done in the UI code too, and probably in py-api too)
Diffstat (limited to 'source/blender/makesrna/intern/rna_internal_types.h')
-rw-r--r--source/blender/makesrna/intern/rna_internal_types.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h
index 46ed1fa055f..8a35f831c96 100644
--- a/source/blender/makesrna/intern/rna_internal_types.h
+++ b/source/blender/makesrna/intern/rna_internal_types.h
@@ -55,6 +55,7 @@ struct GHash;
typedef void (*UpdateFunc)(struct bContext *C, struct PointerRNA *ptr);
typedef int (*EditableFunc)(struct PointerRNA *ptr);
+typedef int (*ItemEditableFunc)(struct PointerRNA *ptr, int index);
typedef struct IDProperty* (*IDPropertiesFunc)(struct PointerRNA *ptr, int create);
typedef struct StructRNA *(*StructRefineFunc)(struct PointerRNA *ptr);
typedef char *(*StructPathFunc)(struct PointerRNA *ptr);
@@ -152,8 +153,10 @@ struct PropertyRNA {
UpdateFunc update;
int noteflag;
- /* callback for testing if editable/evaluated */
+ /* callback for testing if editable */
EditableFunc editable;
+ /* callback for testing if array-item editable (if applicable) */
+ ItemEditableFunc itemeditable;
/* raw access */
int rawoffset;