stayOnFloor

This is devoted to the problem of sliding of feet on the floor. The script gives possibility to remove all the keys on the trajectory of translation within particular time range and fix position in the current frame with two flat keys. The script is created with the help of UIBuilder.

In the video I’m showing how to use the script

Description

The script has a user interface.

Here we set a time range and a blend time value. The button “Action” starts the algorithm for all selected objects with the Blend time. In specifed time range two keys are set with flat tangents. Please take into consideration, that position will be taken from the transformation at the current frame.

Download

MotionBuilder 2010 –

MotionBuilder 2012 –

MotionBuilder 2013 – [wpdm_file id=3]

Log

19.03.2013 – added Timeline range button and transformation channels list

30.08.2012 – new version for MoBu 2012, 2013

24.08.2012 – first script release

MoBu script: stay on floor
Tagged on:             

24 thoughts on “MoBu script: stay on floor

  • Monday August 27th, 2012 at 10:57 AM
    Permalink

    Thank you! This will be interesting to try out :)

    I was really impressed by the system you using in the post “This is how we cleanup”. Are there any possibilities that you will release it? It looks really useful!

  • Monday August 27th, 2012 at 09:43 PM
    Permalink

    Hi Carolina, thank you for the feedback. I hope you will find this script usefull.
    About the cleanup mocap system. It’s still our inhouse software, maybe in the future I will make some version for the public… But I can’t say exactly when.

  • Tuesday August 28th, 2012 at 09:02 AM
    Permalink

    Thanks for your answer (and your scripts).
    If you need someone to beta test the cleanup mocap system let me know :)

  • Thursday August 30th, 2012 at 04:33 PM
    Permalink

    I try to open this script in MoBu 2012. Script editor print this:

    Python 2.6.4 (r264:75708, Oct 26 2009, 07:36:50) [MSC v.1500 64 bit (AMD64)] on win32
    >>>
    Traceback (most recent call last):
    File “C:/Program Files/Autodesk/MotionBuilder 2012/bin/config/Scripts/StayOnFloor.py”, line 262, in
    CreateTool()
    File “C:/Program Files/Autodesk/MotionBuilder 2012/bin/config/Scripts/StayOnFloor.py”, line 257, in CreateTool
    t = CreateUniqueTool(“Stay on floor (Sergey Solokhin 2012)”)
    NameError: global name ‘CreateUniqueTool’ is not defined
    >>>

  • Thursday August 30th, 2012 at 09:44 PM
    Permalink

    Hi Marcin,

    I have uploaded a new version for MoBu 2012.
    The difference is in a procedure name. In MoBu 2010 it was CreateUniqueTool, and then in MoBu 2011, 2012 it was renamed FBCreateUniqueTool.

  • Friday August 31st, 2012 at 11:43 AM
    Permalink

    Next error

    Python 2.6.4 (r264:75708, Oct 26 2009, 07:36:50) [MSC v.1500 64 bit (AMD64)] on win32
    >>>
    FBTime(241707560200)
    FBTime(326382183200)
    FBTime(4618615800)
    795
    154
    215
    Traceback (most recent call last):
    File “C:/Program Files/Autodesk/MotionBuilder 2012/bin/config/Scripts/StayOnFloor_2012.py”, line 254, in ButtonActionEvent
    ProcessFCurve(node.FCurve, currTime, startTime, stopTime, blendTime)
    File “C:/Program Files/Autodesk/MotionBuilder 2012/bin/config/Scripts/StayOnFloor_2012.py”, line 217, in ProcessFCurve
    curve.KeyRemove(i)
    AttributeError: ‘FBFCurve’ object has no attribute ‘KeyRemove’
    >>>

  • Saturday September 1st, 2012 at 12:32 AM
    Permalink

    Hi Marcin,

    thank you for testing. My script was written in MoBu 2010. In new versions like 2012, 2013 there are some declaration difference moments, which cause errors on execution. So I have uploaded scripts for each MoBu version.

  • Saturday September 1st, 2012 at 02:40 PM
    Permalink

    You are THE MAN!!! It works perfectly, very useful tool. Thank you :)

  • Tuesday September 25th, 2012 at 02:42 PM
    Permalink

    Great work dude, amazing as ever!

  • Tuesday September 25th, 2012 at 02:53 PM
    Permalink

    Thank you Warren )

  • Thursday June 6th, 2013 at 05:42 PM
    Permalink

    На 11 билдере работает ?)

  • Thursday June 6th, 2013 at 05:54 PM
    Permalink

    новая ревизия скрипта под 2013 и выше, если нужно для 2011, оставляйте пожелание и сделаю )

  • Monday June 10th, 2013 at 06:23 AM
    Permalink

    Нужен для 11 )) очень )

  • Friday June 14th, 2013 at 09:06 AM
    Permalink

    Хорошо, при первой же свободной минутке, закину версию для 11го МоБи.

  • Friday June 14th, 2013 at 09:49 AM
    Permalink

    Thank’s :DD

  • Monday December 9th, 2013 at 09:07 AM
    Permalink

    This script sounds like the exact thing I’m looking for…will it work in mobu 2014?

  • Thursday December 12th, 2013 at 09:27 AM
    Permalink

    Hi Brent, yes it should work in 2014.

  • Sunday July 27th, 2014 at 02:03 PM
    Permalink

    Hello, thanks for your script.

    Could you please re-uploaded the version for MoBu 2012?
    The 2013 version has an issue with the assign start/end frame button on MoBu 2012. For example, when I set frame 45, the tool set it to frame 15. And when I set the frame manually, it goes back to frame zero.

  • Sunday July 27th, 2014 at 02:10 PM
    Permalink

    Hi Michel,

    thanks for the feedback, I will have a look at these issues… hope soon.

  • Friday October 3rd, 2014 at 10:12 PM
    Permalink

    This script works wonderfully and helped me write a bunch of other useful scripts that I needed. Thank you so much for making it generally available!

    As a side note: I am using an older version (MoBu 2011) and I had to make the following changes before your script could work. I wanted to share in case it helps others:

    1. I needed to add the path to pyfbsdk_additions.py to sys.path, e.g. for me this is sys.path.append(‘C:\\Users\\alinen\\AppData\\Local\\Autodesk\\MB2011\\config\\Python’)

    2. I needed to change GetFrame() to GetFrame(True). Otherwise, I had a problem like Michel’s above, where the frame was not set correctly

    3. I had to change the call from FBCreateUniqueTool to CreateUniqueTool

    Thanks again, your scripts and resources are a great help,

    alinen

  • Monday October 6th, 2014 at 10:29 AM
    Permalink

    Hi Alinen,

    thank you for your notes.

  • Saturday January 10th, 2015 at 01:43 PM
    Permalink

    This seems very interesting ! there is download text but I cant see the links to download. I am using Motion builder 2014, 64x.

  • Tuesday July 26th, 2016 at 05:31 PM
    Permalink

    I don’t suppose there’s an update for this for MB 2017?

    Looks like it would do exactly what I am looking for right now but the script won’t execute. I can only guess it’s out of date?

Leave a Reply

Your email address will not be published. Required fields are marked *