Post #4974: I have understood the operational conditions of the script and created a macro u

πŸ“‹ Metadata

🏷️ Tags

macro scripting intermediate unsolved

  • Macro Editor
  • Python Scripting

πŸ’¬ Content

I have understood the operational conditions of the script and created a macro using it. Please check if it functions as follows:

AutoObjectSwitcher.json (1.1 KB)

print(f"Object renamed to {new_name} and selected as the active object.")

This message might have led you to believe that the object was being renamed, but that’s not actually the case, right? The script operates by selecting an object with a specific suffix. Therefore, the output message should be appropriately modified to:

print(f"Selected object: {new_name}")

This script could crash Blender if there is no object with the intended name, which I think is a significant risk. Therefore, I strongly recommend adding proper error handling to the script.


πŸ”— View on Blender Artists