MCPcopy Create free account
hub / github.com/coldtype/st2 / swap_metadata

Method swap_metadata

ST2/typesetter.py:395–410  ·  view source on GitHub ↗
(self, other, selected)

Source from the content-addressed store, hash-verified

393 return self.create_live_parented(p)
394
395 def swap_metadata(self, other, selected):
396 other.obj.location = self.obj.location
397 other.obj.rotation_euler = self.obj.rotation_euler
398
399 self.st2.copy_to(other.obj.st2)
400
401 was_name = self.obj.name
402 util.delete_parent_recursively(self.obj)
403 other.obj.name = was_name
404 self.obj = other.obj
405
406 if selected:
407 other.obj.select_set(True)
408 bpy.context.view_layer.objects.active = other.obj
409
410 return other
411
412 def create_live_single(self, p):
413 from ST2.importer import cb

Callers 1

update_live_text_objMethod · 0.95

Calls 1

copy_toMethod · 0.80

Tested by

no test coverage detected