This commit is contained in:
Skye Terran 2021-08-23 16:19:59 -07:00
parent c52fd22b9b
commit c25cf1a70d
2 changed files with 33 additions and 24 deletions

View File

@ -2,7 +2,7 @@
"cells": [ "cells": [
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 86, "execution_count": 89,
"source": [ "source": [
"import json\r\n", "import json\r\n",
"\r\n", "\r\n",
@ -50,9 +50,10 @@
" return key\r\n", " return key\r\n",
"\r\n", "\r\n",
"# add an asset to the graph\r\n", "# add an asset to the graph\r\n",
"def add_asset(data, name):\r\n", "def add_asset(data, name, path):\r\n",
" asset_data = {\r\n", " asset_data = {\r\n",
" \"name\": (\"name\", name)\r\n", " \"name\": (\"name\", name),\r\n",
" \"file\": (\"path\", path)\r\n",
" }\r\n", " }\r\n",
" \r\n", " \r\n",
" # add the asset to the graph\r\n", " # add the asset to the graph\r\n",
@ -79,7 +80,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 87, "execution_count": 90,
"source": [ "source": [
"# cache the scene\r\n", "# cache the scene\r\n",
"def cache_scene(data):\r\n", "def cache_scene(data):\r\n",
@ -148,7 +149,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 88, "execution_count": 91,
"source": [ "source": [
"# just returns a random string\r\n", "# just returns a random string\r\n",
"import random\r\n", "import random\r\n",
@ -163,7 +164,7 @@
"asset_names = []\r\n", "asset_names = []\r\n",
"for i in range(3):\r\n", "for i in range(3):\r\n",
" name = random_string(8)\r\n", " name = random_string(8)\r\n",
" add_asset(test_scene, name)\r\n", " add_asset(test_scene, name, \"Assets/TestAsset.obj\")\r\n",
" asset_names.append(name)\r\n", " asset_names.append(name)\r\n",
"\r\n", "\r\n",
"# populate objects in scene\r\n", "# populate objects in scene\r\n",

View File

@ -20,7 +20,7 @@
{ {
"name": [ "name": [
"name", "name",
"F0O8L98N" "8KF4IW7J"
], ],
"asset": "#0x9", "asset": "#0x9",
"trans": "#0xa" "trans": "#0xa"
@ -31,11 +31,11 @@
{ {
"name": [ "name": [
"name", "name",
"PMG7JNPR" "6IIDHIMN"
], ],
"asset": [ "asset": [
"asset", "asset",
"2YGVO7W4" "L3T5A6RD"
], ],
"trans": "#0xa" "trans": "#0xa"
} }
@ -45,7 +45,7 @@
{ {
"name": [ "name": [
"name", "name",
"RW53IYCM" "S7FS45HQ"
], ],
"asset": "#0x9", "asset": "#0x9",
"trans": "#0xa" "trans": "#0xa"
@ -56,12 +56,9 @@
{ {
"name": [ "name": [
"name", "name",
"6SS003XM" "LVAWTY6W"
],
"asset": [
"asset",
"7YRERZGM"
], ],
"asset": "#0xb",
"trans": "#0xa" "trans": "#0xa"
} }
], ],
@ -70,9 +67,9 @@
{ {
"name": [ "name": [
"name", "name",
"8L4JU4I1" "OADE7KQG"
], ],
"asset": "#0x9", "asset": "#0xb",
"trans": "#0xa" "trans": "#0xa"
} }
] ]
@ -83,8 +80,9 @@
{ {
"name": [ "name": [
"name", "name",
"QCR0823N" "QT5Z6AA9"
] ],
"file": "#0xc"
} }
], ],
"0x2": [ "0x2": [
@ -92,8 +90,9 @@
{ {
"name": [ "name": [
"name", "name",
"7YRERZGM" "L3T5A6RD"
] ],
"file": "#0xc"
} }
], ],
"0x3": [ "0x3": [
@ -101,8 +100,9 @@
{ {
"name": [ "name": [
"name", "name",
"2YGVO7W4" "7OAGNOGS"
] ],
"file": "#0xc"
} }
] ]
} }
@ -110,7 +110,7 @@
"cache": { "cache": {
"#0x9": [ "#0x9": [
"asset", "asset",
"QCR0823N" "7OAGNOGS"
], ],
"#0xa": [ "#0xa": [
"trans", "trans",
@ -131,6 +131,14 @@
1.0 1.0
] ]
] ]
],
"#0xb": [
"asset",
"QT5Z6AA9"
],
"#0xc": [
"path",
"Assets/TestAsset.obj"
] ]
} }
} }