feat: Add KoikatsuBlenderPipeline addon with import/export functionality
- Add core addon files (__init__.py, KKPanel.py, preferences.py, common.py) - Add import pipeline with armature, mesh, and material modification modules - Add export pipeline with material baking and FBX preparation utilities - Add material combiner tool for texture atlas generation and optimization - Add extras utilities for animation, rigging, and asset management - Add bone orientation data from better_fbx for accurate skeletal structure - Add comprehensive documentation and wiki with multi-language support (EN, JP, ZH) - Add animation library retargeting lists for ARP and Rokoko motion capture - Add Rigify integration scripts for advanced rigging workflows - Add shader file (KK Shader V8.0.blend) for material rendering - Add manifest and license files for addon distribution - Add changelog documenting version history and improvements - Initialize complete Blender addon project for Koikatsu character import/export
This commit is contained in:
13
exporting/material_combiner/textures.py
Normal file
13
exporting/material_combiner/textures.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from typing import Dict
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
def get_texture(mat: bpy.types.Material) -> bpy.types.Texture:
|
||||
return next((slot.texture for idx, slot in enumerate(mat.texture_slots) if
|
||||
slot is not None and mat.use_textures[idx]), None)
|
||||
|
||||
|
||||
def get_textures(mat: bpy.types.Material) -> Dict[int, bpy.types.Texture]:
|
||||
return {idx: slot.texture for idx, slot in enumerate(mat.texture_slots) if
|
||||
slot is not None and mat.use_textures[idx]}
|
||||
Reference in New Issue
Block a user