forked from bartvdbraak/blender
Correct assert for RNA IDProps
This commit is contained in:
parent
b95e826841
commit
f3db0389c0
@ -2035,7 +2035,7 @@ void RNA_property_int_get_array(PointerRNA *ptr, PropertyRNA *prop, int *values)
|
|||||||
BLI_assert(RNA_property_array_check(prop) != false);
|
BLI_assert(RNA_property_array_check(prop) != false);
|
||||||
|
|
||||||
if ((idprop = rna_idproperty_check(&prop, ptr))) {
|
if ((idprop = rna_idproperty_check(&prop, ptr))) {
|
||||||
BLI_assert(idprop->len == RNA_property_array_length(ptr, prop));
|
BLI_assert(idprop->len == RNA_property_array_length(ptr, prop) || (prop->flag & PROP_IDPROPERTY));
|
||||||
if (prop->arraydimension == 0)
|
if (prop->arraydimension == 0)
|
||||||
values[0] = RNA_property_int_get(ptr, prop);
|
values[0] = RNA_property_int_get(ptr, prop);
|
||||||
else
|
else
|
||||||
@ -2124,7 +2124,7 @@ void RNA_property_int_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *v
|
|||||||
BLI_assert(RNA_property_array_check(prop) != false);
|
BLI_assert(RNA_property_array_check(prop) != false);
|
||||||
|
|
||||||
if ((idprop = rna_idproperty_check(&prop, ptr))) {
|
if ((idprop = rna_idproperty_check(&prop, ptr))) {
|
||||||
BLI_assert(idprop->len == RNA_property_array_length(ptr, prop));
|
BLI_assert(idprop->len == RNA_property_array_length(ptr, prop) || (prop->flag & PROP_IDPROPERTY));
|
||||||
if (prop->arraydimension == 0)
|
if (prop->arraydimension == 0)
|
||||||
IDP_Int(idprop) = values[0];
|
IDP_Int(idprop) = values[0];
|
||||||
else
|
else
|
||||||
@ -2297,7 +2297,7 @@ void RNA_property_float_get_array(PointerRNA *ptr, PropertyRNA *prop, float *val
|
|||||||
BLI_assert(RNA_property_array_check(prop) != false);
|
BLI_assert(RNA_property_array_check(prop) != false);
|
||||||
|
|
||||||
if ((idprop = rna_idproperty_check(&prop, ptr))) {
|
if ((idprop = rna_idproperty_check(&prop, ptr))) {
|
||||||
BLI_assert(idprop->len == RNA_property_array_length(ptr, prop));
|
BLI_assert(idprop->len == RNA_property_array_length(ptr, prop) || (prop->flag & PROP_IDPROPERTY));
|
||||||
if (prop->arraydimension == 0)
|
if (prop->arraydimension == 0)
|
||||||
values[0] = RNA_property_float_get(ptr, prop);
|
values[0] = RNA_property_float_get(ptr, prop);
|
||||||
else if (idprop->subtype == IDP_FLOAT) {
|
else if (idprop->subtype == IDP_FLOAT) {
|
||||||
@ -2392,7 +2392,7 @@ void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const floa
|
|||||||
BLI_assert(RNA_property_array_check(prop) != false);
|
BLI_assert(RNA_property_array_check(prop) != false);
|
||||||
|
|
||||||
if ((idprop = rna_idproperty_check(&prop, ptr))) {
|
if ((idprop = rna_idproperty_check(&prop, ptr))) {
|
||||||
BLI_assert(idprop->len == RNA_property_array_length(ptr, prop));
|
BLI_assert(idprop->len == RNA_property_array_length(ptr, prop) || (prop->flag & PROP_IDPROPERTY));
|
||||||
if (prop->arraydimension == 0) {
|
if (prop->arraydimension == 0) {
|
||||||
if (idprop->type == IDP_FLOAT)
|
if (idprop->type == IDP_FLOAT)
|
||||||
IDP_Float(idprop) = values[0];
|
IDP_Float(idprop) = values[0];
|
||||||
|
Loading…
Reference in New Issue
Block a user