Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -55,13 +55,12 @@ def add_animated_space_rocks():
|
|
| 55 |
bpy.context.scene.render.fps = 10
|
| 56 |
duration = 2
|
| 57 |
radius=2
|
| 58 |
-
space_rock=[]
|
| 59 |
for i in range(30):
|
| 60 |
bpy.ops.mesh.primitive_uv_sphere_add(radius=random.uniform(0.03, 0.1), location=(random.uniform(-10, 10), random.uniform(-10, 10), random.uniform(-4, 9)))
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
|
| 66 |
|
| 67 |
def create_particle_effects_animation():
|
|
|
|
| 55 |
bpy.context.scene.render.fps = 10
|
| 56 |
duration = 2
|
| 57 |
radius=2
|
|
|
|
| 58 |
for i in range(30):
|
| 59 |
bpy.ops.mesh.primitive_uv_sphere_add(radius=random.uniform(0.03, 0.1), location=(random.uniform(-10, 10), random.uniform(-10, 10), random.uniform(-4, 9)))
|
| 60 |
+
i = bpy.context.active_object
|
| 61 |
+
i.keyframe_insert(data_path="location", frame=1)
|
| 62 |
+
i.location = (random.uniform(-10, 10), random.uniform(-10, 10), random.uniform(-10, 10))
|
| 63 |
+
i.keyframe_insert(data_path="location", index=-1, frame=20)
|
| 64 |
|
| 65 |
|
| 66 |
def create_particle_effects_animation():
|