Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -55,12 +55,13 @@ def add_animated_space_rocks():
|
|
| 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.
|
| 60 |
-
space_rock = bpy.context.active_object
|
| 61 |
-
space_rock.keyframe_insert(data_path="location", frame=1)
|
| 62 |
-
space_rock.location = (random.uniform(-10, 10), random.uniform(-10, 10), random.uniform(-10, 10))
|
| 63 |
-
space_rock.keyframe_insert(data_path="location", index=-1, frame=
|
| 64 |
|
| 65 |
|
| 66 |
def create_particle_effects_animation():
|
|
@@ -80,7 +81,7 @@ def create_particle_effects_animation():
|
|
| 80 |
particle_system.particle_system.settings.instance_object = bpy.data.objects["ParticleOne"]
|
| 81 |
emitter.keyframe_insert(data_path="location", index=-1, frame=1)
|
| 82 |
emitter.location = (random.uniform(-10, 10), random.uniform(-10, 10), random.uniform(-10, 10))
|
| 83 |
-
emitter.keyframe_insert(data_path="location", index=-1, frame=
|
| 84 |
|
| 85 |
def create_meteor_with_particle_system():
|
| 86 |
##wip
|
|
|
|
| 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 |
+
space_rock[i] = bpy.context.active_object
|
| 62 |
+
space_rock[i].keyframe_insert(data_path="location", frame=1)
|
| 63 |
+
space_rock[i].location = (random.uniform(-10, 10), random.uniform(-10, 10), random.uniform(-10, 10))
|
| 64 |
+
space_rock[i].keyframe_insert(data_path="location", index=-1, frame=20)
|
| 65 |
|
| 66 |
|
| 67 |
def create_particle_effects_animation():
|
|
|
|
| 81 |
particle_system.particle_system.settings.instance_object = bpy.data.objects["ParticleOne"]
|
| 82 |
emitter.keyframe_insert(data_path="location", index=-1, frame=1)
|
| 83 |
emitter.location = (random.uniform(-10, 10), random.uniform(-10, 10), random.uniform(-10, 10))
|
| 84 |
+
emitter.keyframe_insert(data_path="location", index=-1, frame=20)
|
| 85 |
|
| 86 |
def create_meteor_with_particle_system():
|
| 87 |
##wip
|