Warning, Potential AI generated content⚠️
This post is suspected to have been generated with the help of an artificial intelligence, chat bot, or other language model tools without proper attribution.
There is reason to believe this post was not written by a human due to its structure, and grammatical construction, and has been marked by our community.
Current AI chat bots are a language models, that means they are like a parrot, they can mimic human language well, but they are built to write seemingly logical, seemingly factual grammatically valid text, rather than actually be correct, like a human would.
The veracity of the following content cannot be ascertained.
See the Concerns regarding AI generated content.
Just a little update to this script so that it runs on Blender 3.6.
Thank you ChatGPT 4:
import bpy
def is_measure_tool_active():
try:
if 'builtin.measure' in bpy.context.workspace.tools: return True
return False
except: return False
def set_active_tool(tool_name):
for area in bpy.context.screen.areas:
if area.type == "VIEW_3D":
override = bpy.context.copy()
override["space_data"] = area.spaces[0]
override["area"] = area
bpy.ops.wm.tool_set_by_id(override, name=tool_name)
break
def refresh():
if is_measure_tool_active():
set_active_tool("builtin.select_box")
set_active_tool("builtin.measure")
def get_grease_pencil():
try: return bpy.data.grease_pencils["Annotations"]
except: return None
grease_pencil = get_grease_pencil()
if grease_pencil is not None:
for layer in grease_pencil.layers:
grease_pencil.layers.remove(layer)
refresh()