UVAligner Tool
- Adds a new Avatar Toolkit panel location for UV tools - adds Align UV Edges to target - Allows for aligning uv vertices in a line on one object to another's uvs pixel perfect. This is useful for making one model copy another model's UV's with some user work - Added translation keys for tool
This commit is contained in:
+1
-1
@@ -15,7 +15,7 @@ class AvatarToolkitOptimizationPanel(bpy.types.Panel):
|
||||
bl_parent_id = "OBJECT_PT_avatar_toolkit"
|
||||
bl_order = 2
|
||||
|
||||
def draw(self, context):
|
||||
def draw(self: bpy.types.Panel, context: bpy.types.Context):
|
||||
layout = self.layout
|
||||
armature = get_selected_armature(context)
|
||||
|
||||
|
||||
+9
-5
@@ -2,6 +2,13 @@ import bpy
|
||||
from ..core.register import register_wrap
|
||||
from ..functions.translations import t
|
||||
|
||||
def draw_title(self: bpy.types.Panel):
|
||||
layout = self.layout
|
||||
layout.label(text=t("AvatarToolkit.welcome"))
|
||||
layout.label(text=t("AvatarToolkit.description"))
|
||||
layout.label(text=t("AvatarToolkit.alpha_warning"))
|
||||
|
||||
|
||||
@register_wrap
|
||||
class AvatarToolkitPanel(bpy.types.Panel):
|
||||
bl_label = t("AvatarToolkit.label")
|
||||
@@ -10,10 +17,7 @@ class AvatarToolkitPanel(bpy.types.Panel):
|
||||
bl_region_type = 'UI'
|
||||
bl_category = "Avatar Toolkit"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.label(text=t("AvatarToolkit.welcome"))
|
||||
layout.label(text=t("AvatarToolkit.description"))
|
||||
layout.label(text=t("AvatarToolkit.alpha_warning"))
|
||||
def draw(self: bpy.types.Panel, context: bpy.types.Context):
|
||||
draw_title(self)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
import bpy
|
||||
from ..core.register import register_wrap
|
||||
from ..functions.translations import t
|
||||
from .panel import draw_title
|
||||
|
||||
@register_wrap
|
||||
class UVTools_PT_MainPanel(bpy.types.Panel):
|
||||
bl_label = t("AvatarToolkit.label")
|
||||
bl_idname = "OBJECT_PT_avatar_toolkit_uv"
|
||||
bl_space_type = 'IMAGE_EDITOR'
|
||||
bl_region_type = 'UI'
|
||||
bl_category = "Avatar Toolkit"
|
||||
|
||||
def draw(self: bpy.types.Panel, context: bpy.types.Context):
|
||||
layout = self.layout
|
||||
|
||||
sima = context.space_data
|
||||
if sima.show_uvedit:
|
||||
draw_title(self)
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
import bpy
|
||||
from ..core.register import register_wrap
|
||||
from ..functions.translations import t
|
||||
from ..functions.uv_tools import AvatarToolkit_OT_AlignUVEdgesToTarget
|
||||
from .panel import draw_title
|
||||
|
||||
@register_wrap
|
||||
class UVTools_PT_Tools(bpy.types.Panel):
|
||||
bl_label = t("Tools.label")
|
||||
bl_idname = "OBJECT_PT_avatar_toolkit_uv_tools"
|
||||
bl_space_type = 'IMAGE_EDITOR'
|
||||
bl_region_type = 'UI'
|
||||
bl_category = "Avatar Toolkit"
|
||||
bl_parent_id = "OBJECT_PT_avatar_toolkit_uv"
|
||||
bl_order = 3
|
||||
|
||||
def draw(self, context: bpy.types.Context):
|
||||
layout = self.layout
|
||||
|
||||
sima = context.space_data
|
||||
if sima.show_uvedit:
|
||||
row = layout.row(align=True)
|
||||
row.operator(AvatarToolkit_OT_AlignUVEdgesToTarget.bl_idname, text=t("avatar_toolkit.align_uv_edges_to_target.label"), icon='GP_MULTIFRAME_EDITING')
|
||||
Reference in New Issue
Block a user