JoPmt commited on
Commit
88c6411
1 Parent(s): 0c8f3cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -58,9 +58,9 @@ def add_animated_space_rocks():
58
  for i in range(30):
59
  bpy.ops.mesh.primitive_uv_sphere_add(radius=random.uniform(0.01, 0.1), location=(random.uniform(-10, 10), random.uniform(-10, 10), random.uniform(-4, 9)))
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", frame=duration * bpy.context.scene.render.fps)
64
  bpy.context.view_layer.objects.active = space_rock
65
  space_rock.select_set(True)
66
  space_rock.animation_data_create()
 
58
  for i in range(30):
59
  bpy.ops.mesh.primitive_uv_sphere_add(radius=random.uniform(0.01, 0.1), location=(random.uniform(-10, 10), random.uniform(-10, 10), random.uniform(-4, 9)))
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", frame=duration * bpy.context.scene.render.fps)
64
  bpy.context.view_layer.objects.active = space_rock
65
  space_rock.select_set(True)
66
  space_rock.animation_data_create()