Eevee-Next: World Reflective Light #108149
|
@ -1442,6 +1442,9 @@ void BKE_mesh_legacy_bevel_weight_to_generic(Mesh *mesh)
|
|||
void BKE_mesh_legacy_edge_crease_to_layers(Mesh *mesh)
|
||||
{
|
||||
using namespace blender;
|
||||
if (!mesh->medge) {
|
||||
return;
|
||||
}
|
||||
if (CustomData_has_layer(&mesh->edata, CD_CREASE)) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -35,8 +35,10 @@ static const aal::RelationsInNode &get_relations_in_node(const bNode &node, Reso
|
|||
if (!ntreeIsRegistered(group)) {
|
||||
return scope.construct<aal::RelationsInNode>();
|
||||
}
|
||||
|
||||
BLI_assert(group->runtime->anonymous_attribute_inferencing);
|
||||
/* It's possible that the inferencing failed on the group. */
|
||||
if (!group->runtime->anonymous_attribute_inferencing) {
|
||||
return scope.construct<aal::RelationsInNode>();
|
||||
}
|
||||
return group->runtime->anonymous_attribute_inferencing->tree_relations;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -295,6 +295,13 @@ static std::unique_ptr<bNodeTreeZones> discover_tree_zones(const bNodeTree &tree
|
|||
return {};
|
||||
}
|
||||
|
||||
for (const bNode *node : tree.nodes_by_type("NodeGroupOutput")) {
|
||||
if (tree_zones->zone_by_node_id.contains(node->identifier)) {
|
||||
/* Group output nodes must not be in a zone. */
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
for (const int node_i : all_nodes.index_range()) {
|
||||
const bNode *node = all_nodes[node_i];
|
||||
const int zone_i = tree_zones->zone_by_node_id.lookup_default(node->identifier, -1);
|
||||
|
|
|
@ -651,10 +651,8 @@ void EEVEE_render_draw(EEVEE_Data *vedata, RenderEngine *engine, RenderLayer *rl
|
|||
/* Post Process */
|
||||
EEVEE_draw_effects(sldata, vedata);
|
||||
|
||||
/* NOTE(@fclem): Seems to fix TDR issue with NVidia drivers. */
|
||||
if (GPU_type_matches_ex(GPU_DEVICE_NVIDIA, GPU_OS_ANY, GPU_DRIVER_ANY, GPU_BACKEND_OPENGL)) {
|
||||
GPU_finish();
|
||||
}
|
||||
/* XXX Seems to fix TDR issue with NVidia drivers on linux. */
|
||||
GPU_finish();
|
||||
|
||||
/* Perform render step between samples to allow
|
||||
* flushing of freed GPUBackend resources. */
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
#include "RNA_access.h"
|
||||
#include "RNA_define.h"
|
||||
|
||||
#include "DNA_scene_types.h"
|
||||
|
||||
#include "WM_api.h"
|
||||
|
||||
namespace blender::ed::greasepencil {
|
||||
|
@ -24,21 +26,27 @@ static int grease_pencil_layer_add_exec(bContext *C, wmOperator *op)
|
|||
{
|
||||
using namespace blender::bke::greasepencil;
|
||||
Object *object = CTX_data_active_object(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
GreasePencil &grease_pencil = *static_cast<GreasePencil *>(object->data);
|
||||
|
||||
int new_layer_name_length;
|
||||
char *new_layer_name = RNA_string_get_alloc(
|
||||
op->ptr, "new_layer_name", nullptr, 0, &new_layer_name_length);
|
||||
|
||||
grease_pencil.add_empty_drawings(1);
|
||||
GreasePencilFrame frame{int(grease_pencil.drawings().size() - 1), 0, BEZT_KEYTYPE_KEYFRAME};
|
||||
|
||||
if (grease_pencil.has_active_layer()) {
|
||||
LayerGroup &active_group = grease_pencil.get_active_layer()->parent_group();
|
||||
Layer &new_layer = grease_pencil.add_layer_after(
|
||||
active_group, grease_pencil.get_active_layer_for_write(), new_layer_name);
|
||||
grease_pencil.set_active_layer(&new_layer);
|
||||
new_layer.insert_frame(scene->r.cfra, frame);
|
||||
}
|
||||
else {
|
||||
Layer &new_layer = grease_pencil.add_layer(new_layer_name);
|
||||
grease_pencil.set_active_layer(&new_layer);
|
||||
new_layer.insert_frame(scene->r.cfra, frame);
|
||||
}
|
||||
|
||||
MEM_SAFE_FREE(new_layer_name);
|
||||
|
|
|
@ -3866,12 +3866,10 @@ int ED_region_snap_size_test(const ARegion *region)
|
|||
/* Use a larger value because toggling scrollbars can jump in size. */
|
||||
const int snap_match_threshold = 16;
|
||||
if (region->type->snap_size != nullptr) {
|
||||
return ((((region->sizex - region->type->snap_size(region, region->sizex, 0)) <=
|
||||
snap_match_threshold)
|
||||
<< 0) |
|
||||
(((region->sizey - region->type->snap_size(region, region->sizey, 1)) <=
|
||||
snap_match_threshold)
|
||||
<< 1));
|
||||
const int snap_size_x = region->type->snap_size(region, region->sizex, 0);
|
||||
const int snap_size_y = region->type->snap_size(region, region->sizey, 1);
|
||||
return (((abs(region->sizex - snap_size_x) <= snap_match_threshold) << 0) |
|
||||
((abs(region->sizey - snap_size_y) <= snap_match_threshold) << 1));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1555,7 +1555,6 @@ static int pack_islands_exec(bContext *C, wmOperator *op)
|
|||
pack_islands_endjob(pid);
|
||||
pack_islands_freejob(pid);
|
||||
|
||||
MEM_freeN(pid);
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue