Spaces:
Sleeping
Sleeping
kolibril13
commited on
Commit
•
04ad805
1
Parent(s):
b532e70
rename
Browse files
pages/{02_molecule.ipynb → 00_home.ipynb}
RENAMED
@@ -7,51 +7,19 @@
|
|
7 |
"outputs": [],
|
8 |
"source": [
|
9 |
"import solara\n",
|
10 |
-
"import bpy\n",
|
11 |
-
"from IPython.display import Image, display\n",
|
12 |
"\n",
|
13 |
-
"light_position = solara.reactive(3)\n",
|
14 |
"\n",
|
15 |
"@solara.component\n",
|
16 |
"def Page():\n",
|
17 |
-
" solara.
|
18 |
-
"
|
19 |
-
"
|
20 |
-
"
|
21 |
-
"
|
22 |
-
"
|
23 |
-
"
|
24 |
-
"
|
25 |
-
"
|
26 |
-
" major_radius=1.5,\n",
|
27 |
-
" minor_radius=0.75,\n",
|
28 |
-
" major_segments=48 * 4,\n",
|
29 |
-
" minor_segments=12 * 4,\n",
|
30 |
-
" align=\"WORLD\",\n",
|
31 |
-
" location=(0, 1, 1),\n",
|
32 |
-
" )\n",
|
33 |
-
" \n",
|
34 |
-
" # # Light\n",
|
35 |
-
" light = bpy.data.objects[\"Light\"]\n",
|
36 |
-
" light.location = (light_position.value, 0, 2) # Position the light\n",
|
37 |
-
" \n",
|
38 |
-
" # # Camera\n",
|
39 |
-
" camera = bpy.data.objects[\"Camera\"]\n",
|
40 |
-
" camera.location = (5, -3, 4)\n",
|
41 |
-
" camera.data.dof.use_dof = True\n",
|
42 |
-
" camera.data.dof.focus_distance = 5\n",
|
43 |
-
" camera.data.dof.aperture_fstop = 4\n",
|
44 |
-
" \n",
|
45 |
-
" # # Render\n",
|
46 |
-
" path = \"test.png\"\n",
|
47 |
-
" bpy.context.scene.render.resolution_x = 400\n",
|
48 |
-
" bpy.context.scene.render.resolution_y = 200\n",
|
49 |
-
" bpy.context.scene.render.image_settings.file_format = \"PNG\"\n",
|
50 |
-
" bpy.context.scene.render.filepath = path\n",
|
51 |
-
" bpy.ops.render.render(write_still=True)\n",
|
52 |
-
" bpy.data.images[\"Render Result\"].save_render(filepath=bpy.context.scene.render.filepath)\n",
|
53 |
-
" \n",
|
54 |
-
" display(Image(path))\n",
|
55 |
"\n",
|
56 |
"Page()"
|
57 |
]
|
|
|
7 |
"outputs": [],
|
8 |
"source": [
|
9 |
"import solara\n",
|
|
|
|
|
10 |
"\n",
|
|
|
11 |
"\n",
|
12 |
"@solara.component\n",
|
13 |
"def Page():\n",
|
14 |
+
" with solara.Column(align=\"center\"):\n",
|
15 |
+
" markdown = \"\"\"\n",
|
16 |
+
" ## Solara for Blender Rendering\n",
|
17 |
+
" \n",
|
18 |
+
" Hello World!\n",
|
19 |
+
"\n",
|
20 |
+
" \"\"\"\n",
|
21 |
+
"\n",
|
22 |
+
" solara.Markdown(markdown)\n",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
"\n",
|
24 |
"Page()"
|
25 |
]
|
pages/{01_blender_minimal_torus.ipynb → 01_molecule.ipynb}
RENAMED
File without changes
|
pages/test.png
DELETED
Binary file (52.7 kB)
|
|
test.png
DELETED
Binary file (52.7 kB)
|
|