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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-11-08 20:35:28 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-11-08 20:35:28 +0400
commit863291bc8e44eaed79946706b417944cdf9dfa4f (patch)
tree68f6b1b859f41871de053c953ebd7d6fdfdb43fd /source/blender/editors/object
parente73408f2474f7e6d9f1ff880f7f07c678f28e0ce (diff)
Fix #33113: cycles not rendering motion blur correct with dying particles.
There were a bunch of other issues with dupli motion blur and syncing, the problem being that there was no proper way to detect corresponding duplis between frames or updates. As a solution, a persistent_id was added to the DupliObject. It's an extension of the previous index value, with one index for each dupli level. This can be used to reliably find matching dupli objects between frames. Works with nested duplis, multiple particle systems, etc.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_add.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 9fc4e0a906d..4d1f2bbc4e9 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1136,7 +1136,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
if (dupli_gh)
BLI_ghash_insert(dupli_gh, dob, ob);
if (parent_gh)
- BLI_ghash_insert(parent_gh, BLI_ghashutil_pairalloc(dob->ob, SET_INT_IN_POINTER(dob->index)), ob);
+ BLI_ghash_insert(parent_gh, BLI_ghashutil_pairalloc(dob->ob, SET_INT_IN_POINTER(dob->persistent_id[0])), ob);
}
if (use_hierarchy) {
@@ -1150,7 +1150,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
/* find parent that was also made real */
if (ob_src_par) {
- GHashPair *pair = BLI_ghashutil_pairalloc(ob_src_par, SET_INT_IN_POINTER(dob->index));
+ GHashPair *pair = BLI_ghashutil_pairalloc(ob_src_par, SET_INT_IN_POINTER(dob->persistent_id[0]));
ob_dst_par = BLI_ghash_lookup(parent_gh, pair);
BLI_ghashutil_pairfree(pair);
}