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/editors/transform
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/editors/transform')
-rw-r--r--source/blender/editors/transform/transform.c26
-rw-r--r--source/blender/editors/transform/transform.h6
-rw-r--r--source/blender/editors/transform/transform_conversions.c50
-rw-r--r--source/blender/editors/transform/transform_generics.c16
-rw-r--r--source/blender/editors/transform/transform_orientations.c2
-rw-r--r--source/blender/editors/transform/transform_snap.c2
-rw-r--r--source/blender/editors/transform/transform_snap_object.c2
7 files changed, 52 insertions, 52 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 79d06de8b41..f0e90a05a3b 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -782,7 +782,7 @@ enum {
TFM_MODAL_ADD_SNAP = 16,
TFM_MODAL_REMOVE_SNAP = 17,
-/* 18 and 19 used by numinput, defined in transform.h */
+/* 18 and 19 used by numinput, defined in transform.h */
TFM_MODAL_PROPSIZE_UP = 20,
TFM_MODAL_PROPSIZE_DOWN = 21,
@@ -1852,7 +1852,7 @@ static void drawTransformPixel(const struct bContext *UNUSED(C), ARegion *ar, vo
/* draw autokeyframing hint in the corner
* - only draw if enabled (advanced users may be distracted/annoyed),
- * for objects that will be autokeyframed (no point ohterwise),
+ * for objects that will be autokeyframed (no point otherwise),
* AND only for the active region (as showing all is too overwhelming)
*/
if ((U.autokey_flag & AUTOKEY_FLAG_NOWARNING) == 0) {
@@ -2561,8 +2561,8 @@ static void constraintTransLim(TransInfo *t, TransData *td)
float ctime = (float)(t->scene->r.cfra);
/* Make a temporary bConstraintOb for using these limit constraints
- * - they only care that cob->matrix is correctly set ;-)
- * - current space should be local
+ * - they only care that cob->matrix is correctly set ;-)
+ * - current space should be local
*/
unit_m4(cob.matrix);
copy_v3_v3(cob.matrix[3], td->loc);
@@ -2599,7 +2599,7 @@ static void constraintTransLim(TransInfo *t, TransData *td)
mul_m4_m3m4(cob.matrix, td->mtx, cob.matrix);
}
else if (con->ownspace != CONSTRAINT_SPACE_LOCAL) {
- /* skip... incompatable spacetype */
+ /* skip... incompatible spacetype */
continue;
}
@@ -2628,8 +2628,8 @@ static void constraintTransLim(TransInfo *t, TransData *td)
static void constraintob_from_transdata(bConstraintOb *cob, TransData *td)
{
/* Make a temporary bConstraintOb for use by limit constraints
- * - they only care that cob->matrix is correctly set ;-)
- * - current space should be local
+ * - they only care that cob->matrix is correctly set ;-)
+ * - current space should be local
*/
memset(cob, 0, sizeof(bConstraintOb));
if (td->ext) {
@@ -2675,7 +2675,7 @@ static void constraintRotLim(TransInfo *UNUSED(t), TransData *td)
if ((data->flag2 & LIMIT_TRANSFORM) == 0)
continue;
- /* skip incompatable spacetypes */
+ /* skip incompatible spacetypes */
if (!ELEM(con->ownspace, CONSTRAINT_SPACE_WORLD, CONSTRAINT_SPACE_LOCAL))
continue;
@@ -2730,8 +2730,8 @@ static void constraintSizeLim(TransInfo *t, TransData *td)
int i;
/* Make a temporary bConstraintOb for using these limit constraints
- * - they only care that cob->matrix is correctly set ;-)
- * - current space should be local
+ * - they only care that cob->matrix is correctly set ;-)
+ * - current space should be local
*/
if ((td->flag & TD_SINGLESIZE) && !(t->con.mode & CON_APPLY)) {
/* scale val and reset size */
@@ -5713,7 +5713,7 @@ static void calcEdgeSlideCustomPoints(struct TransInfo *t)
setCustomPoints(t, &t->mouse, sld->mval_end, sld->mval_start);
/* setCustomPoints isn't normally changing as the mouse moves,
- * in this case apply mouse input immediatly so we don't refresh
+ * in this case apply mouse input immediately so we don't refresh
* with the value from the previous points */
applyMouseInput(t, &t->mouse, t->mval, t->values);
}
@@ -7081,7 +7081,7 @@ static void calcVertSlideCustomPoints(struct TransInfo *t)
}
/* setCustomPoints isn't normally changing as the mouse moves,
- * in this case apply mouse input immediatly so we don't refresh
+ * in this case apply mouse input immediately so we don't refresh
* with the value from the previous points */
applyMouseInput(t, &t->mouse, t->mval, t->values);
}
@@ -8056,7 +8056,7 @@ static short getAnimEdit_SnapMode(TransInfo *t)
}
/* toggle autosnap on/off
- * - when toggling on, prefer nearest frame over 1.0 frame increments
+ * - when toggling on, prefer nearest frame over 1.0 frame increments
*/
if (t->modifiers & MOD_SNAP_INVERT) {
if (autosnap)
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h
index d53f51f5076..5369fc05005 100644
--- a/source/blender/editors/transform/transform.h
+++ b/source/blender/editors/transform/transform.h
@@ -150,7 +150,7 @@ typedef struct TransDataExtension {
float r_mtx[3][3]; /* The rotscale matrix of pose bone, to allow using snap-align in translation mode,
* when td->mtx is the loc pose bone matrix (and hence can't be used to apply rotation in some cases,
* namely when a bone is in "NoLocal" or "Hinge" mode)... */
- float r_smtx[3][3]; /* Invers of previous one. */
+ float r_smtx[3][3]; /* Inverse of previous one. */
int rotOrder; /* rotation mode, as defined in eRotationModes (DNA_action_types.h) */
float oloc[3], orot[3], oquat[4], orotAxis[3], orotAngle; /* Original object transformation used for rigid bodies */
} TransDataExtension;
@@ -163,7 +163,7 @@ typedef struct TransData2D {
float ih1[2], ih2[2];
} TransData2D;
-/* we need to store 2 handles for each transdata in case the other handle wasnt selected */
+/* we need to store 2 handles for each transdata in case the other handle wasn't selected */
typedef struct TransDataCurveHandleFlags {
char ih1, ih2;
char *h1, *h2;
@@ -522,7 +522,7 @@ typedef struct TransInfo {
#define T_AUTOVALUES (1 << 20)
- /* to specificy if we save back settings at the end */
+ /* to specify if we save back settings at the end */
#define T_MODAL (1 << 21)
/* no retopo */
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 53f1aaef473..da4ee21ff6f 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -2291,7 +2291,7 @@ static struct TransIslandData *editmesh_islands_info_calc(
vert_map = MEM_mallocN(sizeof(*vert_map) * bm->totvert, __func__);
/* we shouldn't need this, but with incorrect selection flushing
- * its possible we have a selected vertex thats not in a face, for now best not crash in that case. */
+ * its possible we have a selected vertex that's not in a face, for now best not crash in that case. */
copy_vn_i(vert_map, bm->totvert, -1);
BM_mesh_elem_table_ensure(bm, htype);
@@ -2895,7 +2895,7 @@ void flushTransSeq(TransInfo *t)
if (seq != seq_prev) {
if (seq->depth == 0) {
- /* test overlap, displayes red outline */
+ /* test overlap, displays red outline */
seq->flag &= ~SEQ_OVERLAP;
if (BKE_sequence_test_overlap(seqbasep, seq)) {
seq->flag |= SEQ_OVERLAP;
@@ -3314,13 +3314,13 @@ static void createTransNlaData(bContext *C, TransInfo *t)
if (strip->type != NLASTRIP_TYPE_TRANSITION) {
if (strip->flag & NLASTRIP_FLAG_SELECT) {
/* our transform data is constructed as follows:
- * - only the handles on the right side of the current-frame get included
- * - td structs are transform-elements operated on by the transform system
- * and represent a single handle. The storage/pointer used (val or loc) depends on
- * whether we're scaling or transforming. Ultimately though, the handles
- * the td writes to will simply be a dummy in tdn
- * - for each strip being transformed, a single tdn struct is used, so in some
- * cases, there will need to be 1 of these tdn elements in the array skipped...
+ * - only the handles on the right side of the current-frame get included
+ * - td structs are transform-elements operated on by the transform system
+ * and represent a single handle. The storage/pointer used (val or loc) depends on
+ * whether we're scaling or transforming. Ultimately though, the handles
+ * the td writes to will simply be a dummy in tdn
+ * - for each strip being transformed, a single tdn struct is used, so in some
+ * cases, there will need to be 1 of these tdn elements in the array skipped...
*/
float center[3], yval;
@@ -4501,9 +4501,9 @@ static void createTransGraphEditData(bContext *C, TransInfo *t)
}
/* special hack (must be done after initTransDataCurveHandles(), as that stores handle settings to restore...):
- * - Check if we've got entire BezTriple selected and we're scaling/rotating that point,
- * then check if we're using auto-handles.
- * - If so, change them auto-handles to aligned handles so that handles get affected too
+ * - Check if we've got entire BezTriple selected and we're scaling/rotating that point,
+ * then check if we're using auto-handles.
+ * - If so, change them auto-handles to aligned handles so that handles get affected too
*/
if (ELEM(bezt->h1, HD_AUTO, HD_AUTO_ANIM) &&
ELEM(bezt->h2, HD_AUTO, HD_AUTO_ANIM) &&
@@ -4807,9 +4807,9 @@ void flushTransGraphData(TransInfo *t)
float inv_unit_scale = 1.0f / tdg->unit_scale;
/* handle snapping for time values
- * - we should still be in NLA-mapping timespace
- * - only apply to keyframes (but never to handles)
- * - don't do this when canceling, or else these changes won't go away
+ * - we should still be in NLA-mapping timespace
+ * - only apply to keyframes (but never to handles)
+ * - don't do this when canceling, or else these changes won't go away
*/
if ((t->state != TRANS_CANCEL) && (td->flag & TD_NOTIMESNAP) == 0) {
switch (sipo->autosnap) {
@@ -5525,9 +5525,9 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob)
td->con = ob->constraints.first;
/* hack: temporarily disable tracking and/or constraints when getting
- * object matrix, if tracking is on, or if constraints don't need
- * inverse correction to stop it from screwing up space conversion
- * matrix later
+ * object matrix, if tracking is on, or if constraints don't need
+ * inverse correction to stop it from screwing up space conversion
+ * matrix later
*/
constinv = constraints_list_needinv(t, &ob->constraints);
@@ -5593,7 +5593,7 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob)
/* Get the effect of parenting, and/or certain constraints.
* NOTE: some Constraints, and also Tracking should never get this
- * done, as it doesn't work well.
+ * done, as it doesn't work well.
*/
BKE_object_to_mat3(ob, obmtx);
copy_m3_m4(totmat, ob->obmat);
@@ -5923,9 +5923,9 @@ void autokeyframe_pose_cb_func(bContext *C, Scene *scene, View3D *v3d, Object *o
short flag = 0;
/* flag is initialized from UserPref keyframing settings
- * - special exception for targetless IK - INSERTKEY_MATRIX keyframes should get
- * visual keyframes even if flag not set, as it's not that useful otherwise
- * (for quick animation recording)
+ * - special exception for targetless IK - INSERTKEY_MATRIX keyframes should get
+ * visual keyframes even if flag not set, as it's not that useful otherwise
+ * (for quick animation recording)
*/
flag = ANIM_get_keyframing_flags(scene, 1);
@@ -6021,9 +6021,9 @@ void autokeyframe_pose_cb_func(bContext *C, Scene *scene, View3D *v3d, Object *o
}
/* do the bone paths
- * - only do this when there is context info, since we need that to resolve
- * how to do the updates and so on...
- * - do not calculate unless there are paths already to update...
+ * - only do this when there is context info, since we need that to resolve
+ * how to do the updates and so on...
+ * - do not calculate unless there are paths already to update...
*/
if (C && (ob->pose->avs.path_bakeflag & MOTIONPATH_BAKE_HAS_PATHS)) {
//ED_pose_clear_paths(C, ob); // XXX for now, don't need to clear
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 9a2c3674d2a..5e24a3d9e47 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -259,9 +259,9 @@ static void animrecord_check_state(Scene *scene, ID *id, wmTimer *animtimer)
return;
/* check if we need a new strip if:
- * - if animtimer is running
- * - we're not only keying for available channels
- * - the option to add new actions for each round is not enabled
+ * - if animtimer is running
+ * - we're not only keying for available channels
+ * - the option to add new actions for each round is not enabled
*/
if (IS_AUTOKEY_FLAG(scene, INSERTAVAIL) == 0 && (scene->toolsettings->autokey_flag & ANIMRECORD_FLAG_WITHNLA)) {
/* if playback has just looped around, we need to add a new NLA track+strip to allow a clean pass to occur */
@@ -303,7 +303,7 @@ static void animrecord_check_state(Scene *scene, ID *id, wmTimer *animtimer)
* NOTE: An alternative way would have been to instead hack the influence
* to not get always get reset to full strength if NLASTRIP_FLAG_USR_INFLUENCE
* is disabled but auto-blending isn't being used. However, that approach
- * is a bit hacky/hard to discover, and may cause backwards compatability issues,
+ * is a bit hacky/hard to discover, and may cause backwards compatibility issues,
* so it's better to just do it this way.
*/
strip->flag |= NLASTRIP_FLAG_USR_INFLUENCE;
@@ -516,8 +516,8 @@ static void recalcData_nla(TransInfo *t)
if ((pExceeded && nExceeded) || (iter == 4)) {
/* both endpoints exceeded (or iteration ping-pong'd meaning that we need a compromise)
- * - simply crop strip to fit within the bounds of the strips bounding it
- * - if there were no neighbors, clear the transforms (make it default to the strip's current values)
+ * - simply crop strip to fit within the bounds of the strips bounding it
+ * - if there were no neighbors, clear the transforms (make it default to the strip's current values)
*/
if (strip->prev && strip->next) {
tdn->h1[0] = strip->prev->end;
@@ -607,7 +607,7 @@ static void recalcData_nla(TransInfo *t)
/* now, check if we need to try and move track
- * - we need to calculate both, as only one may have been altered by transform if only 1 handle moved
+ * - we need to calculate both, as only one may have been altered by transform if only 1 handle moved
*/
delta_y1 = ((int)tdn->h1[1] / NLACHANNEL_STEP(snla) - tdn->trackIndex);
delta_y2 = ((int)tdn->h2[1] / NLACHANNEL_STEP(snla) - tdn->trackIndex);
@@ -760,7 +760,7 @@ static void recalcData_objects(TransInfo *t)
else {
/* Normal updating */
while (nu) {
- BKE_nurb_test2D(nu);
+ BKE_nurb_test_2d(nu);
BKE_nurb_handles_calc(nu);
nu = nu->next;
}
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 4122cf33bdb..8cd31c32911 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -662,7 +662,7 @@ int getTransformOrientation_ex(const bContext *C, float normal[3], float plane[3
}
if (em->bm->totedgesel >= 1) {
- /* find an edge thats apart of v_tri (no need to search all edges) */
+ /* find an edge that's apart of v_tri (no need to search all edges) */
float e_length;
int j;
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index 8bc53127b4c..b06f22f50cc 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -611,7 +611,7 @@ static void initSnappingMode(TransInfo *t)
(bool (*)(BMVert *, void *))BM_elem_cb_check_hflag_disabled,
bm_edge_is_snap_target,
bm_face_is_snap_target,
- SET_UINT_IN_POINTER((BM_ELEM_SELECT | BM_ELEM_HIDDEN)));
+ POINTER_FROM_UINT((BM_ELEM_SELECT | BM_ELEM_HIDDEN)));
}
}
}
diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c
index f9c628877c1..1c6ad1fe752 100644
--- a/source/blender/editors/transform/transform_snap_object.c
+++ b/source/blender/editors/transform/transform_snap_object.c
@@ -2425,7 +2425,7 @@ bool ED_transform_snap_object_project_all_view3d_ex(
{
float ray_start[3], ray_normal[3];
- if (!ED_view3d_win_to_ray_ex(
+ if (!ED_view3d_win_to_ray_clipped_ex(
sctx->v3d_data.ar, sctx->v3d_data.v3d,
mval, NULL, ray_normal, ray_start, true))
{