From 26a4ba92cb3fe7981a43dc637ab65165d4fcb211 Mon Sep 17 00:00:00 2001 From: great-majority Date: Fri, 27 Jun 2025 13:26:37 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=8E=81=20Add=20ItemCommandHandler=20t?= =?UTF-8?q?o=20manage=20item-related=20commands?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Implemented ItemCommandHandler class to handle various item commands such as listing groups, categories, and retrieving catalog data. - Integrated item command handling into KKStudioSocketPlugin, allowing for processing of item commands received via WebSocket. - Added ItemCommand class to represent item command structure with properties for command type, group ID, and category ID. - Updated project files to include the new ItemCommandHandler class. --- README.ja.md | 125 ++ README.md | 125 ++ notebooks/item.ipynb | 1700 +++++++++++++++++ .../Commands/ItemCommandHandler.cs | 425 +++++ .../KKStudioSocket.Core.projitems | 1 + .../KKStudioSocketPlugin.cs | 23 + 6 files changed, 2399 insertions(+) create mode 100644 notebooks/item.ipynb create mode 100644 src/KKStudioSocket.Core/Commands/ItemCommandHandler.cs diff --git a/README.ja.md b/README.ja.md index 2880f64..50b05ca 100644 --- a/README.ja.md +++ b/README.ja.md @@ -76,6 +76,10 @@ ws://127.0.0.1:8765/ws ### 目次 - [🏓 Ping-Pong(接続テスト)](#-ping-pong接続テスト) - [🌲 Tree(シーン構造)](#-treeシーン構造) +- [📦 Item(アイテムカタログ)](#-itemアイテムカタログ) + - [グループ一覧取得](#グループ一覧取得) + - [グループ内カテゴリ取得](#グループ内カテゴリ取得) + - [カテゴリ内アイテム取得](#カテゴリ内アイテム取得) - [🔄 Update(オブジェクト変更)](#-updateオブジェクト変更) - [Transform更新](#transform更新) - [アイテム色変更](#アイテム色変更) @@ -144,6 +148,127 @@ ws://127.0.0.1:8765/ws ] ``` +### 📦 Item(アイテムカタログ) + +シーンに追加可能なすべてのアイテムの情報を取得します。アイテムは階層構造で整理されています:グループ → カテゴリ → アイテム。 + +#### グループ一覧取得 + +すべてのアイテムグループの一覧を取得: + +**リクエスト:** +```json +{ + "type": "item", + "command": "list-groups" +} +``` + +**レスポンス:** +```json +{ + "type": "success", + "command": "list-groups", + "data": [ + { + "id": 0, + "name": "アイテム", + "categoryCount": 15 + }, + { + "id": 1, + "name": "ライト", + "categoryCount": 3 + } + ] +} +``` + +#### グループ内カテゴリ取得 + +指定したグループ内のカテゴリを取得: + +**リクエスト:** +```json +{ + "type": "item", + "command": "list-group", + "groupId": 0 +} +``` + +**レスポンス:** +```json +{ + "type": "success", + "command": "list-group", + "groupId": 0, + "data": { + "id": 0, + "name": "アイテム", + "categories": [ + { + "id": 0, + "name": "図形", + "itemCount": 25 + }, + { + "id": 1, + "name": "家具", + "itemCount": 42 + } + ] + } +} +``` + +#### カテゴリ内アイテム取得 + +指定したカテゴリ内のすべてのアイテムを取得: + +**リクエスト:** +```json +{ + "type": "item", + "command": "list-category", + "groupId": 0, + "categoryId": 0 +} +``` + +**レスポンス:** +```json +{ + "type": "success", + "command": "list-category", + "groupId": 0, + "categoryId": 0, + "data": { + "id": 0, + "name": "図形", + "groupId": 0, + "items": [ + { + "id": 0, + "name": "スフィア(通常)", + "properties": { + "isAnime": false, + "isScale": true, + "hasColor": true, + "colorSlots": 3, + "hasPattern": false, + "patternSlots": 0, + "isEmission": false, + "isGlass": false, + "bones": 0, + "childRoot": "" + } + } + ] + } +} +``` + ### 📝 Update(オブジェクト変更) #### Transform更新 diff --git a/README.md b/README.md index 33e9d15..d08fcd3 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,10 @@ All commands and responses use JSON format. ### Table of Contents - [🏓 Ping-Pong (Connection Test)](#-ping-pong-connection-test) - [🌲 Tree (Scene Structure)](#-tree-scene-structure) +- [📦 Item (Item Catalog)](#-item-item-catalog) + - [List Groups](#list-groups) + - [List Group Categories](#list-group-categories) + - [List Category Items](#list-category-items) - [🔄 Update (Object Properties)](#-update-object-properties) - [Update Transform](#update-transform) - [Update Item Color](#update-item-color) @@ -148,6 +152,127 @@ Retrieve the complete scene object hierarchy: ] ``` +### 📦 Item (Item Catalog) + +Retrieve information about all available items that can be added to the scene. Items are organized in a hierarchical structure: Groups → Categories → Items. + +#### List Groups + +Get a list of all item groups: + +**Request:** +```json +{ + "type": "item", + "command": "list-groups" +} +``` + +**Response:** +```json +{ + "type": "success", + "command": "list-groups", + "data": [ + { + "id": 0, + "name": "Items", + "categoryCount": 15 + }, + { + "id": 1, + "name": "Lights", + "categoryCount": 3 + } + ] +} +``` + +#### List Group Categories + +Get categories within a specific group: + +**Request:** +```json +{ + "type": "item", + "command": "list-group", + "groupId": 0 +} +``` + +**Response:** +```json +{ + "type": "success", + "command": "list-group", + "groupId": 0, + "data": { + "id": 0, + "name": "Items", + "categories": [ + { + "id": 0, + "name": "Shapes", + "itemCount": 25 + }, + { + "id": 1, + "name": "Furniture", + "itemCount": 42 + } + ] + } +} +``` + +#### List Category Items + +Get all items within a specific category: + +**Request:** +```json +{ + "type": "item", + "command": "list-category", + "groupId": 0, + "categoryId": 0 +} +``` + +**Response:** +```json +{ + "type": "success", + "command": "list-category", + "groupId": 0, + "categoryId": 0, + "data": { + "id": 0, + "name": "Shapes", + "groupId": 0, + "items": [ + { + "id": 0, + "name": "Sphere (Normal)", + "properties": { + "isAnime": false, + "isScale": true, + "hasColor": true, + "colorSlots": 3, + "hasPattern": false, + "patternSlots": 0, + "isEmission": false, + "isGlass": false, + "bones": 0, + "childRoot": "" + } + } + ] + } +} +``` + ### 📝 Update (Modify Objects) #### Update Transform diff --git a/notebooks/item.ipynb b/notebooks/item.ipynb new file mode 100644 index 0000000..a5cb085 --- /dev/null +++ b/notebooks/item.ipynb @@ -0,0 +1,1700 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Item Catalog API Test\n", + "\n", + "This notebook demonstrates how to retrieve the complete item catalog from KKStudioSocket.\n", + "The item catalog provides information about all available items organized by groups and categories." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import time\n", + "import json\n", + "import nest_asyncio\n", + "import asyncio\n", + "import websockets\n", + "nest_asyncio.apply()" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'type': 'success',\n", + " 'command': 'list-groups',\n", + " 'data': [{'id': 0, 'name': '基本形', 'categoryCount': 8},\n", + " {'id': 1, 'name': 'ベース', 'categoryCount': 45},\n", + " {'id': 2, 'name': '家具', 'categoryCount': 11},\n", + " {'id': 3, 'name': 'オブジェ', 'categoryCount': 59},\n", + " {'id': 4, 'name': '食材', 'categoryCount': 7},\n", + " {'id': 5, 'name': '小物', 'categoryCount': 16},\n", + " {'id': 6, 'name': 'キャラ', 'categoryCount': 37},\n", + " {'id': 7, 'name': 'Hアイテム', 'categoryCount': 10},\n", + " {'id': 9, 'name': '2D効果', 'categoryCount': 7},\n", + " {'id': 10, 'name': 'ギミック', 'categoryCount': 2},\n", + " {'id': 11, 'name': '3DSE', 'categoryCount': 46},\n", + " {'id': 12, 'name': '武器', 'categoryCount': 21},\n", + " {'id': 13, 'name': 'エフェクト', 'categoryCount': 7},\n", + " {'id': 14, 'name': 'グロー', 'categoryCount': 2},\n", + " {'id': 15, 'name': 'FKアイテム', 'categoryCount': 7},\n", + " {'id': 16, 'name': 'いきもの', 'categoryCount': 1},\n", + " {'id': 133, 'name': 'Neptunia', 'categoryCount': 21},\n", + " {'id': 155, 'name': 'LaoDeng', 'categoryCount': 1},\n", + " {'id': 213, 'name': 'Hyrule Warriors', 'categoryCount': 1},\n", + " {'id': 300, 'name': 'Battletech', 'categoryCount': 2},\n", + " {'id': 315, 'name': 'Electronic & Tech', 'categoryCount': 1},\n", + " {'id': 367, 'name': 'Lesbianon', 'categoryCount': 1},\n", + " {'id': 390, 'name': 'ANSE', 'categoryCount': 1},\n", + " {'id': 391, 'name': 'ANSE', 'categoryCount': 1},\n", + " {'id': 444, 'name': 'Belkan', 'categoryCount': 5},\n", + " {'id': 483, 'name': 'Action Taimanin Weapons', 'categoryCount': 1},\n", + " {'id': 501, 'name': '[ymd] 演出', 'categoryCount': 9},\n", + " {'id': 502, 'name': '[ymd] 大道具', 'categoryCount': 9},\n", + " {'id': 503, 'name': '[ymd] 小道具', 'categoryCount': 8},\n", + " {'id': 513, 'name': 'Honkai 3rd', 'categoryCount': 5},\n", + " {'id': 700, 'name': \"Creamstar's Stuffs\", 'categoryCount': 7},\n", + " {'id': 725, 'name': 'Sock 1', 'categoryCount': 1},\n", + " {'id': 762, 'name': 'Yuri', 'categoryCount': 1},\n", + " {'id': 830, 'name': 'Vehicle', 'categoryCount': 1},\n", + " {'id': 840, 'name': 'Aircraft', 'categoryCount': 1},\n", + " {'id': 849, 'name': 'StudioVehicles', 'categoryCount': 1},\n", + " {'id': 850, 'name': 'StudioGuns', 'categoryCount': 1},\n", + " {'id': 860, 'name': 'SteveAraiMods', 'categoryCount': 7},\n", + " {'id': 861, 'name': '[Cz]', 'categoryCount': 8},\n", + " {'id': 865, 'name': 'Lhianna', 'categoryCount': 1},\n", + " {'id': 879, 'name': 'SUI', 'categoryCount': 1},\n", + " {'id': 899, 'name': \"Cream's Accessories Prop\", 'categoryCount': 1},\n", + " {'id': 900, 'name': 'Firearms', 'categoryCount': 10},\n", + " {'id': 901, 'name': 'VC Weapons', 'categoryCount': 2},\n", + " {'id': 902, 'name': 'Firearms Attachments', 'categoryCount': 1},\n", + " {'id': 1000, 'name': 'ZMX', 'categoryCount': 1},\n", + " {'id': 1001, 'name': '7S', 'categoryCount': 1},\n", + " {'id': 1005, 'name': 'Eijineer', 'categoryCount': 1},\n", + " {'id': 1015, 'name': 'Omega', 'categoryCount': 14},\n", + " {'id': 1020, 'name': 'Eijineer', 'categoryCount': 2},\n", + " {'id': 1113, 'name': 'Neverlucky', 'categoryCount': 1},\n", + " {'id': 1122, 'name': ' Kage no Jitsuryokusha', 'categoryCount': 1},\n", + " {'id': 1212, 'name': 'Eijineer', 'categoryCount': 1},\n", + " {'id': 1305, 'name': 'AnnaAnon', 'categoryCount': 1},\n", + " {'id': 1312, 'name': 'Tinala', 'categoryCount': 6},\n", + " {'id': 1414, 'name': 'Eijineer', 'categoryCount': 1},\n", + " {'id': 1551, 'name': 'Frostation', 'categoryCount': 10},\n", + " {'id': 1555, 'name': 'ConQ', 'categoryCount': 43},\n", + " {'id': 1975, 'name': 'KAKA', 'categoryCount': 1},\n", + " {'id': 1997, 'name': 'TDI', 'categoryCount': 1},\n", + " {'id': 2015, 'name': 'SmokeOfC', 'categoryCount': 1},\n", + " {'id': 2017, 'name': 'H0STILE', 'categoryCount': 2},\n", + " {'id': 2040, 'name': 'Personaitems', 'categoryCount': 1},\n", + " {'id': 2050, 'name': 'Musumakeup', 'categoryCount': 3},\n", + " {'id': 2051, 'name': 'Keelhauled', 'categoryCount': 1},\n", + " {'id': 2052, 'name': 'EmotionCreators', 'categoryCount': 1},\n", + " {'id': 2090, 'name': 'AdditionalItems', 'categoryCount': 4},\n", + " {'id': 2172, 'name': 'Tsundere Opr8tr', 'categoryCount': 2},\n", + " {'id': 2200, 'name': 'xm007', 'categoryCount': 7},\n", + " {'id': 2204, 'name': 'boubou', 'categoryCount': 2},\n", + " {'id': 2222, 'name': 'Eijineer', 'categoryCount': 3},\n", + " {'id': 2501, 'name': 'mhw', 'categoryCount': 1},\n", + " {'id': 2503, 'name': 'lj7654321', 'categoryCount': 2},\n", + " {'id': 2612, 'name': 'MeleHigh26', 'categoryCount': 1},\n", + " {'id': 2680, 'name': \"DA's Stuff\", 'categoryCount': 4},\n", + " {'id': 2802, 'name': 'f-m-e-p', 'categoryCount': 1},\n", + " {'id': 3317, 'name': 'Jinsung', 'categoryCount': 2},\n", + " {'id': 3351, 'name': 'Astral Series', 'categoryCount': 1},\n", + " {'id': 3352, 'name': 'Eternal Series', 'categoryCount': 1},\n", + " {'id': 3423, 'name': 'CDWard', 'categoryCount': 7},\n", + " {'id': 3467, 'name': 'Pineapple', 'categoryCount': 11},\n", + " {'id': 3614, 'name': 'Apex Legends Weapons', 'categoryCount': 1},\n", + " {'id': 3707, 'name': 'N3x7xp', 'categoryCount': 1},\n", + " {'id': 3770, 'name': 'Badminton_Equipment', 'categoryCount': 1},\n", + " {'id': 3782, 'name': 'Slormo', 'categoryCount': 2},\n", + " {'id': 4015, 'name': 'GF', 'categoryCount': 3},\n", + " {'id': 4500, 'name': \"Creamstar's Map Collection\", 'categoryCount': 1},\n", + " {'id': 4600, 'name': 'ToCS 1', 'categoryCount': 18},\n", + " {'id': 5225, 'name': 'Vi', 'categoryCount': 1},\n", + " {'id': 5666, 'name': \"Kidnapper's kit\", 'categoryCount': 1},\n", + " {'id': 5740, 'name': 'Timmehs Misc Ports', 'categoryCount': 34},\n", + " {'id': 5741, 'name': 'Elder Scrolls Architecture', 'categoryCount': 2},\n", + " {'id': 5742, 'name': 'Timmehs Maps', 'categoryCount': 2},\n", + " {'id': 5749, 'name': 'Sims4Ports', 'categoryCount': 18},\n", + " {'id': 5769, 'name': 'Pirate', 'categoryCount': 1},\n", + " {'id': 5843, 'name': 'Taimanin Weapons', 'categoryCount': 1},\n", + " {'id': 5857, 'name': 'Genshin Enviroment', 'categoryCount': 12},\n", + " {'id': 6001, 'name': 'MakotoYuki90', 'categoryCount': 21},\n", + " {'id': 6005, 'name': 'AleX', 'categoryCount': 1},\n", + " {'id': 6006, 'name': 'Poop', 'categoryCount': 1},\n", + " {'id': 6010, 'name': 'AleX', 'categoryCount': 2},\n", + " {'id': 6011, 'name': 'AleX', 'categoryCount': 2},\n", + " {'id': 6106, 'name': 'nakay', 'categoryCount': 2},\n", + " {'id': 6666, 'name': 'JR', 'categoryCount': 3},\n", + " {'id': 6901, 'name': 'KoikDaisy', 'categoryCount': 1},\n", + " {'id': 7001, 'name': 'HLD', 'categoryCount': 1},\n", + " {'id': 7020, 'name': 'Project DIVA', 'categoryCount': 11},\n", + " {'id': 7227, 'name': 'DS27 Objects', 'categoryCount': 5},\n", + " {'id': 7441, 'name': 'JetJaguar', 'categoryCount': 2},\n", + " {'id': 7506, 'name': 'WraxTV', 'categoryCount': 1},\n", + " {'id': 7769, 'name': 'ZetaStuff', 'categoryCount': 7},\n", + " {'id': 8422, 'name': 'RSkoi Collection', 'categoryCount': 2},\n", + " {'id': 8423, 'name': 'RSkoi Environment', 'categoryCount': 6},\n", + " {'id': 8690, 'name': 'Gaikotsu', 'categoryCount': 1},\n", + " {'id': 9000, 'name': 'GaryuX', 'categoryCount': 6},\n", + " {'id': 9001, 'name': 'Ozsaru', 'categoryCount': 1},\n", + " {'id': 9005, 'name': 'SoDevs&YeDevs', 'categoryCount': 8},\n", + " {'id': 9020, 'name': 'Nexus', 'categoryCount': 4},\n", + " {'id': 9025, 'name': 'Vancouver12', 'categoryCount': 2},\n", + " {'id': 9075, 'name': 'The Lucky Freeman', 'categoryCount': 1},\n", + " {'id': 9113, 'name': 'Noble_Kale', 'categoryCount': 13},\n", + " {'id': 9275, 'name': 'Starstorm', 'categoryCount': 2},\n", + " {'id': 9411, 'name': 'LD', 'categoryCount': 1},\n", + " {'id': 9664, 'name': 'murara', 'categoryCount': 1},\n", + " {'id': 9766, 'name': 'JWAM Atrocities', 'categoryCount': 1},\n", + " {'id': 9800, 'name': 'Gemini Bell', 'categoryCount': 1},\n", + " {'id': 9927, 'name': 'Genshin Studio Mod', 'categoryCount': 2},\n", + " {'id': 9943, 'name': 'Code Vein Acc Mod', 'categoryCount': 1},\n", + " {'id': 9952, 'name': 'Ohno', 'categoryCount': 1},\n", + " {'id': 9994, 'name': 'Danganronpa', 'categoryCount': 1},\n", + " {'id': 9996, 'name': 'Manjuu Mod', 'categoryCount': 1},\n", + " {'id': 9997, 'name': 'Posable Wave Mod', 'categoryCount': 1},\n", + " {'id': 9998, 'name': 'Examples', 'categoryCount': 3},\n", + " {'id': 10000, 'name': 'Naval', 'categoryCount': 1},\n", + " {'id': 11112, 'name': 'Kaldeqca', 'categoryCount': 1},\n", + " {'id': 12074, 'name': 'Bondage gear', 'categoryCount': 1},\n", + " {'id': 12121, 'name': 'Holly', 'categoryCount': 1},\n", + " {'id': 12221, 'name': 'Kitbash', 'categoryCount': 1},\n", + " {'id': 13875, 'name': 'Rikki Balboa', 'categoryCount': 5},\n", + " {'id': 14900, 'name': 'Soulworker', 'categoryCount': 1},\n", + " {'id': 20208, 'name': 'shibal', 'categoryCount': 4},\n", + " {'id': 20618, 'name': 'leisehg', 'categoryCount': 6},\n", + " {'id': 33860, 'name': 'Petardo', 'categoryCount': 2},\n", + " {'id': 36000, 'name': 'titan36', 'categoryCount': 2},\n", + " {'id': 39601, 'name': 'Dvorak', 'categoryCount': 1},\n", + " {'id': 40000, 'name': 'Nillsfriend', 'categoryCount': 2},\n", + " {'id': 42069, 'name': 'AdmiralDock', 'categoryCount': 4},\n", + " {'id': 42222, 'name': 'H_enry', 'categoryCount': 2},\n", + " {'id': 55241, 'name': 'ubin', 'categoryCount': 2},\n", + " {'id': 56000, 'name': 'Karls', 'categoryCount': 3},\n", + " {'id': 56709, 'name': 'Kemono Friends', 'categoryCount': 7},\n", + " {'id': 61005, 'name': 'Comsov 1', 'categoryCount': 1},\n", + " {'id': 66999, 'name': 'Finer04', 'categoryCount': 1},\n", + " {'id': 69420, 'name': 'earthship', 'categoryCount': 6},\n", + " {'id': 69422, 'name': 'Yuri', 'categoryCount': 1},\n", + " {'id': 74014, 'name': 'nashi', 'categoryCount': 8},\n", + " {'id': 75000, 'name': 'shelter', 'categoryCount': 1},\n", + " {'id': 75357, 'name': 'TestStuff', 'categoryCount': 1},\n", + " {'id': 76000, 'name': 'shelter', 'categoryCount': 1},\n", + " {'id': 83860, 'name': 'Nep', 'categoryCount': 20},\n", + " {'id': 88620, 'name': 'oppressor', 'categoryCount': 1},\n", + " {'id': 90009, 'name': 'Posable Cum', 'categoryCount': 1},\n", + " {'id': 92111, 'name': 'Ltsuki', 'categoryCount': 12},\n", + " {'id': 93860, 'name': 'PBS Ports', 'categoryCount': 1},\n", + " {'id': 98001, 'name': 'dionel_MOD', 'categoryCount': 1},\n", + " {'id': 98754, 'name': 'Esix', 'categoryCount': 1},\n", + " {'id': 99980, 'name': 'Yakuza', 'categoryCount': 1},\n", + " {'id': 115599, 'name': 'fissy', 'categoryCount': 1},\n", + " {'id': 119999, 'name': 'giuls', 'categoryCount': 2},\n", + " {'id': 121218, 'name': 'EricB', 'categoryCount': 1},\n", + " {'id': 123456, 'name': 'SZY', 'categoryCount': 1},\n", + " {'id': 130014, 'name': 'Billiard', 'categoryCount': 1},\n", + " {'id': 131313, 'name': 'Fateburn', 'categoryCount': 1},\n", + " {'id': 190801, 'name': 'CuteFluffyPeep', 'categoryCount': 3},\n", + " {'id': 200000, 'name': 'BGZR Macross Mods', 'categoryCount': 3},\n", + " {'id': 213920, 'name': 'M2M', 'categoryCount': 9},\n", + " {'id': 220522, 'name': 'CEL', 'categoryCount': 6},\n", + " {'id': 239820, 'name': 'Reverie', 'categoryCount': 13},\n", + " {'id': 346001, 'name': 'IM@S_Stuff', 'categoryCount': 2},\n", + " {'id': 407300, 'name': 'Augh', 'categoryCount': 5},\n", + " {'id': 420420, 'name': ' Guicool', 'categoryCount': 2},\n", + " {'id': 555710, 'name': 'Jas', 'categoryCount': 1},\n", + " {'id': 600700, 'name': 'NewBie', 'categoryCount': 1},\n", + " {'id': 600704, 'name': 'NewBie', 'categoryCount': 1},\n", + " {'id': 647158, 'name': 'アクセサリー', 'categoryCount': 10},\n", + " {'id': 739555, 'name': 'Ticklefist', 'categoryCount': 6},\n", + " {'id': 739666, 'name': 'Ticklefist Showa', 'categoryCount': 3},\n", + " {'id': 773311, 'name': '83', 'categoryCount': 2},\n", + " {'id': 846143, 'name': 'MechaMobius', 'categoryCount': 5},\n", + " {'id': 847209, 'name': 'Momo Kanae', 'categoryCount': 4},\n", + " {'id': 921600, 'name': 'Hateleite_NierW', 'categoryCount': 1},\n", + " {'id': 931601, 'name': 'Hateleite_mod', 'categoryCount': 1},\n", + " {'id': 931603, 'name': 'Hateleite_Props', 'categoryCount': 1},\n", + " {'id': 931610, 'name': 'Hateleite_DOOM', 'categoryCount': 11},\n", + " {'id': 931611, 'name': 'Hateleite_Vehicle', 'categoryCount': 6},\n", + " {'id': 931701, 'name': 'Hateleite_MAP', 'categoryCount': 3},\n", + " {'id': 999772, 'name': 'AVS_Aviation', 'categoryCount': 2},\n", + " {'id': 7000000, 'name': 'Steelcore_BDSM', 'categoryCount': 1},\n", + " {'id': 7772302, 'name': 'HarvexARC-SI', 'categoryCount': 10},\n", + " {'id': 7772303, 'name': 'HarvexARC-Maps', 'categoryCount': 2},\n", + " {'id': 7772304, 'name': 'Minecraft Things', 'categoryCount': 12},\n", + " {'id': 7772305, 'name': 'HarvexARC-HItems', 'categoryCount': 3},\n", + " {'id': 7772306, 'name': 'HarvexARC-Effects', 'categoryCount': 4},\n", + " {'id': 8000000, 'name': 'ljlsdq', 'categoryCount': 1},\n", + " {'id': 8008502, 'name': 'Monarch', 'categoryCount': 2},\n", + " {'id': 8645511, 'name': 'xiaotu777', 'categoryCount': 1}]}" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "async def websocket_test(payload, indent=None, quiet=False):\n", + " uri = \"ws://127.0.0.1:8765/ws\"\n", + " async with websockets.connect(uri) as ws:\n", + " await ws.send(json.dumps(payload))\n", + " if not quiet:\n", + " print(\"✅ send:\", payload)\n", + "\n", + " try:\n", + " # 5 秒以内に返事が来なければ TimeoutError\n", + " response = await asyncio.wait_for(ws.recv(), timeout=5)\n", + " if not quiet:\n", + " if indent:\n", + " print(\"📨 recv: \", json.dumps(json.loads(response), indent=indent, ensure_ascii=False))\n", + " else:\n", + " print(\"📨 recv:\", response)\n", + " return json.loads(response)\n", + " except asyncio.TimeoutError:\n", + " print(\"⏰ タイムアウト(5 秒以内にメッセージが来ませんでした)\")\n", + "\n", + "payload = {\n", + " \"type\": \"item\",\n", + " \"command\": \"list-groups\",\n", + "}\n", + "await websocket_test(payload, quiet=True)" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'type': 'success',\n", + " 'command': 'list-group',\n", + " 'groupId': 0,\n", + " 'data': {'id': 0,\n", + " 'name': '基本形',\n", + " 'categories': [{'id': 0, 'name': '通常', 'itemCount': 111},\n", + " {'id': 1, 'name': 'キャラ', 'itemCount': 111},\n", + " {'id': 2, 'name': '影あり', 'itemCount': 86},\n", + " {'id': 10, 'name': 'STR_MOD(通常)', 'itemCount': 10},\n", + " {'id': 11, 'name': 'STR_MOD(キャラ)', 'itemCount': 10},\n", + " {'id': 12, 'name': 'STR_MOD(影)', 'itemCount': 10},\n", + " {'id': 500, 'name': 'Baby', 'itemCount': 2},\n", + " {'id': 65535, 'name': 'MOD', 'itemCount': 62}]}}" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "payload = {\n", + " \"type\": \"item\",\n", + " \"command\": \"list-group\",\n", + " \"groupId\": 0,\n", + "}\n", + "await websocket_test(payload, quiet=True)" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'type': 'success',\n", + " 'command': 'list-category',\n", + " 'groupId': 0,\n", + " 'categoryId': 0,\n", + " 'data': {'id': 0,\n", + " 'name': '通常',\n", + " 'groupId': 0,\n", + " 'items': [{'id': 0,\n", + " 'name': 'スフィア(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1,\n", + " 'name': 'キューブ(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 2,\n", + " 'name': 'ピラミッド(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 3,\n", + " 'name': 'コーン(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 4,\n", + " 'name': 'シリンダー(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 5,\n", + " 'name': 'クリスタル(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 6,\n", + " 'name': 'リング(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 405,\n", + " 'name': '星1(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 406,\n", + " 'name': 'ハート1(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 407,\n", + " 'name': '爪(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 408,\n", + " 'name': '筒(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 409,\n", + " 'name': 'パイプ1(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 415,\n", + " 'name': '筒2(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 416,\n", + " 'name': 'パイプ2(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 419,\n", + " 'name': '台形1(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 421,\n", + " 'name': '矢印1(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 423,\n", + " 'name': '矢印2(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 425,\n", + " 'name': '矢印3(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 431,\n", + " 'name': '穴あきキューブ(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 433,\n", + " 'name': '直角1(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 435,\n", + " 'name': '直角2(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 437,\n", + " 'name': '台形2(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 439,\n", + " 'name': '三日月1(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 441,\n", + " 'name': '三日月2(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 443,\n", + " 'name': '三日月3(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 445,\n", + " 'name': '十字(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 447,\n", + " 'name': 'V字(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 449,\n", + " 'name': '穴あき楕円(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 451,\n", + " 'name': '先尖り棒(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 453,\n", + " 'name': '三角(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 455,\n", + " 'name': '穴あき三角(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 457,\n", + " 'name': '弧1(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 459,\n", + " 'name': 'ハート2(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 461,\n", + " 'name': '星2(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 463,\n", + " 'name': '星3(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 465,\n", + " 'name': '星4(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 467,\n", + " 'name': '弧2(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 469,\n", + " 'name': '弧3(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 471,\n", + " 'name': '直角3(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 473,\n", + " 'name': '四分円(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 475,\n", + " 'name': '半円(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 477,\n", + " 'name': '五角形(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 479,\n", + " 'name': '六角形(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 481,\n", + " 'name': '穴あき六角形(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 483,\n", + " 'name': '八角形(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 490,\n", + " 'name': '頭(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 740,\n", + " 'name': '平面(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 965,\n", + " 'name': '輪(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 966,\n", + " 'name': 'カプセル(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 969,\n", + " 'name': '正台形(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1097,\n", + " 'name': '山型多角形1(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1098,\n", + " 'name': '山型多角形2(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1099,\n", + " 'name': '長六角形(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1100,\n", + " 'name': '長五角形(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1101,\n", + " 'name': '歪み三角柱(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1102,\n", + " 'name': 'マウス型右(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1103,\n", + " 'name': 'マウス型左(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1119,\n", + " 'name': '三角横台形(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1120,\n", + " 'name': '五角横台形(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1121,\n", + " 'name': '円形横台形(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1122,\n", + " 'name': 'ドロップ立体(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1123,\n", + " 'name': 'ドロップ平面(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1124,\n", + " 'name': 'ひょうたん立体(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1125,\n", + " 'name': 'ひょうたん平面(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1172,\n", + " 'name': '角リング(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1173,\n", + " 'name': '立体半円(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1174,\n", + " 'name': '立体四半円(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1175,\n", + " 'name': '角型(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1176,\n", + " 'name': '直角形(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1177,\n", + " 'name': '斜ひし形(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1178,\n", + " 'name': '歪み台形(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1179,\n", + " 'name': '欠け四角(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1180,\n", + " 'name': '二対多角形(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1181,\n", + " 'name': 'ヒレ型(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1182,\n", + " 'name': '歪み多角形(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1183,\n", + " 'name': '角なし斜ひし形(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1184,\n", + " 'name': '角なし歪み台形(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1185,\n", + " 'name': '角なし四角錐(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1186,\n", + " 'name': '角なし三角(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1187,\n", + " 'name': '角なし四角(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1188,\n", + " 'name': '筒四分(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1240,\n", + " 'name': '半ピラミッド(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1241,\n", + " 'name': '角なし半四角錐(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1242,\n", + " 'name': '半コーン(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1243,\n", + " 'name': '階段型(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 1244,\n", + " 'name': '半カプセル(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 2393,\n", + " 'name': '半リング(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 2394,\n", + " 'name': '四分リング(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 2395,\n", + " 'name': '細リング(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 2396,\n", + " 'name': '半細リング(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 2397,\n", + " 'name': '四分細リング(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 2421,\n", + " 'name': 'インフィニティー(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 2422,\n", + " 'name': '半インフィニティー(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 2423,\n", + " 'name': 'ダンベル(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 2424,\n", + " 'name': 'ダンベル立体(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 2425,\n", + " 'name': 'ドットハート(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 2426,\n", + " 'name': 'ブロック1(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 2427,\n", + " 'name': 'ブロック2(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 2428,\n", + " 'name': 'ブロック3(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 2429,\n", + " 'name': 'ブロック4(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 2430,\n", + " 'name': 'ブロック5(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 2431,\n", + " 'name': '砂時計(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 2481,\n", + " 'name': 'はぐるま1(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 2482,\n", + " 'name': 'はぐるま2(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 2483,\n", + " 'name': 'はぐるま3(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 2484,\n", + " 'name': 'はぐるま4(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 2485,\n", + " 'name': 'シュリケン1(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 2486,\n", + " 'name': 'シュリケン2(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 2487,\n", + " 'name': '十字型(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 2488,\n", + " 'name': '正十二面体(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}},\n", + " {'id': 2489,\n", + " 'name': '正二十面体(通常)',\n", + " 'properties': {'isAnime': False,\n", + " 'isScale': True,\n", + " 'isEmission': False,\n", + " 'isGlass': False,\n", + " 'hasColor': True,\n", + " 'hasPattern': True,\n", + " 'colorSlots': 3,\n", + " 'patternSlots': 3,\n", + " 'childRoot': '',\n", + " 'bones': 0}}]}}" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "payload = {\n", + " \"type\": \"item\",\n", + " \"command\": \"list-category\",\n", + " \"groupId\": 0,\n", + " \"categoryId\": 0,\n", + "}\n", + "await websocket_test(payload, quiet=True)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": ".venv", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.5" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/src/KKStudioSocket.Core/Commands/ItemCommandHandler.cs b/src/KKStudioSocket.Core/Commands/ItemCommandHandler.cs new file mode 100644 index 0000000..d561579 --- /dev/null +++ b/src/KKStudioSocket.Core/Commands/ItemCommandHandler.cs @@ -0,0 +1,425 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using WebSocketSharp; +using Newtonsoft.Json; +using Studio; + +namespace KKStudioSocket.Commands +{ + public class ItemCommandHandler : BaseCommandHandler + { + public ItemCommandHandler(System.Action sendCallback) : base(sendCallback) { } + + public void Handle(ItemCommand cmd) + { + ApplyItemCommand(cmd); + } + + private void ApplyItemCommand(ItemCommand cmd) + { + try + { + switch (cmd.command?.ToLower()) + { + case "list-groups": + HandleListGroups(cmd); + break; + case "list-group": + HandleListGroup(cmd); + break; + case "list-category": + HandleListCategory(cmd); + break; + case "catalog": + HandleCatalog(cmd); + break; + default: + KKStudioSocketPlugin.Logger.LogWarning($"Unsupported item command: {cmd.command}"); + SendErrorResponse($"Unsupported item command: {cmd.command}"); + break; + } + } + catch (Exception ex) + { + KKStudioSocketPlugin.Logger.LogError($"Item command error: {ex.Message}"); + SendErrorResponse($"Item command error: {ex.Message}"); + } + } + + private void HandleListGroups(ItemCommand cmd) + { + try + { + var groups = GetItemGroups(); + + var response = new + { + type = "success", + command = "list-groups", + data = groups + }; + + Send(JsonConvert.SerializeObject(response)); + KKStudioSocketPlugin.Logger.LogDebug($"Item groups retrieved: {groups.Count} groups"); + } + catch (Exception ex) + { + KKStudioSocketPlugin.Logger.LogError($"List groups error: {ex.Message}"); + SendErrorResponse($"List groups error: {ex.Message}"); + } + } + + private void HandleListGroup(ItemCommand cmd) + { + try + { + if (cmd.groupId < 0) + { + SendErrorResponse("Group ID is required and must be non-negative"); + return; + } + + var groupData = GetGroupData(cmd.groupId); + if (groupData == null) + { + SendErrorResponse($"Group with ID {cmd.groupId} not found"); + return; + } + + var response = new + { + type = "success", + command = "list-group", + groupId = cmd.groupId, + data = groupData + }; + + Send(JsonConvert.SerializeObject(response)); + KKStudioSocketPlugin.Logger.LogDebug($"Group {cmd.groupId} data retrieved"); + } + catch (Exception ex) + { + KKStudioSocketPlugin.Logger.LogError($"List group error: {ex.Message}"); + SendErrorResponse($"List group error: {ex.Message}"); + } + } + + private void HandleListCategory(ItemCommand cmd) + { + try + { + if (cmd.groupId < 0 || cmd.categoryId < 0) + { + SendErrorResponse("Both group ID and category ID are required and must be non-negative"); + return; + } + + var categoryData = GetCategoryData(cmd.groupId, cmd.categoryId); + if (categoryData == null) + { + SendErrorResponse($"Category {cmd.categoryId} in group {cmd.groupId} not found"); + return; + } + + var response = new + { + type = "success", + command = "list-category", + groupId = cmd.groupId, + categoryId = cmd.categoryId, + data = categoryData + }; + + Send(JsonConvert.SerializeObject(response)); + KKStudioSocketPlugin.Logger.LogDebug($"Category {cmd.categoryId} in group {cmd.groupId} data retrieved"); + } + catch (Exception ex) + { + KKStudioSocketPlugin.Logger.LogError($"List category error: {ex.Message}"); + SendErrorResponse($"List category error: {ex.Message}"); + } + } + + private void HandleCatalog(ItemCommand cmd) + { + try + { + var catalog = BuildItemCatalog(); + var jsonResponse = JsonConvert.SerializeObject(catalog); + + KKStudioSocketPlugin.Logger.LogDebug($"Item catalog retrieved with {catalog.Count} groups"); + Send(jsonResponse); + } + catch (Exception ex) + { + KKStudioSocketPlugin.Logger.LogError($"Item catalog retrieval error: {ex.Message}"); + SendErrorResponse($"Item catalog retrieval error: {ex.Message}"); + } + } + + private List BuildItemCatalog() + { + var catalog = new List(); + + // Get singleton Info instance + var info = Singleton.Instance; + if (info?.dicItemGroupCategory == null) + { + KKStudioSocketPlugin.Logger.LogWarning("Item group category dictionary is null"); + return catalog; + } + + // Iterate through all groups + foreach (var groupPair in info.dicItemGroupCategory) + { + int groupId = groupPair.Key; + var groupInfo = groupPair.Value; + + var groupData = new + { + id = groupId, + name = groupInfo.name, + type = "group", + categories = BuildCategoriesForGroup(groupId, groupInfo) + }; + + catalog.Add(groupData); + } + + return catalog; + } + + private List BuildCategoriesForGroup(int groupId, Info.GroupInfo groupInfo) + { + var categories = new List(); + + if (groupInfo.dicCategory == null) + { + return categories; + } + + // Iterate through categories in this group + foreach (var categoryPair in groupInfo.dicCategory) + { + int categoryId = categoryPair.Key; + string categoryName = categoryPair.Value; + + var categoryData = new + { + id = categoryId, + name = categoryName, + type = "category", + items = BuildItemsForCategory(groupId, categoryId) + }; + + categories.Add(categoryData); + } + + return categories; + } + + private List BuildItemsForCategory(int groupId, int categoryId) + { + var items = new List(); + + var info = Singleton.Instance; + + // Check if this group/category combination exists in dicItemLoadInfo + if (info?.dicItemLoadInfo == null || + !info.dicItemLoadInfo.ContainsKey(groupId) || + !info.dicItemLoadInfo[groupId].ContainsKey(categoryId)) + { + return items; + } + + // Iterate through items in this category + foreach (var itemPair in info.dicItemLoadInfo[groupId][categoryId]) + { + int itemId = itemPair.Key; + var itemInfo = itemPair.Value; + + var itemData = new + { + id = itemId, + name = itemInfo.name, + type = "item", + groupId = groupId, + categoryId = categoryId, + properties = new + { + isAnime = itemInfo.isAnime, + isScale = itemInfo.isScale, + isEmission = itemInfo.isEmission, + isGlass = itemInfo.isGlass, + hasColor = itemInfo.isColor, + hasPattern = itemInfo.isPattren, + colorSlots = itemInfo.color?.Length ?? 0, + patternSlots = itemInfo.pattren?.Length ?? 0, + childRoot = itemInfo.childRoot, + bones = itemInfo.bones?.Count ?? 0 + }, + file = new + { + manifest = itemInfo.manifest, + bundlePath = itemInfo.bundlePath, + fileName = itemInfo.fileName + } + }; + + items.Add(itemData); + } + + return items; + } + + private List GetItemGroups() + { + var groups = new List(); + + var info = Singleton.Instance; + if (info?.dicItemGroupCategory == null) + { + return groups; + } + + foreach (var groupPair in info.dicItemGroupCategory) + { + int groupId = groupPair.Key; + var groupInfo = groupPair.Value; + + var groupData = new + { + id = groupId, + name = groupInfo.name, + categoryCount = groupInfo.dicCategory?.Count ?? 0 + }; + + groups.Add(groupData); + } + + return groups.OrderBy(g => { + var obj = g.GetType().GetProperty("id").GetValue(g, null); + return (int)obj; + }).ToList(); + } + + private object GetGroupData(int groupId) + { + var info = Singleton.Instance; + if (info?.dicItemGroupCategory == null || !info.dicItemGroupCategory.ContainsKey(groupId)) + { + return null; + } + + var groupInfo = info.dicItemGroupCategory[groupId]; + var categories = new List(); + + if (groupInfo.dicCategory != null) + { + foreach (var categoryPair in groupInfo.dicCategory) + { + int categoryId = categoryPair.Key; + string categoryName = categoryPair.Value; + + // Count items in this category + int itemCount = 0; + if (info.dicItemLoadInfo?.ContainsKey(groupId) == true && + info.dicItemLoadInfo[groupId]?.ContainsKey(categoryId) == true) + { + itemCount = info.dicItemLoadInfo[groupId][categoryId].Count; + } + + var categoryData = new + { + id = categoryId, + name = categoryName, + itemCount = itemCount + }; + + categories.Add(categoryData); + } + } + + return new + { + id = groupId, + name = groupInfo.name, + categories = categories.OrderBy(c => { + var obj = c.GetType().GetProperty("id").GetValue(c, null); + return (int)obj; + }).ToList() + }; + } + + private object GetCategoryData(int groupId, int categoryId) + { + var info = Singleton.Instance; + + // Check if group/category combination exists + if (info?.dicItemLoadInfo == null || + !info.dicItemLoadInfo.ContainsKey(groupId) || + !info.dicItemLoadInfo[groupId].ContainsKey(categoryId)) + { + return null; + } + + var items = new List(); + + foreach (var itemPair in info.dicItemLoadInfo[groupId][categoryId]) + { + int itemId = itemPair.Key; + var itemInfo = itemPair.Value; + + var itemData = new + { + id = itemId, + name = itemInfo.name, + properties = new + { + isAnime = itemInfo.isAnime, + isScale = itemInfo.isScale, + isEmission = itemInfo.isEmission, + isGlass = itemInfo.isGlass, + hasColor = itemInfo.isColor, + hasPattern = itemInfo.isPattren, + colorSlots = itemInfo.color?.Length ?? 0, + patternSlots = itemInfo.pattren?.Length ?? 0, + childRoot = itemInfo.childRoot, + bones = itemInfo.bones?.Count ?? 0 + } + }; + + items.Add(itemData); + } + + // Get category name + string categoryName = ""; + if (info.dicItemGroupCategory?.ContainsKey(groupId) == true) + { + var groupInfo = info.dicItemGroupCategory[groupId]; + if (groupInfo.dicCategory?.ContainsKey(categoryId) == true) + { + categoryName = groupInfo.dicCategory[categoryId]; + } + } + + return new + { + id = categoryId, + name = categoryName, + groupId = groupId, + items = items.OrderBy(i => { + var obj = i.GetType().GetProperty("id").GetValue(i, null); + return (int)obj; + }).ToList() + }; + } + + private void SendErrorResponse(string message) + { + var response = new { type = "error", message = message }; + Send(JsonConvert.SerializeObject(response)); + } + } +} \ No newline at end of file diff --git a/src/KKStudioSocket.Core/KKStudioSocket.Core.projitems b/src/KKStudioSocket.Core/KKStudioSocket.Core.projitems index 89811d2..d8633ba 100644 --- a/src/KKStudioSocket.Core/KKStudioSocket.Core.projitems +++ b/src/KKStudioSocket.Core/KKStudioSocket.Core.projitems @@ -19,5 +19,6 @@ + \ No newline at end of file diff --git a/src/KKStudioSocket.Core/KKStudioSocketPlugin.cs b/src/KKStudioSocket.Core/KKStudioSocketPlugin.cs index 0eb2ffe..230023f 100644 --- a/src/KKStudioSocket.Core/KKStudioSocketPlugin.cs +++ b/src/KKStudioSocket.Core/KKStudioSocketPlugin.cs @@ -149,6 +149,21 @@ protected override void OnMessage(MessageEventArgs e) KKStudioSocketPlugin.Logger.LogDebug("Tree handler executed"); break; + case "item": + KKStudioSocketPlugin.Logger.LogDebug("Handling item command"); + var itemCmd = JsonConvert.DeserializeObject(e.Data); + if (itemCmd != null) + { + var itemHandler = new ItemCommandHandler(Send); + itemHandler.Handle(itemCmd); + } + else + { + KKStudioSocketPlugin.Logger.LogWarning("Failed to parse item command"); + } + KKStudioSocketPlugin.Logger.LogDebug("Item handler executed"); + break; + case "update": var updateCmd = JsonConvert.DeserializeObject(e.Data); if (updateCmd != null) @@ -316,4 +331,12 @@ public class CameraCommand : BaseCommand public int cameraId; // For switching to specific camera object } + [Serializable] + public class ItemCommand : BaseCommand + { + public string command; + public int groupId = -1; + public int categoryId = -1; + } + } \ No newline at end of file From ab10205b531cb829da0cfb691628005165e49b07 Mon Sep 17 00:00:00 2001 From: great-majority Date: Fri, 27 Jun 2025 13:28:32 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=E2=9C=A8=EF=B8=8F=20Add=20notebook=20to=20?= =?UTF-8?q?reproduce=20sample=20video?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- notebooks/box.ipynb | 203 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 203 insertions(+) create mode 100644 notebooks/box.ipynb diff --git a/notebooks/box.ipynb b/notebooks/box.ipynb new file mode 100644 index 0000000..5ba22c4 --- /dev/null +++ b/notebooks/box.ipynb @@ -0,0 +1,203 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "6287d4f5", + "metadata": {}, + "outputs": [], + "source": [ + "import time\n", + "import json\n", + "import nest_asyncio\n", + "import asyncio\n", + "import websockets\n", + "import numpy as np\n", + "import math\n", + "import random\n", + "import colorsys\n", + "from tqdm.notebook import tqdm\n", + "nest_asyncio.apply()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f080eaaf", + "metadata": {}, + "outputs": [], + "source": [ + "async def websocket_test(payload, indent=None, quiet=False):\n", + " uri = \"ws://127.0.0.1:8765/ws\"\n", + " async with websockets.connect(uri) as ws:\n", + " await ws.send(json.dumps(payload))\n", + " if not quiet:\n", + " print(\"✅ send:\", payload)\n", + "\n", + " try:\n", + " # 5 秒以内に返事が来なければ TimeoutError\n", + " response = await asyncio.wait_for(ws.recv(), timeout=5)\n", + " if not quiet:\n", + " if indent:\n", + " print(\"📨 recv: \", json.dumps(json.loads(response), indent=indent, ensure_ascii=False))\n", + " else:\n", + " print(\"📨 recv:\", response)\n", + " return json.loads(response)\n", + " except asyncio.TimeoutError:\n", + " print(\"⏰ タイムアウト(5 秒以内にメッセージが来ませんでした)\")" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "b30fb5c4", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "✅ send: {'type': 'tree'}\n", + "📨 recv: [{\"name\":\"篠崎 遥\",\"objectInfo\":{\"id\":0,\"type\":\"OCICharFemale\"},\"children\":[]},{\"name\":\"center\",\"objectInfo\":{\"id\":2212,\"type\":\"OCIFolder\"},\"children\":[{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2213,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2215,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2217,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2219,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2221,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2223,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2225,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2227,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2229,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2231,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2233,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2235,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2237,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2239,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2241,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2243,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2245,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2247,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2249,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2251,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2253,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2255,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2257,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2259,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2261,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2263,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2265,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2267,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2269,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2271,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2273,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2275,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2277,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2279,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2281,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2283,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2285,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2287,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2289,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2291,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2293,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2295,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2297,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2299,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2301,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2303,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2305,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2307,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2309,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2311,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2313,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2315,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2317,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2319,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2321,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2323,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2325,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2327,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2329,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2331,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2333,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2335,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2337,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2339,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2341,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2343,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2345,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2347,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2349,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2351,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2353,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2355,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2357,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2359,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2361,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2363,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2365,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2367,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2369,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2371,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2373,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2375,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2377,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2379,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2381,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2383,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2385,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2387,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2389,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2391,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2393,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2395,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2397,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2399,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2401,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2403,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2405,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2407,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2409,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2411,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2413,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2415,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2417,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2419,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2421,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2423,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2425,\"type\":\"OCIItem\"},\"children\":[]},{\"name\":\"キューブ(通常)\",\"objectInfo\":{\"id\":2427,\"type\":\"OCIItem\"},\"children\":[]}]}]\n", + "✅ send: {'type': 'delete', 'id': 2212}\n", + "📨 recv: {\"type\":\"success\",\"message\":\"Object 2212 deleted successfully\"}\n", + "✅ send: {'type': 'add', 'command': 'folder', 'name': 'center'}\n", + "📨 recv: {\"type\":\"success\",\"message\":\"Folder added successfully with name: center\",\"objectId\":2212}\n", + "✅ send: {'type': 'update', 'command': 'transform', 'id': 2212, 'pos': [0.0, 1.5, 0.5]}\n", + "📨 recv: {\"type\":\"success\",\"message\":\"Transform updated for object ID 2212\"}\n" + ] + } + ], + "source": [ + "payload = {\n", + " \"type\": \"tree\",\n", + "}\n", + "tree = await websocket_test(payload)\n", + "\n", + "for item in tree:\n", + " if item[\"name\"] == \"center\":\n", + " payload = {\n", + " \"type\": \"delete\",\n", + " \"id\": item[\"objectInfo\"][\"id\"],\n", + " }\n", + " await websocket_test(payload)\n", + "\n", + "payload = {\n", + " \"type\": \"add\",\n", + " \"command\": \"folder\",\n", + " \"name\": \"center\"\n", + "}\n", + "response = await websocket_test(payload)\n", + "center_id = response[\"objectId\"]\n", + "\n", + "payload = {\n", + " \"type\": \"update\",\n", + " \"command\": \"transform\",\n", + " \"id\": center_id,\n", + " \"pos\": [0.0, 1.5, 0.5],\n", + "}\n", + "response = await websocket_test(payload)" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "7d3ecb1c", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "b22b79937ef04580b3dca114fd534344", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + " 0%| | 0/1080 [00:00