forked from blender/blender
Make object visibility and instancing creation to be calculated via depsgraph #57
@ -39,7 +39,9 @@ void PreviewEngine::update_render_result(std::vector<float> &pixels)
|
||||
|
||||
RenderLayer *layer = (RenderLayer *)result->layers.first;
|
||||
RenderPass *pass = (RenderPass *)layer->passes.first;
|
||||
memcpy(pass->buffer.data, pixels.data(), sizeof(float) * pass->rectx * pass->recty * pass->channels);
|
||||
memcpy(pass->buffer.data,
|
||||
pixels.data(),
|
||||
sizeof(float) * pass->rectx * pass->recty * pass->channels);
|
||||
|
||||
RE_engine_end_result(bl_engine_, result, false, false, false);
|
||||
}
|
||||
|
@ -60,8 +60,6 @@ static std::string cache_image_file(Image *image,
|
||||
}
|
||||
}
|
||||
BKE_image_save_options_free(&opts);
|
||||
|
||||
CLOG_INFO(LOG_RENDER_HYDRA_SCENE, 2, "%s -> %s", image->id.name, file_path.c_str());
|
||||
return file_path;
|
||||
}
|
||||
|
||||
@ -94,7 +92,7 @@ std::string cache_image_color(float color[4])
|
||||
char name[128];
|
||||
snprintf(name,
|
||||
sizeof(name),
|
||||
"color_%02x-%02x-%02x.hdr",
|
||||
"color_%02x%02x%02x.hdr",
|
||||
int(color[0] * 255),
|
||||
int(color[1] * 255),
|
||||
int(color[2] * 255));
|
||||
|
@ -270,9 +270,7 @@ void InstancerData::write_instances()
|
||||
for (auto &l_inst : light_instances_.values()) {
|
||||
update_light_instance(l_inst);
|
||||
}
|
||||
light_instances_.remove_if([&](auto item) {
|
||||
return item.value.transforms.empty();
|
||||
});
|
||||
light_instances_.remove_if([&](auto item) { return item.value.transforms.empty(); });
|
||||
}
|
||||
|
||||
void InstancerData::update_light_instance(LightInstance &inst)
|
||||
|
Loading…
Reference in New Issue
Block a user