Results 1 to 2 of 2
  1. #1
    Member threedslider's Avatar
    Join Date
    Apr 2015
    Location
    France
    Posts
    246

    How to move object smoothly and with time ?

    How to move an object in realtime and smoothly on viewport with python ?

    I mean as pseudo :

    for move in range (0, time(10)):
    objmov = getobject
    objmov.x += 2
    move_time = move

    time(10) mean 10 second to move an object in x. What do you think? It is possible to make it?



  2. #2
    Member threedslider's Avatar
    Join Date
    Apr 2015
    Location
    France
    Posts
    246
    finally there is other to do it :

    Code:
    import bpy
    obj = bpy.context.object
    obj.location[2] = 0.0
    obj.keyframe_insert(data_path="location", frame=10.0, index=2)
    obj.location[2] = 1.0
    obj.keyframe_insert(data_path="location", frame=20.0, index=2)
    I was thinking if it is possible to make animate cube without keyframe... Anyone ?



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •