transfer glyph transforms on duplication
This commit is contained in:
parent
2ace31a246
commit
8f3d58aad0
2 changed files with 54 additions and 14 deletions
24
__init__.py
24
__init__.py
|
@ -284,17 +284,19 @@ class ABC3D_data(bpy.types.PropertyGroup):
|
|||
|
||||
def active_text_index_update(self, context):
|
||||
if self.active_text_index != -1:
|
||||
o = self.available_texts[self.active_text_index].text_object
|
||||
# active_text_index changed. so let's update the selection
|
||||
# check if it is already selected
|
||||
# or perhaps one of the glyphs
|
||||
if (
|
||||
not o.select_get()
|
||||
and not len([c for c in o.children if c.select_get()]) > 0
|
||||
):
|
||||
bpy.ops.object.select_all(action="DESELECT")
|
||||
o.select_set(True)
|
||||
bpy.context.view_layer.objects.active = o
|
||||
text_properties = butils.get_text_properties(self.active_text_index, context.scene)
|
||||
if text_properties is not None:
|
||||
o = text_properties.text_object
|
||||
# active_text_index changed. so let's update the selection
|
||||
# check if it is already selected
|
||||
# or perhaps one of the glyphs
|
||||
if (o is not None
|
||||
and not o.select_get()
|
||||
and not len([c for c in o.children if c.select_get()]) > 0
|
||||
):
|
||||
bpy.ops.object.select_all(action="DESELECT")
|
||||
o.select_set(True)
|
||||
context.view_layer.objects.active = o
|
||||
# else:
|
||||
# print("already selected")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue