kolibril13 commited on
Commit
18c2d9d
1 Parent(s): ffa865b

add blender

Browse files
Files changed (1) hide show
  1. pages/01_wave_packet.ipynb +11 -26
pages/01_wave_packet.ipynb CHANGED
@@ -9,14 +9,24 @@
9
  "import solara\n",
10
  "\n",
11
  "turbo_boost = solara.reactive(True)\n",
 
 
 
12
  "\n",
13
  "@solara.component\n",
14
  "def Page():\n",
15
  " solara.Checkbox(label=\"Turbo boost\", value=turbo_boost)\n",
16
  " if turbo_boost.value:\n",
17
  " solara.Success(\"Turbo boost is on\")\n",
 
18
  " else:\n",
19
  " solara.Warning(\"Turbo boost is off, you might want to turn it on\")\n",
 
 
 
 
 
 
20
  "Page()"
21
  ]
22
  },
@@ -25,32 +35,7 @@
25
  "execution_count": null,
26
  "metadata": {},
27
  "outputs": [],
28
- "source": [
29
- "# # import bpy\n",
30
- "# from IPython.display import display, Image\n",
31
- "\n",
32
- "\n",
33
- "\n",
34
- "# import solara\n",
35
- "# import numpy as np\n",
36
- "\n",
37
- "# turbo_boost = solara.reactive(True)\n",
38
- "\n",
39
- "\n",
40
- "# @solara.component\n",
41
- "# def Page():\n",
42
- "# path = \"test.png\"\n",
43
- "# # bpy.context.scene.render.resolution_x = 500\n",
44
- "# # bpy.context.scene.render.resolution_y = 200\n",
45
- "# # bpy.ops.render.render()\n",
46
- "# # bpy.data.images[\"Render Result\"].save_render(filepath=path)\n",
47
- "# # display(Image(filename=path))\n",
48
- "\n",
49
- "# print(\"Hello World\")\n",
50
- "# checkbox = solara.Checkbox(label=\"Turbo boost\", value=turbo_boost)\n",
51
- "\n",
52
- "# Page()"
53
- ]
54
  }
55
  ],
56
  "metadata": {
 
9
  "import solara\n",
10
  "\n",
11
  "turbo_boost = solara.reactive(True)\n",
12
+ "import bpy\n",
13
+ "from IPython.display import display, Image\n",
14
+ "\n",
15
  "\n",
16
  "@solara.component\n",
17
  "def Page():\n",
18
  " solara.Checkbox(label=\"Turbo boost\", value=turbo_boost)\n",
19
  " if turbo_boost.value:\n",
20
  " solara.Success(\"Turbo boost is on\")\n",
21
+ "\n",
22
  " else:\n",
23
  " solara.Warning(\"Turbo boost is off, you might want to turn it on\")\n",
24
+ " path = \"test.png\"\n",
25
+ " bpy.context.scene.render.resolution_x = 500\n",
26
+ " bpy.context.scene.render.resolution_y = 200\n",
27
+ " bpy.ops.render.render()\n",
28
+ " bpy.data.images[\"Render Result\"].save_render(filepath=path)\n",
29
+ " display(Image(filename=path))\n",
30
  "Page()"
31
  ]
32
  },
 
35
  "execution_count": null,
36
  "metadata": {},
37
  "outputs": [],
38
+ "source": []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  }
40
  ],
41
  "metadata": {