add offset
This commit is contained in:
parent
01c116c321
commit
850377e0f5
2 changed files with 26 additions and 8 deletions
21
__init__.py
21
__init__.py
|
@ -137,6 +137,11 @@ class ABC3D_settings(bpy.types.PropertyGroup):
|
|||
default=(1.5707963267948966, 0.0, 0.0), # 90 degrees in radians
|
||||
subtype='EULER',
|
||||
)
|
||||
offset: bpy.props.FloatProperty(
|
||||
name="Offset",
|
||||
default=0.0,
|
||||
subtype='NONE',
|
||||
)
|
||||
|
||||
class ABC3D_available_font(bpy.types.PropertyGroup):
|
||||
font_name: bpy.props.StringProperty(name="")
|
||||
|
@ -230,6 +235,12 @@ class ABC3D_text_properties(bpy.types.PropertyGroup):
|
|||
default=1.0,
|
||||
subtype='NONE',
|
||||
)
|
||||
offset: bpy.props.FloatProperty(
|
||||
update=update_callback,
|
||||
name="Offset",
|
||||
default=0.0,
|
||||
subtype='NONE',
|
||||
)
|
||||
compensate_curvature: bpy.props.BoolProperty(
|
||||
update=update_callback,
|
||||
name="Compensate Curvature",
|
||||
|
@ -453,6 +464,7 @@ class ABC3D_PT_TextManagement(bpy.types.Panel):
|
|||
delif(mom,f"{utils.prefix()}_letter_spacing")
|
||||
delif(mom,f"{utils.prefix()}_orientation")
|
||||
delif(mom,f"{utils.prefix()}_translation")
|
||||
delif(mom,f"{utils.prefix()}_offset")
|
||||
abc3d_data.available_texts.remove(i)
|
||||
|
||||
for i, t in enumerate(abc3d_data.available_texts):
|
||||
|
@ -575,6 +587,7 @@ class ABC3D_PT_TextPropertiesPanel(bpy.types.Panel):
|
|||
layout.row().prop(props, "text")
|
||||
layout.row().prop(props, "letter_spacing")
|
||||
layout.row().prop(props, "font_size")
|
||||
layout.row().prop(props, "offset")
|
||||
layout.row().prop(props, "compensate_curvature")
|
||||
layout.row().prop(props, "ignore_orientation")
|
||||
layout.column().prop(props, "translation")
|
||||
|
@ -792,6 +805,7 @@ class ABC3D_OT_RemoveText(bpy.types.Operator):
|
|||
delif(mom,f"{utils.prefix()}_letter_spacing")
|
||||
delif(mom,f"{utils.prefix()}_orientation")
|
||||
delif(mom,f"{utils.prefix()}_translation")
|
||||
delif(mom,f"{utils.prefix()}_offset")
|
||||
if self.remove_objects:
|
||||
remove_list = []
|
||||
for g in abc3d_data.available_texts[i].glyphs:
|
||||
|
@ -852,6 +866,11 @@ class ABC3D_OT_PlaceText(bpy.types.Operator):
|
|||
default=1.0,
|
||||
subtype='NONE',
|
||||
)
|
||||
offset: bpy.props.FloatProperty(
|
||||
name="Offset",
|
||||
default=0.0,
|
||||
subtype='NONE',
|
||||
)
|
||||
translation: bpy.props.FloatVectorProperty(
|
||||
name="Translation",
|
||||
default=(0.0, 0.0, 0.0),
|
||||
|
@ -902,6 +921,7 @@ class ABC3D_OT_PlaceText(bpy.types.Operator):
|
|||
t['text'] = self.text
|
||||
t['letter_spacing'] = self.letter_spacing
|
||||
t['font_size'] = self.font_size
|
||||
t['offset'] = self.offset
|
||||
t['translation'] = self.translation
|
||||
t['orientation'] = self.orientation
|
||||
t['distribution_type'] = distribution_type
|
||||
|
@ -1258,6 +1278,7 @@ class ABC3D_PT_RightPropertiesPanel(bpy.types.Panel):
|
|||
layout.row().prop(available_text, "text")
|
||||
layout.row().prop(available_text, "letter_spacing")
|
||||
layout.row().prop(available_text, "font_size")
|
||||
layout.row().prop(available_text, "offset")
|
||||
layout.row().prop(available_text, "compensate_curvature")
|
||||
layout.row().prop(available_text, "ignore_orientation")
|
||||
layout.column().prop(available_text, "translation")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue