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:
authorStefan Werner <stefan.werner@tangent-animation.com>2018-11-23 15:08:15 +0300
committerStefan Werner <stefan.werner@tangent-animation.com>2018-11-23 15:19:53 +0300
commit071f4f4ce0b9520ab0c73d6d68365ad449ca8b80 (patch)
tree9f37bfcac669366b9ad5fb7605f2fbbed9b71b0a /source/blender/blenkernel/intern/object.c
parent0a2b2d59a5897212ba3771503feb6770fb636bc8 (diff)
Cycles: Improved robustness of hair motion blur.motion_curve_fix
In some instances, the number of control vertices of a hair could change mid-frame. Cycles would then be unable to calculate proper motion blur for those hairs. This adds interpolated CVs to fill in for the missing data. While this will not necessarily result in a fully accurate reconstruction of the guide hair, it preserves motion blur instead of disabling it. Reviewers: #cycles, sergey Reviewed By: #cycles, sergey Subscribers: sergey, brecht, #cycles Tags: #cycles Differential Revision: https://developer.blender.org/D3695
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r--source/blender/blenkernel/intern/object.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 9f635966ee7..add7c1fd992 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -1785,7 +1785,7 @@ static void ob_parbone(Object *ob, Object *par, float mat[4][4])
/* get bone transform */
if (pchan->bone->flag & BONE_RELATIVE_PARENTING) {
- /* the new option uses the root - expected bahaviour, but differs from old... */
+ /* the new option uses the root - expected behaviour, but differs from old... */
/* XXX check on version patching? */
copy_m4_m4(mat, pchan->chan_mat);
}
@@ -1855,7 +1855,7 @@ static void give_parvert(Object *par, int nr, float vec[3])
if (use_special_ss_case) {
/* Special case if the last modifier is SS and no constructive modifier are in front of it. */
CCGDerivedMesh *ccgdm = (CCGDerivedMesh *)dm;
- CCGVert *ccg_vert = ccgSubSurf_getVert(ccgdm->ss, SET_INT_IN_POINTER(nr));
+ CCGVert *ccg_vert = ccgSubSurf_getVert(ccgdm->ss, POINTER_FROM_INT(nr));
/* In case we deleted some verts, nr may refer to inexistent one now, see T42557. */
if (ccg_vert) {
float *co = ccgSubSurf_getVertData(ccgdm->ss, ccg_vert);
@@ -2770,7 +2770,7 @@ int BKE_object_obdata_texspace_get(Object *ob, short **r_texflag, float **r_loc,
static int pc_cmp(const void *a, const void *b)
{
const LinkData *ad = a, *bd = b;
- if (GET_INT_FROM_POINTER(ad->data) > GET_INT_FROM_POINTER(bd->data))
+ if (POINTER_AS_INT(ad->data) > POINTER_AS_INT(bd->data))
return 1;
else return 0;
}
@@ -2783,14 +2783,14 @@ int BKE_object_insert_ptcache(Object *ob)
BLI_listbase_sort(&ob->pc_ids, pc_cmp);
for (link = ob->pc_ids.first, i = 0; link; link = link->next, i++) {
- int index = GET_INT_FROM_POINTER(link->data);
+ int index = POINTER_AS_INT(link->data);
if (i < index)
break;
}
link = MEM_callocN(sizeof(LinkData), "PCLink");
- link->data = SET_INT_IN_POINTER(i);
+ link->data = POINTER_FROM_INT(i);
BLI_addtail(&ob->pc_ids, link);
return i;
@@ -2805,7 +2805,7 @@ static int pc_findindex(ListBase *listbase, int index)
link = listbase->first;
while (link) {
- if (GET_INT_FROM_POINTER(link->data) == index)
+ if (POINTER_AS_INT(link->data) == index)
return number;
number++;
@@ -3089,7 +3089,7 @@ int BKE_object_is_modified(Scene *scene, Object *ob)
* This makes it possible to give some degree of false-positives here,
* but it's currently an acceptable tradeoff between complexity and check
* speed. In combination with checks of modifier stack and real life usage
- * percentage of false-positives shouldn't be that hight.
+ * percentage of false-positives shouldn't be that height.
*/
static bool object_moves_in_time(Object *object)
{