Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/eevee/eevee_motion_blur.c
| Show All 23 Lines | |||||
| #include "DRW_render.h" | #include "DRW_render.h" | ||||
| #include "BLI_rand.h" | #include "BLI_rand.h" | ||||
| #include "BLI_string_utils.h" | #include "BLI_string_utils.h" | ||||
| #include "BKE_animsys.h" | #include "BKE_animsys.h" | ||||
| #include "BKE_camera.h" | #include "BKE_camera.h" | ||||
| #include "BKE_duplilist.h" | |||||
| #include "BKE_object.h" | #include "BKE_object.h" | ||||
| #include "BKE_screen.h" | #include "BKE_screen.h" | ||||
| #include "DNA_anim_types.h" | #include "DNA_anim_types.h" | ||||
| #include "DNA_camera_types.h" | #include "DNA_camera_types.h" | ||||
| #include "DNA_mesh_types.h" | #include "DNA_mesh_types.h" | ||||
| #include "DNA_modifier_types.h" | #include "DNA_modifier_types.h" | ||||
| #include "DNA_particle_types.h" | #include "DNA_particle_types.h" | ||||
| ▲ Show 20 Lines • Show All 273 Lines • ▼ Show 20 Lines | |||||
| #endif | #endif | ||||
| const bool is_deform = BKE_object_is_deform_modified(DRW_context_state_get()->scene, ob) || | const bool is_deform = BKE_object_is_deform_modified(DRW_context_state_get()->scene, ob) || | ||||
| (has_rigidbody && (rbo->flag & RBO_FLAG_USE_DEFORM) != 0); | (has_rigidbody && (rbo->flag & RBO_FLAG_USE_DEFORM) != 0); | ||||
| if (!(object_moves || is_deform)) { | if (!(object_moves || is_deform)) { | ||||
| return; | return; | ||||
| } | } | ||||
| const DupliObject *dup = DRW_object_get_dupli(ob); | |||||
| if (dup != NULL && dup->ob->data != dup->ob_data) { | |||||
| /* Geometry instances do not support motion blur correct yet. The #key used in | |||||
| * #motion_blur_deform_data_get has to take id of instances (#DupliObject.persistent_id) into | |||||
| * account for correct mapping of geometry instances in different time steps. */ | |||||
| return; | |||||
| } | |||||
| EEVEE_ObjectMotionData *mb_data = EEVEE_motion_blur_object_data_get( | EEVEE_ObjectMotionData *mb_data = EEVEE_motion_blur_object_data_get( | ||||
| &effects->motion_blur, ob, false); | &effects->motion_blur, ob, false); | ||||
| if (mb_data) { | if (mb_data) { | ||||
| int mb_step = effects->motion_blur_step; | int mb_step = effects->motion_blur_step; | ||||
| /* Store transform. */ | /* Store transform. */ | ||||
| copy_m4_m4(mb_data->obmat[mb_step], ob->obmat); | copy_m4_m4(mb_data->obmat[mb_step], ob->obmat); | ||||
| ▲ Show 20 Lines • Show All 276 Lines • Show Last 20 Lines | |||||