Merge branch 'blender-v2.92-release'
This commit is contained in:
commit
41982af6a0
|
@ -559,7 +559,7 @@ bool Session::acquire_tile(RenderTile &rtile, Device *tile_device, uint tile_typ
|
|||
|
||||
if (read_bake_tile_cb) {
|
||||
/* This will read any passes needed as input for baking. */
|
||||
{
|
||||
if (tile_manager.state.sample == tile_manager.range_start_sample) {
|
||||
thread_scoped_lock tile_lock(tile_mutex);
|
||||
read_bake_tile_cb(rtile);
|
||||
}
|
||||
|
|
|
@ -873,10 +873,19 @@ OutputAttributePtr::OutputAttributePtr(GeometryComponent &component,
|
|||
|
||||
const int domain_size = component.attribute_domain_size(domain);
|
||||
void *buffer = MEM_malloc_arrayN(domain_size, cpp_type->size(), __func__);
|
||||
cpp_type->construct_default_n(buffer, domain_size);
|
||||
GMutableSpan new_span{*cpp_type, buffer, domain_size};
|
||||
|
||||
/* Copy converted values from conflicting attribute, in case the value is read.
|
||||
* TODO: An optimization could be to not do this, when the caller says that the attribute will
|
||||
* only be written. */
|
||||
ReadAttributePtr src_attribute = component.attribute_get_for_read(
|
||||
final_name, domain, data_type, nullptr);
|
||||
for (const int i : blender::IndexRange(domain_size)) {
|
||||
src_attribute->get(i, new_span[i]);
|
||||
}
|
||||
|
||||
attribute_ = std::make_unique<blender::bke::TemporaryWriteAttribute>(
|
||||
domain, GMutableSpan{*cpp_type, buffer, domain_size}, component, std::move(final_name));
|
||||
domain, new_span, component, std::move(final_name));
|
||||
}
|
||||
|
||||
/* Store the computed attribute. If it was stored from the beginning already, nothing is done. This
|
||||
|
|
|
@ -554,6 +554,13 @@ static int gpencil_interpolate_invoke(bContext *C, wmOperator *op, const wmEvent
|
|||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
if (GPENCIL_CURVE_EDIT_SESSIONS_ON(gpd)) {
|
||||
BKE_report(op->reports,
|
||||
RPT_ERROR,
|
||||
"Cannot interpolate in curve edit mode");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
/* need editable strokes */
|
||||
if (!gpencil_interpolate_check_todo(C, gpd)) {
|
||||
BKE_report(op->reports, RPT_ERROR, "Interpolation requires some editable strokes");
|
||||
|
@ -978,6 +985,13 @@ static int gpencil_interpolate_seq_exec(bContext *C, wmOperator *op)
|
|||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
if (GPENCIL_CURVE_EDIT_SESSIONS_ON(gpd)) {
|
||||
BKE_report(op->reports,
|
||||
RPT_ERROR,
|
||||
"Cannot interpolate in curve edit mode");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
/* loop all layer to check if need interpolation */
|
||||
LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) {
|
||||
bGPDframe *prevFrame, *nextFrame;
|
||||
|
|
|
@ -178,24 +178,6 @@ static void init_view(Render *re)
|
|||
}
|
||||
}
|
||||
|
||||
static void init_camera(Render *re)
|
||||
{
|
||||
// It is assumed that imported meshes are in the camera coordinate system.
|
||||
// Therefore, the view point (i.e., camera position) is at the origin, and
|
||||
// the model-view matrix is simply the identity matrix.
|
||||
|
||||
zero_v3(g_freestyle.viewpoint);
|
||||
|
||||
unit_m4(g_freestyle.mv);
|
||||
|
||||
copy_m4_m4(g_freestyle.proj, re->winmat);
|
||||
|
||||
#if 0
|
||||
print_m4("mv", g_freestyle.mv);
|
||||
print_m4("proj", g_freestyle.proj);
|
||||
#endif
|
||||
}
|
||||
|
||||
static char *escape_quotes(char *name)
|
||||
{
|
||||
char *s = (char *)MEM_mallocN(strlen(name) * 2 + 1, "escape_quotes");
|
||||
|
@ -632,9 +614,8 @@ void FRS_init_stroke_renderer(Render *re)
|
|||
controller->ResetRenderCount();
|
||||
}
|
||||
|
||||
void FRS_begin_stroke_rendering(Render *re)
|
||||
void FRS_begin_stroke_rendering(Render *UNUSED(re))
|
||||
{
|
||||
init_camera(re);
|
||||
}
|
||||
|
||||
void FRS_do_stroke_rendering(Render *re, ViewLayer *view_layer)
|
||||
|
@ -657,6 +638,15 @@ void FRS_do_stroke_rendering(Render *re, ViewLayer *view_layer)
|
|||
Depsgraph *depsgraph = DEG_graph_new(re->main, re->scene, scene_view_layer, DAG_EVAL_RENDER);
|
||||
BKE_scene_graph_update_for_newframe(depsgraph);
|
||||
|
||||
/* Init camera
|
||||
* Objects are transformed into camera coordinate system, therefore the camera position
|
||||
* is zero and the modelview matrix is the identity matrix. */
|
||||
Object *ob_camera_orig = RE_GetCamera(re);
|
||||
Object *ob_camera_eval = DEG_get_evaluated_object(depsgraph, ob_camera_orig);
|
||||
zero_v3(g_freestyle.viewpoint);
|
||||
unit_m4(g_freestyle.mv);
|
||||
RE_GetCameraWindow(re, ob_camera_eval, g_freestyle.proj);
|
||||
|
||||
// prepare Freestyle:
|
||||
// - load mesh
|
||||
// - add style modules
|
||||
|
|
Loading…
Reference in New Issue