Fix #100596: Use sequencer override camera for line art in render #110287
@ -13,6 +13,7 @@ set(INC
|
||||
../editors/include
|
||||
../makesrna
|
||||
../render
|
||||
../render/intern
|
||||
../windowmanager
|
||||
../../../intern/eigen
|
||||
|
||||
|
@ -52,6 +52,9 @@
|
||||
#include "DNA_scene_types.h"
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "RE_pipeline.h"
|
||||
#include "render_types.h"
|
||||
ChengduLittleA marked this conversation as resolved
|
||||
|
||||
#include "lineart_intern.h"
|
||||
|
||||
struct LineartIsecSingle {
|
||||
@ -4991,34 +4994,42 @@ bool MOD_lineart_compute_feature_lines(Depsgraph *depsgraph,
|
||||
LineartData *ld;
|
||||
Scene *scene = DEG_get_evaluated_scene(depsgraph);
|
||||
int intersections_only = 0; /* Not used right now, but preserve for future. */
|
||||
ChengduLittleA marked this conversation as resolved
Outdated
Falk David
commented
Maybe Maybe `lineart_camera` would be a better name here?
|
||||
Object *use_camera;
|
||||
Object *lineart_camera = nullptr;
|
||||
|
||||
double t_start;
|
||||
if (G.debug_value == 4000) {
|
||||
t_start = PIL_check_seconds_timer();
|
||||
}
|
||||
|
||||
ChengduLittleA marked this conversation as resolved
Outdated
Falk David
commented
`re_override` -> `use_render_camera_override`
|
||||
bool use_render_camera_override = false;
|
||||
if (lmd->calculation_flags & LRT_USE_CUSTOM_CAMERA) {
|
||||
if (!lmd->source_camera ||
|
||||
(use_camera = DEG_get_evaluated_object(depsgraph, lmd->source_camera))->type != OB_CAMERA)
|
||||
(lineart_camera = DEG_get_evaluated_object(depsgraph, lmd->source_camera))->type !=
|
||||
OB_CAMERA)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
ChengduLittleA marked this conversation as resolved
Outdated
Falk David
commented
`re` -> `render`
|
||||
else {
|
||||
|
||||
BKE_scene_camera_switch_update(scene);
|
||||
|
||||
if (!scene->camera) {
|
||||
return false;
|
||||
Render *render = RE_GetSceneRender(scene);
|
||||
if (render && render->camera_override) {
|
||||
lineart_camera = DEG_get_evaluated_object(depsgraph, render->camera_override);
|
||||
use_render_camera_override = true;
|
||||
}
|
||||
if (!lineart_camera) {
|
||||
BKE_scene_camera_switch_update(scene);
|
||||
if (!scene->camera) {
|
||||
return false;
|
||||
}
|
||||
lineart_camera = scene->camera;
|
||||
}
|
||||
use_camera = scene->camera;
|
||||
}
|
||||
|
||||
LineartCache *lc = lineart_init_cache();
|
||||
*cached_result = lc;
|
||||
|
||||
ld = lineart_create_render_buffer(scene, lmd, use_camera, scene->camera, lc);
|
||||
ld = lineart_create_render_buffer(
|
||||
scene, lmd, lineart_camera, use_render_camera_override ? lineart_camera : scene->camera, lc);
|
||||
|
||||
/* Triangle thread testing data size varies depending on the thread count.
|
||||
* See definition of LineartTriangleThread for details. */
|
||||
@ -5042,7 +5053,7 @@ bool MOD_lineart_compute_feature_lines(Depsgraph *depsgraph,
|
||||
|
||||
lineart_main_load_geometries(depsgraph,
|
||||
scene,
|
||||
use_camera,
|
||||
lineart_camera,
|
||||
ld,
|
||||
lmd->calculation_flags & LRT_ALLOW_DUPLI_OBJECTS,
|
||||
false,
|
||||
|
Loading…
Reference in New Issue
Block a user
I have to use
#include "intern/render_types.h"
if I want to build with xcode.