Fix T59237: Instancing on a path doesn't do anything
This commit makes it so curve path parent solving accepts an explicit arguments for both time and curve speed flag, making it so we don't have to mock around with scene's frame. One unfortunate issue still is that if the instancing object is used for something else, we might be running into a threading conflict. Possible solution would be to create a temp copy of an object, but then it will be an issue of preventing drivers from modifying other datablocks. At least the original issue is fixed now, and things behave same as in older Blender version. Additionally, the global variable which was defining curve speed flag behavior is gone now!
This commit is contained in:
@@ -4247,7 +4247,7 @@ static void followtrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase
|
||||
translate_m4(cob->matrix, track->bundle_pos[0], track->bundle_pos[1], track->bundle_pos[2]);
|
||||
}
|
||||
else {
|
||||
BKE_tracking_get_camera_object_matrix(depsgraph, cob->scene, camob_eval, mat);
|
||||
BKE_tracking_get_camera_object_matrix(cob->scene, camob_eval, mat);
|
||||
|
||||
mul_m4_m4m4(cob->matrix, obmat, mat);
|
||||
translate_m4(cob->matrix, track->bundle_pos[0], track->bundle_pos[1], track->bundle_pos[2]);
|
||||
@@ -4259,7 +4259,7 @@ static void followtrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase
|
||||
float aspect = (scene->r.xsch * scene->r.xasp) / (scene->r.ysch * scene->r.yasp);
|
||||
float len, d;
|
||||
|
||||
BKE_object_where_is_calc_mat4(depsgraph, scene, camob_eval, mat);
|
||||
BKE_object_where_is_calc_mat4(camob_eval, mat);
|
||||
|
||||
/* camera axis */
|
||||
vec[0] = 0.0f;
|
||||
@@ -4521,7 +4521,7 @@ static void objectsolver_evaluate(bConstraint *con, bConstraintOb *cob, ListBase
|
||||
float ctime = DEG_get_ctime(depsgraph);
|
||||
float framenr = BKE_movieclip_remap_scene_to_clip_frame(clip, ctime);
|
||||
|
||||
BKE_object_where_is_calc_mat4(depsgraph, scene, camob, cammat);
|
||||
BKE_object_where_is_calc_mat4(camob, cammat);
|
||||
|
||||
BKE_tracking_camera_get_reconstructed_interpolate(tracking, object, framenr, mat);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user