From 99c87fbf185157d599717d75ff3c2d114f2ae609 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Fri, 2 May 2025 15:17:23 +0200 Subject: [PATCH] Fix #137299: Exception with batch rename of nodes outside node editor I'm not sure when this stopped working. The function in question is quite confusing since it's called twice with two different purposes. Fixing the exception is simple though. Just checking the data type for "None" prevents changing the data type to one that's invalid given the context. I didn't find a simple way to add an error message though. Pull Request: https://projects.blender.org/blender/blender/pulls/138287 --- scripts/startup/bl_operators/wm.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/startup/bl_operators/wm.py b/scripts/startup/bl_operators/wm.py index ae59b7aecd2..3ef0b46a918 100644 --- a/scripts/startup/bl_operators/wm.py +++ b/scripts/startup/bl_operators/wm.py @@ -3031,6 +3031,10 @@ class WM_OT_batch_rename(Operator): "name", descr, ) + + if data is None: + return None + data = ([it for it in data[0] if _is_editable(it)], data[1], data[2]) return data