Fix: Use new USER_DEVELOPER_TOOL_TEST macro where appropriate

Missed in fb91e576ca

Changes all of the non-sanitized, always available options to use the
new macro to match previous behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/146118
This commit is contained in:
Sean Kim
2025-09-12 01:42:52 +02:00
committed by Sean Kim
parent fb91e576ca
commit a426e70bf6
6 changed files with 11 additions and 11 deletions

View File

@@ -86,7 +86,7 @@ namespace blender::bke::liboverride {
bool is_auto_resync_enabled()
{
return !USER_EXPERIMENTAL_TEST(&U, no_override_auto_resync) &&
return !USER_DEVELOPER_TOOL_TEST(&U, no_override_auto_resync) &&
(G.fileflags & G_LIBOVERRIDE_NO_AUTO_RESYNC) == 0;
}

View File

@@ -744,7 +744,7 @@ static void write_bhead(WriteData *wd, const BHead &bhead)
return;
}
/* Write new #LargeBHead8 headers if enabled. Older Blender versions can't read those. */
if (!USER_EXPERIMENTAL_TEST(&U, write_legacy_blend_file_format)) {
if (!USER_DEVELOPER_TOOL_TEST(&U, write_legacy_blend_file_format)) {
if (SYSTEM_SUPPORTS_WRITING_FILE_VERSION_1) {
static_assert(sizeof(BHead) == sizeof(LargeBHead8));
mywrite(wd, &bhead, sizeof(bhead));
@@ -786,7 +786,7 @@ static void writestruct_at_address_nr(WriteData *wd,
const int64_t len_in_bytes = nr * DNA_struct_size(wd->sdna, struct_nr);
if (!SYSTEM_SUPPORTS_WRITING_FILE_VERSION_1 ||
USER_EXPERIMENTAL_TEST(&U, write_legacy_blend_file_format))
USER_DEVELOPER_TOOL_TEST(&U, write_legacy_blend_file_format))
{
if (len_in_bytes > INT32_MAX) {
CLOG_ERROR(&LOG, "Cannot write chunks bigger than INT_MAX.");
@@ -859,7 +859,7 @@ static void writedata(WriteData *wd, const int filecode, const size_t len, const
}
if ((!SYSTEM_SUPPORTS_WRITING_FILE_VERSION_1 ||
USER_EXPERIMENTAL_TEST(&U, write_legacy_blend_file_format)) &&
USER_DEVELOPER_TOOL_TEST(&U, write_legacy_blend_file_format)) &&
len > INT_MAX)
{
BLI_assert_msg(0, "Cannot write chunks bigger than INT_MAX.");
@@ -1397,7 +1397,7 @@ static int write_id_direct_linked_data_process_cb(LibraryIDLinkCallbackData *cb_
static std::string get_blend_file_header()
{
if (SYSTEM_SUPPORTS_WRITING_FILE_VERSION_1 &&
!USER_EXPERIMENTAL_TEST(&U, write_legacy_blend_file_format))
!USER_DEVELOPER_TOOL_TEST(&U, write_legacy_blend_file_format))
{
const int header_size_in_bytes = SIZEOFBLENDERHEADER_VERSION_1;
@@ -1530,7 +1530,7 @@ static bool write_file_handle(Main *mainvar,
ID *id_iter;
FOREACH_MAIN_ID_BEGIN (mainvar, id_iter) {
if (ID_IS_LINKED(id_iter) && BKE_idtype_idcode_is_linkable(GS(id_iter->name))) {
if (USER_EXPERIMENTAL_TEST(&U, use_all_linked_data_direct)) {
if (USER_DEVELOPER_TOOL_TEST(&U, use_all_linked_data_direct)) {
/* Forces all linked data to be considered as directly linked.
* FIXME: Workaround some BAT tool limitations for Heist production, should be removed
* asap afterward. */
@@ -1564,7 +1564,7 @@ static bool write_file_handle(Main *mainvar,
/* Recompute all ID user-counts if requested. Allows to avoid skipping writing of IDs wrongly
* detected as unused due to invalid user-count. */
if (!wd->use_memfile) {
if (USER_EXPERIMENTAL_TEST(&U, use_recompute_usercount_on_save_debug)) {
if (USER_DEVELOPER_TOOL_TEST(&U, use_recompute_usercount_on_save_debug)) {
BKE_main_id_refcount_recompute(mainvar, false);
}
}

View File

@@ -189,7 +189,7 @@ ResourceHandleRange Manager::unique_handle_for_sculpt(const ObjectRef &ref)
void Manager::compute_visibility(View &view)
{
bool freeze_culling = (USER_EXPERIMENTAL_TEST(&U, use_viewport_debug) && drw_get().v3d &&
bool freeze_culling = (USER_DEVELOPER_TOOL_TEST(&U, use_viewport_debug) && drw_get().v3d &&
(drw_get().v3d->debug_flag & V3D_DEBUG_FREEZE_CULLING) != 0);
BLI_assert_msg(view.manager_fingerprint_ != this->fingerprint_get(),

View File

@@ -133,7 +133,7 @@ void AssetList::setup()
"",
"");
const bool use_asset_indexer = !USER_EXPERIMENTAL_TEST(&U, no_asset_indexing);
const bool use_asset_indexer = !USER_DEVELOPER_TOOL_TEST(&U, no_asset_indexing);
filelist_setindexer(files, use_asset_indexer ? &index::file_indexer_asset : &file_indexer_noop);
char dirpath[FILE_MAX_LIBEXTRA] = "";

View File

@@ -254,7 +254,7 @@ static void file_refresh(const bContext *C, ScrArea *area)
}
if (ED_fileselect_is_asset_browser(sfile)) {
const bool use_asset_indexer = !USER_EXPERIMENTAL_TEST(&U, no_asset_indexing);
const bool use_asset_indexer = !USER_DEVELOPER_TOOL_TEST(&U, no_asset_indexing);
filelist_setindexer(
sfile->files, use_asset_indexer ? &asset::index::file_indexer_asset : &file_indexer_noop);
}

View File

@@ -168,7 +168,7 @@ static void memfile_undosys_step_decode(
bool use_old_bmain_data = true;
if (USER_EXPERIMENTAL_TEST(&U, use_undo_legacy) || !(U.uiflag & USER_GLOBALUNDO)) {
if (USER_DEVELOPER_TOOL_TEST(&U, use_undo_legacy) || !(U.uiflag & USER_GLOBALUNDO)) {
use_old_bmain_data = false;
}
else if (undo_direction == STEP_REDO) {