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:
authorCampbell Barton <ideasman42@gmail.com>2012-07-09 16:57:04 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-09 16:57:04 +0400
commitc185635ed07a8909a5cf8537530899b5ec48afcd (patch)
tree480ca29f2baf384ab945403b23f18f64b4c0b283
parent4e6a54e60b714780a58d01a5ab19bd86586886da (diff)
parentfacb1512c097189e50808f6aca7c9f0b0280d2dc (diff)
svn merge ^/trunk/blender -r48749:48754
-rw-r--r--intern/cycles/bvh/bvh.cpp13
-rw-r--r--source/blender/blenkernel/intern/image.c46
-rw-r--r--source/blender/python/bmesh/bmesh_py_types.c12
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_meshdata.c8
4 files changed, 47 insertions, 32 deletions
diff --git a/intern/cycles/bvh/bvh.cpp b/intern/cycles/bvh/bvh.cpp
index a383ad317ab..bdcd3b6ba19 100644
--- a/intern/cycles/bvh/bvh.cpp
+++ b/intern/cycles/bvh/bvh.cpp
@@ -378,10 +378,19 @@ void BVH::pack_instances(size_t nodes_size)
int mesh_tri_offset = mesh->tri_offset;
/* fill in node indexes for instances */
- if(bvh->pack.is_leaf[0])
+ if(
+ /* XXX, brecht. check this is needed!. it could be a bug elsewhere
+ * /mango/pro/scenes/04_2e/04_2e.blend r2158. on Ian's system 192.168.3.27 - campbell */
+ (bvh->pack.is_leaf.size() != 0) &&
+
+ /* previously only checked this */
+ bvh->pack.is_leaf[0])
+ {
pack.object_node[object_offset++] = -noffset-1;
- else
+ }
+ else {
pack.object_node[object_offset++] = noffset;
+ }
mesh_map[mesh] = pack.object_node[object_offset-1];
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 24269c287bb..dfb12503c45 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -1326,6 +1326,31 @@ void BKE_imbuf_to_image_format(struct ImageFormatData *im_format, const ImBuf *i
}
+static void timecode_simple_string(char *text, size_t text_size, const int cfra, int const frs_sec)
+{
+ int f = (int)(cfra % frs_sec);
+ int s = (int)(cfra / frs_sec);
+ int h = 0;
+ int m = 0;
+
+ if (s) {
+ m = (int)(s / 60);
+ s %= 60;
+
+ if (m) {
+ h = (int)(m / 60);
+ m %= 60;
+ }
+ }
+
+ if (frs_sec < 100) {
+ BLI_snprintf(text, text_size, "%02d:%02d:%02d.%02d", h, m, s, f);
+ }
+ else {
+ BLI_snprintf(text, text_size, "%02d:%02d:%02d.%03d", h, m, s, f);
+ }
+}
+
/* could allow access externally - 512 is for long names, 64 is for id names */
typedef struct StampData {
char file[512];
@@ -1385,26 +1410,7 @@ static void stampdata(Scene *scene, Object *camera, StampData *stamp_data, int d
}
if (scene->r.stamp & R_STAMP_TIME) {
- int f = (int)(scene->r.cfra % scene->r.frs_sec);
- int s = (int)(scene->r.cfra / scene->r.frs_sec);
- int h = 0;
- int m = 0;
-
- if (s) {
- m = (int)(s / 60);
- s %= 60;
-
- if (m) {
- h = (int)(m / 60);
- m %= 60;
- }
- }
-
- if (scene->r.frs_sec < 100)
- BLI_snprintf(text, sizeof(text), "%02d:%02d:%02d.%02d", h, m, s, f);
- else
- BLI_snprintf(text, sizeof(text), "%02d:%02d:%02d.%03d", h, m, s, f);
-
+ timecode_simple_string(text, sizeof(text), scene->r.cfra, scene->r.frs_sec);
BLI_snprintf(stamp_data->time, sizeof(stamp_data->time), do_prefix ? "Time %s" : "%s", text);
}
else {
diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c
index f7a7d379ba4..65bff1db7f6 100644
--- a/source/blender/python/bmesh/bmesh_py_types.c
+++ b/source/blender/python/bmesh/bmesh_py_types.c
@@ -2438,21 +2438,21 @@ static int bpy_bmelem_ass_subscript(BPy_BMElem *self, BPy_BMLayerItem *key, PyOb
}
static PySequenceMethods bpy_bmelemseq_as_sequence = {
- (lenfunc)bpy_bmelemseq_length, /* sq_length */
+ (lenfunc)bpy_bmelemseq_length, /* sq_length */
NULL, /* sq_concat */
NULL, /* sq_repeat */
- (ssizeargfunc)bpy_bmelemseq_subscript_int, /* sq_item */ /* Only set this so PySequence_Check() returns True */
+ (ssizeargfunc)bpy_bmelemseq_subscript_int, /* sq_item */ /* Only set this so PySequence_Check() returns True */
NULL, /* sq_slice */
(ssizeobjargproc)NULL, /* sq_ass_item */
NULL, /* *was* sq_ass_slice */
- (objobjproc)bpy_bmelemseq_contains, /* sq_contains */
+ (objobjproc)bpy_bmelemseq_contains, /* sq_contains */
(binaryfunc) NULL, /* sq_inplace_concat */
(ssizeargfunc) NULL, /* sq_inplace_repeat */
};
static PyMappingMethods bpy_bmelemseq_as_mapping = {
- (lenfunc)bpy_bmelemseq_length, /* mp_length */
- (binaryfunc)bpy_bmelemseq_subscript, /* mp_subscript */
+ (lenfunc)bpy_bmelemseq_length, /* mp_length */
+ (binaryfunc)bpy_bmelemseq_subscript, /* mp_subscript */
(objobjargproc)NULL, /* mp_ass_subscript */
};
@@ -2859,7 +2859,7 @@ static struct PyModuleDef BPy_BM_types_module_def = {
PyModuleDef_HEAD_INIT,
"bmesh.types", /* m_name */
NULL, /* m_doc */
- 0, /* m_size */
+ 0, /* m_size */
NULL, /* m_methods */
NULL, /* m_reload */
NULL, /* m_traverse */
diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.c b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
index aa78dc64f6b..b2cc0d73481 100644
--- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
@@ -432,7 +432,7 @@ static int bpy_bmdeformvert_ass_subscript(BPy_BMDeformVert *self, PyObject *key,
/* dvert[group_index] = 0.5 */
if (i < 0) {
PyErr_SetString(PyExc_KeyError, "BMDeformVert[key] = x: "
- "weight keys can't be negative");
+ "weight keys can't be negative");
return -1;
}
else {
@@ -440,8 +440,8 @@ static int bpy_bmdeformvert_ass_subscript(BPy_BMDeformVert *self, PyObject *key,
const float f = PyFloat_AsDouble(value);
if (f == -1 && PyErr_Occurred()) { // parsed key not a number
PyErr_SetString(PyExc_TypeError,
- "BMDeformVert[key] = x: "
- "argument not a number");
+ "BMDeformVert[key] = x: "
+ "argument not a number");
return -1;
}
@@ -496,7 +496,7 @@ static PySequenceMethods bpy_bmdeformvert_as_sequence = {
NULL, /* sq_slice */
NULL, /* sq_ass_item */
NULL, /* *was* sq_ass_slice */
- (objobjproc)bpy_bmdeformvert_contains, /* sq_contains */
+ (objobjproc)bpy_bmdeformvert_contains, /* sq_contains */
(binaryfunc) NULL, /* sq_inplace_concat */
(ssizeargfunc) NULL, /* sq_inplace_repeat */
};