Closed bernhard-42 closed 3 months ago
Jern's approach:
classes = (BuildPart, BuildSketch, BuildLine) # for OCP-vscode variables, s_o, s_n, slocal = (list(cf().f_locals.items()), [], [], False) for name, obj in variables: if ( isinstance(obj, classes) and not name.startswith("_") and not name.startswith("obj") ): if obj._obj_name != "sketch" or slocal: s_o.append(obj), s_n.append(f"{name}.{obj._obj_name}") elif obj._obj_name == "sketch": s_o.append(obj.sketch), s_n.append(f"{name}.{obj._obj_name}") show( *s_o, # , names=s_n, reset_camera=Camera.KEEP, )
missing import statement for the above:
from inspect import currentframe as cf
fixed in 2.2.2
Jern's approach: