Files
Avatar-Toolkit/ui/optimization.py
T
Yusarina 1d507ddaa0 Add some Basic Functions
- Added functions folder.
- Added Combine Materials (Basic and needs imporvements.
- Added common file, this is where any common things that could be used by multiple functions will live.
- Clean materials, basic at the minute it cleans up material names in the given mesh by removing the '.001' suffix.
- Added fix UV Cords in which is in common, this should fix faulty uv coordinates, may need improvements as it's was the best way i could think of for the time being.
- Added join all meshes and selected meshes functions, this will use the fix uv cords while joining mehses. This is pretty basic as blender is quite good at doing the mesh joining itself. We may want to expand it in the future though.
2024-06-18 03:54:10 +01:00

28 lines
878 B
Python

import bpy
from ..core.register import register_wrap
from .panel import AvatarToolkitPanel
@register_wrap
class AvatarToolkitOptimizationPanel(bpy.types.Panel):
bl_label = "Optimization"
bl_idname = "OBJECT_PT_avatar_toolkit_optimization"
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
bl_category = "Avatar Toolkit"
bl_parent_id = "OBJECT_PT_avatar_toolkit"
def draw(self, context):
layout = self.layout
layout.label(text="Optimization Options")
row = layout.row()
row.operator("avatar_toolkit.combine_materials", text="Combine Materials")
row = layout.row()
row.operator("avatar_toolkit.join_all_meshes", text="Join All Meshes")
row = layout.row()
row.operator("avatar_toolkit.join_selected_meshes", text="Join Selected Meshes")
# Add optimization options here