diff options
-rw-r--r-- | source/blender/blenkernel/intern/anim_sys.c | 12 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_ipo_utils.c | 2 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframing.c | 6 | ||||
-rw-r--r-- | source/blender/editors/interface/interface.c | 8 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_anim.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_outliner/outliner_edit.c | 2 |
6 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index 4b05b0800a5..8e697ad4ef3 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -1652,19 +1652,19 @@ static void nlaevalchan_value_init(NlaEvalChannel *nec) */ switch (RNA_property_type(prop)) { case PROP_BOOLEAN: - if (RNA_property_array_length(ptr, prop)) + if (RNA_property_array_check(prop)) nec->value = (float)RNA_property_boolean_get_default_index(ptr, prop, index); else nec->value = (float)RNA_property_boolean_get_default(ptr, prop); break; case PROP_INT: - if (RNA_property_array_length(ptr, prop)) + if (RNA_property_array_check(prop)) nec->value = (float)RNA_property_int_get_default_index(ptr, prop, index); else nec->value = (float)RNA_property_int_get_default(ptr, prop); break; case PROP_FLOAT: - if (RNA_property_array_length(ptr, prop)) + if (RNA_property_array_check(prop)) nec->value = RNA_property_float_get_default_index(ptr, prop, index); else nec->value = RNA_property_float_get_default(ptr, prop); @@ -2071,19 +2071,19 @@ void nladata_flush_channels(ListBase *channels) /* write values - see animsys_write_rna_setting() to sync the code */ switch (RNA_property_type(prop)) { case PROP_BOOLEAN: - if (RNA_property_array_length(ptr, prop)) + if (RNA_property_array_check(prop)) RNA_property_boolean_set_index(ptr, prop, array_index, ANIMSYS_FLOAT_AS_BOOL(value)); else RNA_property_boolean_set(ptr, prop, ANIMSYS_FLOAT_AS_BOOL(value)); break; case PROP_INT: - if (RNA_property_array_length(ptr, prop)) + if (RNA_property_array_check(prop)) RNA_property_int_set_index(ptr, prop, array_index, (int)value); else RNA_property_int_set(ptr, prop, (int)value); break; case PROP_FLOAT: - if (RNA_property_array_length(ptr, prop)) + if (RNA_property_array_check(prop)) RNA_property_float_set_index(ptr, prop, array_index, value); else RNA_property_float_set(ptr, prop, value); diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c index 21941c7ed62..d3e6d8f474f 100644 --- a/source/blender/editors/animation/anim_ipo_utils.c +++ b/source/blender/editors/animation/anim_ipo_utils.c @@ -132,7 +132,7 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu) propname = RNA_property_ui_name(prop); /* Array Index - only if applicable */ - if (RNA_property_array_length(&ptr, prop)) { + if (RNA_property_array_check(prop)) { char c = RNA_property_array_item_char(prop, fcu->array_index); /* we need to write the index to a temp buffer (in py syntax) */ diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index cfc03050a9e..70361f00004 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -508,19 +508,19 @@ static float setting_get_rna_value(PointerRNA *ptr, PropertyRNA *prop, int index switch (RNA_property_type(prop)) { case PROP_BOOLEAN: - if (RNA_property_array_length(ptr, prop)) + if (RNA_property_array_check(prop)) value = (float)RNA_property_boolean_get_index(ptr, prop, index); else value = (float)RNA_property_boolean_get(ptr, prop); break; case PROP_INT: - if (RNA_property_array_length(ptr, prop)) + if (RNA_property_array_check(prop)) value = (float)RNA_property_int_get_index(ptr, prop, index); else value = (float)RNA_property_int_get(ptr, prop); break; case PROP_FLOAT: - if (RNA_property_array_length(ptr, prop)) + if (RNA_property_array_check(prop)) value = RNA_property_float_get_index(ptr, prop, index); else value = RNA_property_float_get(ptr, prop); diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 111757da01f..e02cdf018c0 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -1646,19 +1646,19 @@ void ui_set_but_val(uiBut *but, double value) if (RNA_property_editable(&but->rnapoin, prop)) { switch (RNA_property_type(prop)) { case PROP_BOOLEAN: - if (RNA_property_array_length(&but->rnapoin, prop)) + if (RNA_property_array_check(prop)) RNA_property_boolean_set_index(&but->rnapoin, prop, but->rnaindex, value); else RNA_property_boolean_set(&but->rnapoin, prop, value); break; case PROP_INT: - if (RNA_property_array_length(&but->rnapoin, prop)) + if (RNA_property_array_check(prop)) RNA_property_int_set_index(&but->rnapoin, prop, but->rnaindex, (int)value); else RNA_property_int_set(&but->rnapoin, prop, (int)value); break; case PROP_FLOAT: - if (RNA_property_array_length(&but->rnapoin, prop)) + if (RNA_property_array_check(prop)) RNA_property_float_set_index(&but->rnapoin, prop, but->rnaindex, value); else RNA_property_float_set(&but->rnapoin, prop, value); @@ -3027,7 +3027,7 @@ static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char *s but->rnapoin = *ptr; but->rnaprop = prop; - if (RNA_property_array_length(&but->rnapoin, but->rnaprop)) + if (RNA_property_array_check(but->rnaprop)) but->rnaindex = index; else but->rnaindex = 0; diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c index 3feb563d3ee..5b6b889a6c6 100644 --- a/source/blender/editors/interface/interface_anim.c +++ b/source/blender/editors/interface/interface_anim.c @@ -144,7 +144,7 @@ int ui_but_anim_expression_create(uiBut *but, const char *str) return 0; } - if (RNA_property_array_length(&but->rnapoin, but->rnaprop) != 0) { + if (RNA_property_array_check(but->rnaprop) != 0) { if (but->rnaindex == -1) { if (G.debug & G_DEBUG) printf("ERROR: create expression failed - can't create expression for entire array\n"); diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index 6d0dc365317..559fb6f932e 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -1102,7 +1102,7 @@ static void tree_element_to_path(TreeElement *te, TreeStoreElem *tselem, /* item is part of an array, so must set the array_index */ *array_index = te->index; } - else if (RNA_property_array_length(ptr, prop)) { + else if (RNA_property_array_check(prop)) { /* entire array was selected, so keyframe all */ *flag |= KSP_FLAG_WHOLE_ARRAY; } |