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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-12-19 10:05:29 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-12-19 10:05:29 +0300
commitc26cc0afa1bde9c388eab27be6cbc3efed7fb399 (patch)
tree1ebc8f25fc54c4bdf5d30ee84f7f8034469d982a /source
parent096369e89d1f036864e01a0e48d745b0d056748a (diff)
bugfix [#25290] Align on text gives a traceback
[#25284] Traceback error on "System Info" script - Align was only working on mesh objects, now operate on all objects, missing boundbox's are treated as single points. - obj.bound_box was returning all nan's for object types with no boundbox. - ENUM_FLAG type enums were showing no text when displayed in operator redo panel.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenlib/BLI_math_vector.h1
-rw-r--r--source/blender/blenlib/intern/math_vector.c7
-rw-r--r--source/blender/editors/interface/interface_utils.c9
-rw-r--r--source/blender/makesrna/intern/rna_object.c4
4 files changed, 18 insertions, 3 deletions
diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h
index 3a63e87ac76..5f6251bf382 100644
--- a/source/blender/blenlib/BLI_math_vector.h
+++ b/source/blender/blenlib/BLI_math_vector.h
@@ -176,6 +176,7 @@ void mul_vn_fl(float *array, const int size, const float f);
void mul_vn_vn_fl(float *array_tar, const float *array_src, const int size, const float f);
void add_vn_vn(float *array_tar, const float *array_src, const int size);
void fill_vni(int *array_tar, const int size, const int val);
+void fill_vn(float *array_tar, const int size, const float val);
#ifdef __cplusplus
}
diff --git a/source/blender/blenlib/intern/math_vector.c b/source/blender/blenlib/intern/math_vector.c
index 6ac1fcfab7e..2ff1e948317 100644
--- a/source/blender/blenlib/intern/math_vector.c
+++ b/source/blender/blenlib/intern/math_vector.c
@@ -404,3 +404,10 @@ void fill_vni(int *array_tar, const int size, const int val)
int i= size;
while(i--) { *(tar--) = val; }
}
+
+void fill_vn(float *array_tar, const int size, const float val)
+{
+ float *tar= array_tar + (size-1);
+ int i= size;
+ while(i--) { *(tar--) = val; }
+}
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c
index b6afe6f63d4..b42b5aff33e 100644
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@ -163,7 +163,14 @@ int uiDefAutoButsRNA(uiLayout *layout, PointerRNA *ptr, int (*check_prop)(Proper
col= NULL;
}
- name= ""; /* name is shown above, empty name for button below */
+ /* may meed to add more cases here.
+ * don't override enum flag names */
+ if(flag & PROP_ENUM_FLAG) {
+ name= NULL;
+ }
+ else {
+ name= ""; /* name is shown above, empty name for button below */
+ }
}
else {
col= layout;
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 5d2b2e5f178..0b2bc8921fb 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -1091,7 +1091,7 @@ static void rna_Object_boundbox_get(PointerRNA *ptr, float *values)
memcpy(values, bb->vec, sizeof(bb->vec));
}
else {
- memset(values, -1.0f, sizeof(bb->vec));
+ fill_vn(values, sizeof(bb->vec)/sizeof(float), 0.0f);
}
}
@@ -1696,7 +1696,7 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_multi_array(prop, 2, boundbox_dimsize);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_float_funcs(prop, "rna_Object_boundbox_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Bound Box", "Objects bound box in object-space coordinates");
+ RNA_def_property_ui_text(prop, "Bound Box", "Objects bound box in object-space coordinates, all values are -1.0 when not available.");
/* parent */
prop= RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);