JoPmt commited on
Commit
db4a700
·
verified ·
1 Parent(s): c35f4fa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
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
- 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():
 
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():