Spaces:
Sleeping
Sleeping
Jan-Hendrik Müller
commited on
Commit
·
669902c
1
Parent(s):
6f988d3
tweak
Browse files- pages/01_app.ipynb +42 -5
pages/01_app.ipynb
CHANGED
@@ -2,9 +2,20 @@
|
|
2 |
"cells": [
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
-
"execution_count":
|
6 |
"metadata": {},
|
7 |
-
"outputs": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
"source": [
|
9 |
"import solara\n",
|
10 |
"import bpy\n",
|
@@ -26,7 +37,33 @@
|
|
26 |
" bpy.data.images[\"Render Result\"].save_render(filepath=str(output_path))\n",
|
27 |
" \n",
|
28 |
" return output_path\n",
|
29 |
-
"\n"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
"@solara.component\n",
|
31 |
"def Page():\n",
|
32 |
"\n",
|
@@ -64,7 +101,7 @@
|
|
64 |
],
|
65 |
"metadata": {
|
66 |
"kernelspec": {
|
67 |
-
"display_name": "
|
68 |
"language": "python",
|
69 |
"name": "python3"
|
70 |
},
|
@@ -82,5 +119,5 @@
|
|
82 |
}
|
83 |
},
|
84 |
"nbformat": 4,
|
85 |
-
"nbformat_minor":
|
86 |
}
|
|
|
2 |
"cells": [
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
+
"execution_count": 1,
|
6 |
"metadata": {},
|
7 |
+
"outputs": [
|
8 |
+
{
|
9 |
+
"data": {
|
10 |
+
"text/plain": [
|
11 |
+
"PosixPath('/Users/jan-hendrik/projects/bpy4.2.0-solara/pages/render_output.png')"
|
12 |
+
]
|
13 |
+
},
|
14 |
+
"execution_count": 1,
|
15 |
+
"metadata": {},
|
16 |
+
"output_type": "execute_result"
|
17 |
+
}
|
18 |
+
],
|
19 |
"source": [
|
20 |
"import solara\n",
|
21 |
"import bpy\n",
|
|
|
37 |
" bpy.data.images[\"Render Result\"].save_render(filepath=str(output_path))\n",
|
38 |
" \n",
|
39 |
" return output_path\n",
|
40 |
+
"render_image()\n"
|
41 |
+
]
|
42 |
+
},
|
43 |
+
{
|
44 |
+
"cell_type": "code",
|
45 |
+
"execution_count": 2,
|
46 |
+
"metadata": {},
|
47 |
+
"outputs": [
|
48 |
+
{
|
49 |
+
"data": {
|
50 |
+
"application/vnd.jupyter.widget-view+json": {
|
51 |
+
"model_id": "2e3909e292e3444c93de2c3e19e346ae",
|
52 |
+
"version_major": 2,
|
53 |
+
"version_minor": 0
|
54 |
+
},
|
55 |
+
"text/html": [
|
56 |
+
"Cannot show widget. You probably want to rerun the code cell above (<i>Click in the code cell, and press Shift+Enter <kbd>⇧</kbd>+<kbd>↩</kbd></i>)."
|
57 |
+
],
|
58 |
+
"text/plain": [
|
59 |
+
"Cannot show ipywidgets in text"
|
60 |
+
]
|
61 |
+
},
|
62 |
+
"metadata": {},
|
63 |
+
"output_type": "display_data"
|
64 |
+
}
|
65 |
+
],
|
66 |
+
"source": [
|
67 |
"@solara.component\n",
|
68 |
"def Page():\n",
|
69 |
"\n",
|
|
|
101 |
],
|
102 |
"metadata": {
|
103 |
"kernelspec": {
|
104 |
+
"display_name": "Python 3 (ipykernel)",
|
105 |
"language": "python",
|
106 |
"name": "python3"
|
107 |
},
|
|
|
119 |
}
|
120 |
},
|
121 |
"nbformat": 4,
|
122 |
+
"nbformat_minor": 4
|
123 |
}
|