Replaces an expression in all Blender Text data-blocks
Hi, I just created (with a lot of help from Gemini!) a function to replace an expression in multiple text blocks.
Seems to work - quite well. I often change something in a function because I am constantly learning new and better ways to do something in Python.
Maybe you find the function useful too - or have suggestions for improvements?
replace_text_with_exclusion(
search_string = "export_object_as_stl",
replace_string = "export_obj_as_stl",
exclude_names = ["this_text_block", "do_not_touch_either"])
2
0 comments
Kai Konnarth
3
Replaces an expression in all Blender Text data-blocks
CG Python Academy (Free)
skool.com/cgpython
3D artists learning Blender Python.
Leaderboard (30-day)
Powered by