Sometimes .blend files have compatibility issues between Blender versions, because .blend files depended on the specific order of geometry elements generated by some nodes/modifiers (#112746, #113018). While we make guarantees about the order in some places, that is relatively rare, because it makes future improvements much harder. The functionality in this patch makes it easier for users to notice when they depend on things that are not expected to be stable between Blender builds. This is achieved by adding a new global flag which indicates whether some algorithms should randomize their output. The functionality can be toggled on or off by searching for `Set Geometry Randomization`. If there are no differences (or acceptable minor ones) when the flag is on or off, one can be reasonably sure that one does not on unspecified behavior (can't be 100% sure though, because randomization might be missing in some places). If there are big differences, one should consider fixing the file before it comes to an actual breakage in the next Blender version. Currently, the setting is only available when `Developer Extras` is turned on, because the setting is in no menu. With this patch, if we get bug reports with compatibility issues caused by depending on indices, one of the following three cases should always apply: * We actually accidentally broke something, which requires a fix commit. * Turning on geometry randomization shows that the .blend file depends on things it shouldn't depend on. In this case the user has to fix the file. * We are missing geometry randomization somewhere, which requires a fix commit. Pull Request: https://projects.blender.org/blender/blender/pulls/113030
29 lines
879 B
C++
29 lines
879 B
C++
/* SPDX-FileCopyrightText: 2020 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/** \file
|
|
* \ingroup edgeometry
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
struct wmOperatorType;
|
|
|
|
namespace blender::ed::geometry {
|
|
|
|
/* *** geometry_attributes.cc *** */
|
|
void GEOMETRY_OT_attribute_add(wmOperatorType *ot);
|
|
void GEOMETRY_OT_attribute_remove(wmOperatorType *ot);
|
|
void GEOMETRY_OT_color_attribute_add(wmOperatorType *ot);
|
|
void GEOMETRY_OT_color_attribute_remove(wmOperatorType *ot);
|
|
void GEOMETRY_OT_color_attribute_render_set(wmOperatorType *ot);
|
|
void GEOMETRY_OT_color_attribute_duplicate(wmOperatorType *ot);
|
|
void GEOMETRY_OT_attribute_convert(wmOperatorType *ot);
|
|
void GEOMETRY_OT_color_attribute_convert(wmOperatorType *ot);
|
|
void GEOMETRY_OT_geometry_randomization(wmOperatorType *ot);
|
|
|
|
void GEOMETRY_OT_execute_node_group(wmOperatorType *ot);
|
|
|
|
} // namespace blender::ed::geometry
|