Add cross-assembly plugin system, texture optimizer, and multi-backend local AI pipeline#19
Add cross-assembly plugin system, texture optimizer, and multi-backend local AI pipeline#19
Conversation
Agent-Logs-Url: https://github.com/LuticaCANARD/TextureCocktail/sessions/f02e51a9-dae2-4959-9c28-dc0f82dbc1c8 Co-authored-by: LuticaCANARD <80238084+LuticaCANARD@users.noreply.github.com>
Agent-Logs-Url: https://github.com/LuticaCANARD/TextureCocktail/sessions/f02e51a9-dae2-4959-9c28-dc0f82dbc1c8 Co-authored-by: LuticaCANARD <80238084+LuticaCANARD@users.noreply.github.com>
|
Ollama외 다른 ai도 되게하라 |
LuticaCANARD
left a comment
There was a problem hiding this comment.
- 전반적으로 로컬모델의 호환규격을 맞추려 한 부분은 좋으나, 재사용성을 감안하여 함수의 정의위치를 바꿔줄 것을 요청한다.
| return sb.ToString(); | ||
| } | ||
|
|
||
| private static string JsonString(string s) |
There was a problem hiding this comment.
Done in commit 984d4a8. The manual string-walking parsers have been replaced with Newtonsoft.Json (JObject.Parse / JArray) in both OllamaBackend and OpenAiCompatibleBackend — the same library already used by LanguageDisplayer.cs.
|
|
||
| // ── Texture helpers ────────────────────────────────────────────────── | ||
|
|
||
| private static string TextureToBase64(Texture2D tex) |
There was a problem hiding this comment.
이 인코딩 과정 다른 함수에 없었는가? 없었다면 공통 도구함수로 이전시키고 다른 class에서도 쓸 수 있게하라.
There was a problem hiding this comment.
Moved in commit 984d4a8. TextureToBase64 and Base64ToTexture now live in Editor/AI/AiTextureUtils.cs as public static methods, usable from any class. Both OllamaBackend and OpenAiCompatibleBackend call them from there.
Agent-Logs-Url: https://github.com/LuticaCANARD/TextureCocktail/sessions/077df106-2085-4340-8da7-1339e03845a2 Co-authored-by: LuticaCANARD <80238084+LuticaCANARD@users.noreply.github.com>
Addressed in commit
Added in commit
Additional backends can be added by creating a new class that inherits |
Implements three major extensions to TextureCocktail: a proper open plugin API, a texture import settings analyzer/fixer, and a multi-backend local AI integration.
Plugin System
The previous
LoadShaderWindowusedType.GetType("LuticaLab.TextureCocktail." + name)— only finding types in the hardcoded namespace. Third-party plugins from external assemblies were silently ignored.New:
TextureCocktailPluginRegistryscans allAppDomainassemblies on[InitializeOnLoadMethod], matchingTextureCocktailContentsubclasses by class name against the shader's last path segment. No registration step required.TextureCocktailPluginAttribute— optional metadata (display name, description, author, version)PluginBrowserWindow— LuticaLab → TextureCocktail Plugin Browser lists all discovered pluginsPLUGIN_GUIDE.md— developer reference for plugin authoringTexture Optimizer
New editor window (LuticaLab → Texture Optimizer) that batch-analyzes
Texture2Dassets viaTextureImporter:Multi-Backend Local AI Connector
New editor window (LuticaLab → AI Connector) providing a text → text+image AI pipeline supporting multiple local AI backends:
Supported Backends
POST /api/generate,GET /api/tags) — supports vision models likellavaPOST /v1/chat/completions,GET /v1/models) — covers LocalAI, LM Studio, Jan, Kobold.cpp, llama.cpp server, text-generation-webui, and any other OpenAI-compatible endpointArchitecture (
Editor/AI/)AiBackendBase— abstract base class withAiRequest/AiResponsestructs; add new backends by subclassing from any assemblyAiTextureUtils— sharedTextureToBase64/Base64ToTextureutilities reusable across all backendsOllamaBackend— Ollama-specific implementation usingNewtonsoft.JsonOpenAiCompatibleBackend— OpenAI-compatible implementation usingNewtonsoft.JsonFeatures
Texture2Dattachment (base64 PNG) for vision modelsEditorPrefsCancellationTokensupporti18n
Added keys for all three features to English, Korean, and Japanese language files.