Announcement

Collapse
No announcement yet.

[Script] Mixamo Download Script

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • started a topic [TOOL] [Script] Mixamo Download Script

    [Script] Mixamo Download Script

    I already posted a version of the script some time ago, but the changes to the page totally broke it, as could be expected, so here's an updated version.
    The script is meant to download all of Mixamo's animations to disk, for you to be able to have a backup or easy batch access.

    It supports all basic variants - i.e. inplace and mirrored (but not sliders).
    The instructions are within the first comment lines of the code, but I'll repost them here as well:

    INSTRUCTIONS:
    1. Set your browser NOT to ask where to save files on each download (else you will be bombarded with "Save As" prompts!)
    2. Navigate to this URL
    3. For best results, set on-page thumbnails to "small" and "non-animated" (click the little gear icon)
    4. Set to display 96 items per page (you can also enter 100 in the url, but it makes not much of a difference)
    5. IMPORTANT: Before you run the script, make sure to manually download one sample animation - the page will remember your settings (if you don't do this, it will use defaults, i.e. it will download the character with each anim)
    6. Set one (and only 1) of the first 6 variables to TRUE, in order to select the variant you want to download (regular, in place, root) by default it will download only the regular version (without inplace option).
    7. Open the browser console (Shift+Ctrl+J in Chrome) and paste the entirety of the code
    8. Hit Enter and wait for it to finish (can take some time)

    NOTE: the script skips all of mixamos animation "packs", as those are duplicates (their content is available as seperate animations), but mostly because it messed up point no. 5

    It is RECOMMENDED to use the variables below in the following WORKFLOW:
    (1) set the first variable (Setup_DownloadAllExceptInPlace) to true (edit: it's set by default now),
    (2) run the script, (3) move all downloaded animations to folder named "\regular",
    (4) set the first variable back to false and the second to true,
    (5) run the script again (make sure to open in a fresh tab and don't forget to repeat 5.),
    (6) move all downloaded animations to folder named "\inplace",
    (7) repeat for 3rd variable to have the entire set, or all 6 to have also a mirrored version.

    You should end up with 2061 regular animations and 384 in root and inplace each.

    TROUBLESHOOTING
    With slower connections it is possible that your download queue will start to choke and leave downloads unfinished.
    If that happens, reduce the per page amount of animations from 96 to 24, or manually enter 10 in the URL (like this) - on each page turn the script waits for a couple of seconds to help with the above.

    For offline browsing purposes, here's a download link with all thumbnails:
    MixamoThumbnails.7z (523.28 MB)
    (I've been made aware that the host uses pesky popup ads and such, keep that in mind or use an adblocker or better yet, a download manager, I highly recommend JDownloader2).

    HINT: You can export the Mannequin to FBX and upload it to Mixamo as your default character in order to have the animations in UE4 format.
    See this thread for more information if you encounter problems in that regard.

    Have fun!

    Code:
    /*
    INSTRUCTIONS:
    1. Set your browser NOT to ask where to save files on each download (else you will be bombarded with "Save As" prompts!)
    2. Navigate to https://www.mixamo.com/#/?page=1&type=Motion%2CMotionPack&limit=96
    3. For best results, set on-page  thumbnails to "small" and "non-animated" (click the little gear icon)
    4. Set to display 96 items per page (you can also enter 100 in the url, but it makes not much of a difference)
    5. IMPORTANT: Before you run the script, make sure to manually download one sample animation - the page will remember your settings (if you don't do this, it will use defaults, i.e. it will download the character with each anim)
    6. Set one (and only 1) of the first 6 variables to TRUE, in order to select the variant you want to download (regular, in place, root) by default it will download only the regular version (without inplace option).
    7. Open the browser console (Shift+Ctrl+J in Chrome) and paste the entirety of the code
    8. Hit Enter and wait for it to finish (can take some time)
    
    NOTE: the script skips all of mixamos animation "packs", as those are duplicates (their content is available as seperate animations), but mostly because it messed up point no. 5
    
    It is RECOMMENDED to use the variables below in the following WORKFLOW:
    (1) set the first variable (Setup_DownloadAllExceptInPlace) from false to true,
    (2) run the script, (3) move all downloaded animations to folder named "\regular",
    (4) set the first variable back to false and the second to true,
    (5) run the script again (make sure to open in a fresh tab and don't forget to repeat 5.),
    (6) move all downloaded animations to folder named "\inplace",
    (7) repeat for 3rd variable to have the entire set, or all 6 to have also a mirrored version.
    
    You should end up with 2061 regular animations and 384 in root and inplace each.
    
    TROUBLESHOOTING
    With slower connections it is possible that your download queue will start to choke and leave downloads unfinished.
    If that happens, reduce the per page amount of animations from 96 to 24, or manually enter 10 in the URL (like this) - on each page turn the script waits for a couple of seconds to help with the above.
    
    For offline browsing purposes, here's a download with all thumbnail:
    Here are the Thumbnails:
    MixamoThumbnails.7z (523.28 MB)
    (I've been made aware that the host uses pesky popup ads and such, keep that in mind or use an adblocker or better yet, a download manager, I highly recommend JDownloader2).
    
    Have fun!
    */
    
    /* these variables are there to allow running the script in multiple passes so the animations can then be grouped manually into organized folders */
    var Setup_DownloadAllExceptInPlace                = false;    // example folder:         \regular
    var Setup_DownloadOnlyInPlace                    = false;    // example folder:         \inplace
    var Setup_DownloadOnlyRoot                        = false;    // example folder:         \root
    
    var Setup_DownloadOnlyInPlace_Mirrored            = false;    // example folder:         \mirrored\inplace
    var Setup_DownloadAllExceptInPlace_Mirrored        = false;    // example folder:         \mirrored\regular
    var Setup_DownloadOnlyRoot_Mirrored                = false;    // example folder:         \mirrored\root
    
    
    /* Debug Settings */
    
    var debugVerbose                        = true;      // write messages to console
    var debugMaxIndex                         = 0;        // will stop after x anims, 0 = unlimited
    var debugStopAfterPage                = 999;
    var debugNoPageTurn                   = false;     // will finish on current page    
    var setupGlobalTimeOffset              = 0;           // all timers will be increased by x (increase if script has to retry often)
    var setupTimeModifier                  = 1;          // all timers will multiply by x (increase if script has to retry often)
    var setupDefaultDelay                  = 500;         // default time step when adding anims to assets (increase when encountering problems)
    var setupPlaySounds                 = true;      // play sound notifications
    var setupBeepOnAdd                  = false;     // notification when an animation has been added to assets
    var setupBeepOnPage                 = true;      // notification when changing page
    var TimeToReloadPage                 = 10000;
    
    /* Do NOT change values below unless you know what you are doing - internal vars and setup constants*/
    
    var    pageURL                         = "https://www.mixamo.com/#/?type=Motion%2CMotionPack"; // base url without page and limit data
    var setupElementID_Products         = "product";
    var setupElementID_Download          = "btn-block btn btn-primary";
    var setupElementID_DownloadConfirm     = "btn btn-primary";
    var setupElementID_InPlace          = "inplace";
    var setupElementID_Mirror           = "mirror";
    var setupElementID_Products         = "product";
    var setupElementID_Pagination       = ".pagination li:nth-last-child(2) a";
    var setupElementID_DownloadCaption = "Download";
    var DownloadPending_Regular         = downloadRegularVariant;
    var DownloadPending_Mirror            = downloadMirrorVariant;
    var DownloadPending_InPlace            = downloadInPlaceVariant;
    var DownloadPending_InPlaceMirror    = downloadInPlaceMirrorVariant;
    var timeEnd = 0, timeStart = 0;
    var scriptPaused                      = true;
    var index                           = -1;
    var debugFailedStart                  = 0;
    var pageNum                           = geUrlPageNum();
    var itemsPerPage                       = geUrlLimit();
    var NumOfFilesProcessed              = 0;
    var buttonClicked                     = 0;
    var retryCounter                     = 0;
    var    button                          = document.querySelector( "setupElementID_AddToAssets" );
    var items                           = document.getElementsByClassName( setupElementID_Products );
    
    var    pageMax                                 = 1;        // limit pages
    var downloadRegularVariant                     = true;     // no checkboxes set, regular version, i.e. root or default
    var download_RootExclude                     = false;     // affects "downloadRegularVariant" only, ignores anims with "in place" option
    var download_RootExclussive                 = false;     // affects "downloadRegularVariant" only, ignores anims without "in place" option
    var download_RootMirrored                     = false;     // affects "downloadRegularVariant" only, forces mirror, meant to be used with "download_RootExclu[de|ssive]"
    var downloadMirrorVariant                     = true;        // will check only "mirror" and download a separate version
    var downloadInPlaceVariant                     = true;        // set In Place to true
    var downloadInPlaceMirrorVariant             = true;        // In Place and mirrored to true
    
    function DownloadAllExceptInPlace(){
        //A. downloadRegularVariant + download_RootExclude     // download all animations that have no INPLACE checkbox         \regular
        downloadRegularVariant                     = true;
        download_RootExclude                     = true;
        download_RootExclussive                 = false;
        download_RootMirrored                     = false;
        downloadMirrorVariant                     = false;
        downloadInPlaceVariant                     = false;
        downloadInPlaceMirrorVariant             = false;
    }    
    
    function DownloadAllExceptInPlace_Mirrored(){
        //B. A. + download_RootMirrored                        // downloads A., but mirrored                                     \regular_mirrored
        downloadRegularVariant                     = true;
        download_RootExclude                     = true;
        download_RootExclussive                 = false;
        download_RootMirrored                     = true;
        downloadMirrorVariant                     = false;
        downloadInPlaceVariant                     = false;
        downloadInPlaceMirrorVariant             = false;
    }    
    
    function DownloadOnlyInPlace(){
        //C. downloadInPlaceVariant                             // all anims w/ a INPLACE checkbox (set true)                     \inplace
        downloadRegularVariant                     = false;
        download_RootExclude                     = false;
        download_RootExclussive                 = false;
        download_RootMirrored                     = false;
        downloadMirrorVariant                     = false;
        downloadInPlaceVariant                     = true;
        downloadInPlaceMirrorVariant             = false;
    }
    
    function DownloadOnlyInPlace_Mirrored(){
        // D. downloadInPlaceMirrorVariant                        // same as C., but morrored                                        \inplace_mirrored
        downloadRegularVariant                     = false;
        download_RootExclude                     = false;
        download_RootExclussive                 = false;
        download_RootMirrored                     = false;
        downloadMirrorVariant                     = false;
        downloadInPlaceVariant                     = false;
        downloadInPlaceMirrorVariant             = true;
    }
    
    function DownloadOnlyRoot(){
        //E. downloadRegularVariant + download_RootExclussive // download only anims with INPLACE checkbox (left to false)    \root
        downloadRegularVariant                     = true;
        download_RootExclude                     = false;
        download_RootExclussive                 = true;
        download_RootMirrored                     = false;
        downloadMirrorVariant                     = false;
        downloadInPlaceVariant                     = false;
        downloadInPlaceMirrorVariant             = false;
    }
    
    function DownloadOnlyRoot_Mirrored(){
        //F. E. + download_RootMirrored   // E. mirrored                        \root_mirrored
        downloadRegularVariant                     = true;
        download_RootExclude                     = false;
        download_RootExclussive                 = true;
        download_RootMirrored                     = true;
        downloadMirrorVariant                     = false;
        downloadInPlaceVariant                     = false;
        downloadInPlaceMirrorVariant             = false;
    }
    
    function geUrlLimit(){
        var result = getUrlVars()["limit"];
        if (result && debugVerbose) console.log(result);
        else {
            if (debugVerbose) console.log("[DEBUG] geUrlLimit :: param LIMIT not found.");
            result = "96";
        }    
        return result;
    }    
    
    function isAnimPack(){
        var str = getAnimName();
        str = str.toLowerCase();
        var n = str.search(" pack");
        return ( n > -1 );
    }    
    
    var DownloadPending_Any = true;
    function incIndex(){
        if (debugVerbose) console.log("[DEBUG] incIndex :: Start; index:",index);
        ++index;                
        ++NumOfFilesProcessed;
        buttonClicked = 0;
    
        DownloadPending_Regular         = downloadRegularVariant;
        DownloadPending_Mirror            = downloadMirrorVariant;
        DownloadPending_InPlace            = downloadInPlaceVariant;
        DownloadPending_InPlaceMirror    = downloadInPlaceMirrorVariant;
        DownloadPending_Any                = true;
    
        if (debugVerbose) console.log("[DEBUG] incIndex :: End; index:",index);
    
        if (onProcessElement())
            setTimeout(processElement, 2000 );
    }
    
    function getUrlVars() {
        var vars = {};
        var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,    
        function(m,key,value) {
            vars[key] = value;
        });
        return vars;
    }
    
    function geUrlPageNum(){
        var result = getUrlVars()["page"];
        if (result && debugVerbose) console.log(result);
        else {
            if (debugVerbose) console.log("[DEBUG]param PAGE not found.");
            result = 1;
        }    
        return result;
    }    
    
    function timeMod( time1 ){
        var baseTime = time1 * setupDefaultDelay;
        var t = ((baseTime)*setupTimeModifier) + setupGlobalTimeOffset;
        if (t < baseTime*0.1) t = baseTime*0.1;
        if (t > baseTime*10) t = baseTime*10;
        return t;    
    }
    
    function reloadPage() {
        if (debugVerbose) console.log("[DEBUG] reloadPage :: Start; index:",index);
        scriptPaused = true;
    
        if (pageNum >= debugStopAfterPage) {
            return;
        }    
    
    
        var newUrl = "";
        newUrl = pageURL + "&limit=" + itemsPerPage + "&page=" + pageNum.toString();
    
        if (debugVerbose) console.log("[DEBUG] reloadPage :: ",newUrl);
        document.location.href = newUrl;
    
        setTimeout( mixamoScript, 2000 );
    }
    
    function onFinish(){
    /*
        timeEnd = Date.now();
        scriptPaused = true;
        if (debugVerbose) console.log("[DEBUG]MixamoScript: Added (", numAssetsAdded, ")" );
    
        if (setupBeepOnFinish) {
            soundOnFinish();    
            setTimeout(promptOnEnd, 2000);
        } else setTimeout(promptOnEnd, 0);
    */    
    }
    
    if (!audioCtx) var audioCtx = new (window.AudioContext || window.webkitAudioContext || window.audioContext);
    function beep(duration, frequency, volume, type, callback) {
        if (!setupPlaySounds)  return;
    
        var oscillator = audioCtx.createOscillator();
        var gainNode = audioCtx.createGain();
    
        oscillator.connect(gainNode);
        gainNode.connect(audioCtx.destination);
    
        if (volume){gainNode.gain.value = volume;};
        if (frequency){oscillator.frequency.value = frequency;}
        if (type){oscillator.type = type;}
        if (callback){oscillator.onended = callback;}
    
        oscillator.start();
        setTimeout(function(){oscillator.stop()}, (duration ? duration : 500));
    }
    
    function soundOnPageEnd(){
    
        setTimeout(function(){ beep(500, 500, 0.060, "triangle") }, 0);
        setTimeout(function(){ beep(500, 550, 0.035, "triangle") }, 600);
        setTimeout(function(){ beep(500, 600, 0.020, "triangle") }, 1200);
        setTimeout(function(){ beep(500, 650, 0.005, "triangle") }, 1800);
    }
    
    function beepOnAdd(){
        if (debugVerbose) console.log("[DEBUG] beepOnAdd :: Start; index:",index);
        beep(225, 200, 0.3, "triangle");
    }    
    
    
    /**/
    function printToLogCurrItems(){
    
    }
    
    function onEndOfPage() {
        if (debugVerbose) console.log("[DEBUG] onEndOfPage :: Start; index:",index);
        scriptPaused = true;
    
        var t = 0;
        if (setupBeepOnPage) {
            t = 1000;
            setTimeout(soundOnPageEnd, 0);        
        }    
    
        //printToLogCurrItems();
        if (pageNum >= debugStopAfterPage) {
            setTimeout( onFinish, 2000 );
            if (debugVerbose) console.log("[DEBUG] onEndOfPage_Assets :: Start; pageNum:",pageNum,"; debugStopAfterPage:",debugStopAfterPage);
            return;
        } else {
            if (!debugNoPageTurn) {
                index = 0;
                ++pageNum;
                setTimeout(reloadPage, TimeToReloadPage);
            }
        }        
    
    }
    
    function isDownloadInProgress(){
        var elements = document.getElementsByClassName( "progress-bar" );
        if (elements && elements.length>0)
        {
            console.log("[DEBUG] Download In Progress");
            return true;
        } else {
            console.log("[DEBUG] Download Not In Progress");
            return false;
        }    
    }
    
    function onProcessElement() {
        if (debugVerbose) console.log("[DEBUG] onProcessElement :: start; index:",index);
    
        if (!items || items.length == 0) {
            if (debugVerbose) console.log("[DEBUG] onProcessElement :: items; index:",index);
            items = document.getElementsByClassName( setupElementID_Products );
        }    
        if (!button) {
            if (debugVerbose) console.log("[DEBUG] onProcessElement :: button; index:",index);
            //button = document.querySelector( setupElementID_AddToAssets );        
            var buttons = document.getElementsByClassName( setupElementID_Download );
            if (buttons && buttons.length>0)
                button = buttons[0];
        }    
        if (items.length != 0) {
            // Next Page
            if(index >= items.length) {
                // end of page
                onEndOfPage();
                return true;
            }
            items[index].click();    
    
            if (debugVerbose) console.log("[DEBUG] onProcessElement :: Clicked");
            return true;
        }
    
        return false;
    }
    
    function getAnimName(){
        if (debugVerbose) console.log("[DEBUG] getAnimName :: Start; index:",index);
        var element = document.getElementsByClassName( "text-center h5" );
        if (element && element.length>0) {
            if (debugVerbose) console.log("[DEBUG] getAnimName :: name:",element[0].textContent,"; Start; index:",index);
            return element[0].textContent;
        }    
        if (debugVerbose) console.log("[DEBUG] getAnimName :: Failed; Start; index:",index);
        return "[]";
    }
    
    function confirmDownload(){
        if (debugVerbose) console.log("[DEBUG] confirmDownload :: start; index:",index);
        var buttons = document.getElementsByClassName( setupElementID_DownloadConfirm );
        if (buttons && buttons.length>1)    {
            buttons[1].click();
    
            if (debugVerbose) console.log("[DEBUG] confirmDownload :: Button Clicked");
    
            setTimeout( processElementEx, 1000 );
        } else if (debugVerbose) console.log("[DEBUG] confirmDownload :: Button Not Found");
    }
    
    function initAnimDownload() {
        if (debugVerbose) console.log("[DEBUG] initAnimDownload :: Start; Index:",index);
    
        var currAnim = getAnimName();
        if (debugVerbose) console.log("[DEBUG] initAnimDownload :: Anim: ",currAnim,"; index:",index);
    
        // main button is ready to add asset)
        if (button.textContent == setupElementID_DownloadCaption) {
            if (buttonClicked == 0) {
                button.click();            
    
                //++buttonClicked;
                //++numAssetsAddedCurrPage;
                if (setupBeepOnAdd) beepOnAdd();            
    
                setTimeout( confirmDownload, 1000);
    
                if (debugVerbose) console.log("[DEBUG] initAnimDownload :: Added To Assets; buttonClicked:",buttonClicked);
                return true;
            }
        } else { // main button caption is something unexpected
            if (debugVerbose) console.log("[DEBUG] initAnimDownload :: button.textContent:",button.textContent);        
            return false;
    
        }
        if (debugVerbose) console.log("[DEBUG] initAnimDownload :: end");
    }
    
    function checkElement(elementName, desiredState) {
        var element = document.getElementsByName(elementName);
        if (element.length != 0) {
            if (element[0].checked != desiredState) {
                if (debugVerbose) console.log("[DEBUG] checkElement :: Clicked; previous state:",element[0].checked,"; elementName:",elementName,"; desiredState:",desiredState);
                element[0].click();
            } else if (debugVerbose) console.log("[DEBUG] checkElement :: Element already has desired state; elementName:",elementName,"; desiredState:",desiredState);
    
            return true;
        }
        if (debugVerbose) console.log("[DEBUG] checkElement :: Element not found; elementName:",elementName,"; desiredState:",desiredState);
    
        return false;
    }        
    
    function isElementChecked(elementName, desiredState) {
        var element = document.getElementsByName(elementName);
        if (element.length != 0) {
            if (debugVerbose) console.log("[DEBUG] isElementChecked :: elementName: ",elementName,"; desiredState: ",desiredState,"; current state:",element[0].checked,"; items found: ",element.length);
            if (element[0].checked != desiredState) {
                if (debugVerbose) console.log("[DEBUG] isElementChecked :: return: 0");
                return 0;
            } else {
                if (debugVerbose) console.log("[DEBUG] isElementChecked :: return: 1");
                return 1;
            }    
        }
        if (debugVerbose) console.log("[DEBUG] isElementChecked :: Element not found; elementName:",elementName,"; desiredState:",desiredState);
        return -1;
    }
    
    var waitingForDownloadToComplete = false;
    function processElement() {    
        if (debugVerbose) console.log("[DEBUG] processElement :: start; index:",index);
    
        if (isDownloadInProgress()) {
        // give page time to prepare current download
            waitingForDownloadToComplete = true;
            setTimeout(processElement, 500 );
            return;
        }
    
        if (waitingForDownloadToComplete === true){
        // some extra time to complete downloading
            waitingForDownloadToComplete = false;
            setTimeout(processElement, 1000 );
            return;    
        }
    
        if (debugMaxIndex > 0 && NumOfFilesProcessed >= debugMaxIndex) {
            if (debugVerbose) console.log("[DEBUG] processElement :: debugMaxIndex:",debugMaxIndex,"; onFinish");
            onFinish();
            return;
        }        
    
        if ( scriptPaused ) return;
    
        retryCounter = 0;
    
        setTimeout(processElementEx, timeMod( 1 ));
    
        if (debugVerbose) console.log("[DEBUG] processElement :: End");
    }
    
    function processElementEx(){
        if (debugVerbose) {
            console.log("[DEBUG] processElementEx :: DownloadPending_Regular: ",DownloadPending_Regular);
            console.log("[DEBUG] processElementEx :: DownloadPending_Mirror: ",DownloadPending_Mirror);
            console.log("[DEBUG] processElementEx :: DownloadPending_InPlace: ",DownloadPending_InPlace);
            console.log("[DEBUG] processElementEx :: DownloadPending_InPlaceMirror: ",DownloadPending_InPlaceMirror);
        }    
    
        if (!isAnimPack())    {
            // download variants
            if (DownloadPending_Regular) {        
                if (initAnimDownload_Regular() ) {
                    setTimeout(initAnimDownload, timeMod( 2 ) );                
                    if (debugVerbose) console.log("[DEBUG] processElementEx :: call initAnimDownload");
                } else {
                    setTimeout(processElementEx, timeMod( 1 ) );            
                    if (debugVerbose) console.log("[DEBUG] processElementEx :: call processElementEx");
                }    
                DownloadPending_Regular = false;
                return;
            } else if (DownloadPending_Mirror){
                setTimeout(initAnimDownload_Mirror, timeMod( 1 ) );
                if (debugVerbose) console.log("[DEBUG] processElementEx :: call initAnimDownload_Mirror");
                return;
            } else if (DownloadPending_InPlace){
                setTimeout(initAnimDownload_InPlace, timeMod( 1 ) );
                if (debugVerbose) console.log("[DEBUG] processElementEx :: call initAnimDownload_InPlace");
                return;
            } else if (DownloadPending_InPlaceMirror){
                setTimeout(initAnimDownload_InPlaceMirror, timeMod( 1 ) );
                if (debugVerbose) console.log("[DEBUG] processElementEx :: call initAnimDownload_InPlaceMirror");
                return;
            }        
        } else {
            if (debugVerbose) console.log("[DEBUG] processElementEx :: skipping Pack");
        }
    
        if (debugVerbose) {
            console.log("[DEBUG] processElementEx :: DownloadPending_Regular: ",DownloadPending_Regular);
            console.log("[DEBUG] processElementEx :: DownloadPending_Mirror: ",DownloadPending_Mirror);
            console.log("[DEBUG] processElementEx :: DownloadPending_InPlace: ",DownloadPending_InPlace);
            console.log("[DEBUG] processElementEx :: DownloadPending_InPlaceMirror: ",DownloadPending_InPlaceMirror);
        }    
    
        //DownloadPending_Any                = false;
        setTimeout(incIndex, timeMod(2) );    
    }
    
    function initAnimDownload_Regular(){
        if (debugVerbose) console.log("[DEBUG] initAnimDownload_Regular :: Start");
        r1 = isElementChecked(setupElementID_Mirror, false);
        r2 = isElementChecked(setupElementID_InPlace, false);
    
        if (debugVerbose) console.log("[DEBUG] initAnimDownload_Regular :: R1: ",r1,", R2: ",r2);
    
        if ((download_RootExclude===true && r2>-1) || (download_RootExclussive===true && r2<0)) {
            if (debugVerbose) console.log("[DEBUG] initAnimDownload_Regular :: download_RootExclude: ",download_RootExclude);
            if (debugVerbose) console.log("[DEBUG] initAnimDownload_Regular :: download_RootExclussive: ",download_RootExclussive);
            return false;
        }
        if (download_RootMirrored===true) {
            DownloadPending_Mirror = true;
            return false;
        } else {        
            return true;
        }        
    }
    
    function initAnimDownload_Mirror(){
        r1 = isElementChecked(setupElementID_Mirror, true);
        r2 = isElementChecked(setupElementID_InPlace, false);
    
        if (debugVerbose) console.log("[DEBUG] initAnimDownload_Mirror :: R1: ",r1,", R2: ",r2);
    
        if (r1 === -1) {
            // option n/a
            DownloadPending_Mirror = false;
            setTimeout(processElementEx, timeMod( 1 ) );
        } else if (r1===0 || r2===0) {
            // req options not yet not checked        
            if (r1===0) checkElement(setupElementID_Mirror, true);        
            if (r2===0) checkElement(setupElementID_InPlace, false);
            setTimeout(processElementEx, timeMod( 1 ) );
        } else {
            // req met
            setTimeout(initAnimDownload, timeMod( 2 ) );
            DownloadPending_Mirror = false;
        }
    }
    
    function initAnimDownload_InPlace(){
        r1 = isElementChecked(setupElementID_InPlace, true);
        r2 = isElementChecked(setupElementID_Mirror, false);
    
        if (debugVerbose) console.log("[DEBUG] initAnimDownload_InPlace :: R1: ",r1,", R2: ",r2);
    
        if (r1 === -1) {
            // option n/a
            DownloadPending_InPlace = false;
            setTimeout(processElementEx, timeMod( 1 ) );
        } else if (r1===0 || r2===0) {
            // req options not yet not checked
            if (r1===0) checkElement(setupElementID_InPlace, true);
            if (r2===0) checkElement(setupElementID_Mirror, false);
            setTimeout(processElementEx, timeMod( 1 ) );
        } else {
            // req met
            setTimeout(initAnimDownload, timeMod( 2 ) );
            DownloadPending_InPlace = false;
        }
    }
    
    function initAnimDownload_InPlaceMirror(){
        r1 = isElementChecked(setupElementID_InPlace, true);
        r2 = isElementChecked(setupElementID_Mirror, true);
    
        if (debugVerbose) console.log("[DEBUG] initAnimDownload_InPlaceMirror :: R1: ",r1,", R2: ",r2);
    
        if (r1 === -1 || r2 === -1) {
            // option n/a
            DownloadPending_InPlaceMirror = false;
            setTimeout(processElementEx, timeMod( 1 ) );
        } else if (r1===0 || r2===0) {
            // req options not yet not checked
            if (r1===0) checkElement(setupElementID_InPlace, true);
            if (r2===0) checkElement(setupElementID_Mirror, true);
            setTimeout(processElementEx, timeMod( 1 ) );
        } else {
            // req met
            setTimeout(initAnimDownload, timeMod( 2 ) );
            DownloadPending_InPlaceMirror = false;
        }
    }
    
    function mixamoScript(){
        timeStart = Date.now();
    
        if (debugVerbose) console.log("[DEBUG] mixamoScript :: Start; index:",index);
        var pagination = document.querySelector(setupElementID_Pagination);
        if (pagination) pageMax       = parseInt(pagination.textContent, 10);
        else pageMax       = 1;
    
        scriptPaused       = false;
        items  = document.getElementsByClassName( setupElementID_Products );
    
        index                         = -1;
    
        // get products or retry later
        if (items.length == 0) {
            ++debugFailedStart;
            if (debugFailedStart > 2) {
                reloadPage();
                return;
            }    
            setTimeout(mixamoScript, 2000 );
            return;
        }
        debugFailedStart = 0;
    
        // process first element    
        incIndex();
        //processElement();    
    }    
    
    if (Setup_DownloadAllExceptInPlace===true)                     DownloadAllExceptInPlace();
    else if (Setup_DownloadAllExceptInPlace_Mirrored===true)     DownloadAllExceptInPlace_Mirrored();
    else if (Setup_DownloadOnlyInPlace===true)                     DownloadOnlyInPlace();
    else if (Setup_DownloadOnlyInPlace_Mirrored===true)         DownloadOnlyInPlace_Mirrored();
    else if (Setup_DownloadOnlyRoot===true)                     DownloadOnlyRoot();
    else if (Setup_DownloadOnlyRoot_Mirrored===true)             DownloadOnlyRoot_Mirrored();
    
    mixamoScript();
    Last edited by Cpt.Trips; 10-26-2017, 09:51 PM.

  • replied
    Thanks! Is there a general problem with Mixamo now, I cant seem to get even their own characters working in UE4? - this is what I get for the Brute idle animation:

    Click image for larger version

Name:	Bruteidle.png
Views:	2
Size:	218.3 KB
ID:	1598078


    Meanwhile - running this script - in Chrome - stops after a few downloads - also the animation are duplicated... ?
    This ends with the following - messages:
    .... started started while loading
    mixamo.min.5ef2bd1c.js:29
    Expected load time: 1.1947397260273973

    mixamo.min.5ef2bd1c.js:29
    Expected play time: 18.233333333333334

    mixamo.min.5ef2bd1c.js:29
    started animation

    VM413:373
    [DEBUG] confirmDownload :: start; index: 3


    VM413:381
    [DEBUG] confirmDownload :: Button Not Found


    mixamo.min.5ef2bd1c.js:29
    End Stream


    mixamo.min.5ef2bd1c.js:1
    app:log
    • Object


    +6s


    Leave a comment:


  • replied
    Originally posted by FurrieBunnie View Post
    seems not working - downloaded the first animation in the list then stopped
    I was able to run through a couple of them, but then it stopped as well.
    I'll have to debug it, once I find some time - and see if something changed on the site.
    Last edited by Cpt.Trips; 11-29-2018, 05:58 PM.

    Leave a comment:


  • replied
    seems not working - downloaded the first animation in the list then stopped

    [DEBUG] checkElement :: Clicked; previous state: false ; elementName: mirror ; desiredState: true
    mixamo.min.6af2b519.js:29 {ProductName: "Praying", CharacterId: "130a335c-bbdb-492f-971f-8faab0616b6e", CharacterType: "skin", RetargetingPayload: "", Sequence: {…}, …}
    mixamo.min.6af2b519.js:1 app:viewer https://www.mixamo.com/api/v1/charac...ed/verold.json +1s
    mixamo.min.6af2b519.js:1 app:log CHARACTER LOADED action +21ms
    VM255:478 [DEBUG] processElementEx :: DownloadPending_Regular: false
    VM255:479 [DEBUG] processElementEx :: DownloadPending_Mirror: true
    VM255:480 [DEBUG] processElementEx :: DownloadPending_InPlace: true
    VM255:481 [DEBUG] processElementEx :: DownloadPending_InPlaceMirror: true
    VM255:362 [DEBUG] getAnimName :: Start; index: 0
    VM255:365 [DEBUG] getAnimName :: name: Praying on goblin_d_shareyko ; Start; index: 0
    VM255:498 [DEBUG] processElementEx :: call initAnimDownload_Mirror
    VM255:430 [DEBUG] isElementChecked :: elementName: mirror ; desiredState: true ; current state: true ; items found: 1
    VM255:435 [DEBUG] isElementChecked :: return: 1
    VM255:439 [DEBUG] isElementChecked :: Element not found; elementName: inplace ; desiredState: false
    VM255:548 [DEBUG] initAnimDownload_Mirror :: R1: 1 , R2: -1
    VM255:385 [DEBUG] initAnimDownload :: Start; Index: 0
    VM255:362 [DEBUG] getAnimName :: Start; index: 0
    VM255:365 [DEBUG] getAnimName :: name: Praying on goblin_d_shareyko ; Start; index: 0
    VM255:388 [DEBUG] initAnimDownload :: Anim: Praying on goblin_d_shareyko ; index: 0
    VM255:401 [DEBUG] initAnimDownload :: Added To Assets; buttonClicked: 0
    VM255:373 [DEBUG] confirmDownload :: start; index: 0
    VM255:381 [DEBUG] confirmDownload :: Button Not Found
    mixamo.min.6af2b519.js:29 End Stream
    mixamo.min.6af2b519.js:29 started started while loading
    mixamo.min.6af2b519.js:29 Expected load time: 0
    mixamo.min.6af2b519.js:29 Expected play time: 1.2
    mixamo.min.6af2b519.js:29 started animation
    mixamo.min.6af2b519.js:1 app:log Object +4s
    mixamo.min.6af2b519.js:28 Resource interpreted as Document but transferred with MIME type application/octet-stream: "https://mixamo-storage-prod.s3-us-west-2.amazonaws.com/system/tmp/export_8d84a652-c1e7-4491-989a-224372d6eddd.fbx?response-content-disposition=attachment%3B%20filename%3D%22Praying.fbx%22&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAQYKQKDRYZTBNGU7T%2F20181129%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20181129T051905Z&X-Amz-Expires=300&X-Amz-Security-Token=FQoGZXIvYXdzEFYaDLDOUgcyGJSx9gwxryK3A0ua0r7sVn0xk%2FQh7Wfwvm2AipS1qOcj5RpS8s8hCZZjolSQeooi1Ubu8H1Q8QhoRRz4Jq%2FjXO5sw6L%2Fyu%2FZmTrGI7u7wFGUxvGdDiGVqCLCJhdb7L4uxT1ZuojbdtifgfYKpibih4p%2BrU73aUVlL3HuYJYNGki4zCz5e8SoAGoZmlsXcgDRqJ0gG1RVdjh%2FrMe3zr9u0Kv48O%2Fa3Ibt0ZvN%2FMSDqPUPUgJmeyKE6iBdEZq7sDvn9buRw1K2tLZ7Zd7RilKGDJvN2N456jWqtDP%2BLHa1pal8FqMmxYqfxTMl0JN5FzCGJOYHq63aD4GPG9CUc2bnFsvXhXWy%2BWmF1b2SItpOatPF3FNPA8u3Qxwj69tQzbz%2BHGHGY9%2Bcce3onI4%2BEZnDP0keENCYRnKiJCWr%2FPsHPUufELFxuQxRiXtqEBctai0eWGfWrvn594xlJGYI%2BkW2K7QGMKAxXVpHpzOQ93RidQnv83RVxWG60PfM4HKkdq3kjdfm2z5o3S24hIUOmQnFFqp4QtCrYlrrycdLQ4bD2ydtpQQ%2Bmvo%2F9geZbN8ZN23fp69LPpqSjDKtUX29VdYlxJYopN393wU%3D&X-Amz-SignedHeaders=host&X-Amz-Signature=12c704c917832104e9a6336dc4936c499e8f21d6e3e42134b2dd2bf33aacef38".
    (anonymous) @ mixamo.min.6af2b519.js:28
    (anonymous) @ mixamo.min.6af2b519.js:29
    j @ mixamo.min.6af2b519.js:3
    fireWith @ mixamo.min.6af2b519.js:3
    f.(anonymous function) @ mixamo.min.6af2b519.js:3
    j @ mixamo.min.6af2b519.js:3
    fireWith @ mixamo.min.6af2b519.js:3
    d @ mixamo.min.6af2b519.js:4
    (anonymous) @ mixamo.min.6af2b519.js:4
    nrWrapper @ newrelic_production.js:1
    load (async)
    f @ newrelic_production.js:1
    o @ newrelic_production.js:1
    nrWrapper @ newrelic_production.js:1

    Leave a comment:


  • replied
    Originally posted by littl3_4ngel View Post
    isn't better just share a zipped archive of them?? can you do this please?
    Better yes, but also against Mixamo's terms of service.

    Leave a comment:


  • replied
    so, i f i have correctly understood with this process im hable to download all animations of mixamo without models/skin but only keyframed skeletons sequences right?
    both in place or on move versions of same animations. that'sound good but isn't better just share a zipped archive of them?? can you do this please?

    Leave a comment:


  • replied
    Yes, if you just want individual animations, use the site as usual. The script is meant to allow for an offline backup in case mixamo yet again decides to sneak in some significant changes (or worst case, discontinues the service altogether).

    Leave a comment:


  • replied
    Sorry, I can't remember it anymore. I only noticed it and then stopped the download. But after a short consideration, I came to the conclusion that it may be better to download the animations individually because I may have to change some settings. Thanks anyway!

    Leave a comment:


  • replied
    Tested it just now, for me it skips all animations with "InPlace" when I set "Setup_DownloadAllExceptInPlace = true" (Browser: Chrome).
    Can you give a name of an animation that it should but doesn't skip for you?

    Leave a comment:


  • replied
    It seems like the script is downloading all animations when I set Setup_DownloadAllExceptInPlace to true, also those which include the InPlace option but the only exception is that InPlace is disabled.

    Leave a comment:


  • replied
    Originally posted by mzprox View Post
    and maybe there are some new one, so probably i will download them again.. can't they be put in a torrent btw?
    There have been no new additions since forever. And no, no torrent as it would violate their TOS.

    Leave a comment:


  • replied
    Thanks for making this script!!
    I just mark this thread for myself for future check in. i have downloaded the animations about 6 months ago using a script. I got them, but this version seem to get them more organised.. and maybe there are some new one, so probably i will download them again.. can't they be put in a torrent btw?

    Leave a comment:


  • replied
    great, thanks a lot!

    Leave a comment:

Working...
X