Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 87158

Re: Re: Select Next Keyframe (in selected property) script

$
0
0

Yup, you're right! Marked as answered!

 

That last one is not working though, or it is, but what I meant is for it to select the next key And jump he CTI. I tried combining the last two versions but: Result: undefined.

 

$.global.script_doSelectNextKeys || (script_doSelectNextKeys = function script_doSelectNextKeys(){   

    var comp = app.project.activeItem, props, n, p, idx, max=-Infinity;   

    if (comp instanceof CompItem){   

        props = comp.selectedProperties;   

        for (n=0; n<props.length; n++){   

            p = props[n]; 

            if (p.numKeys && p.selectedKeys.length>0) max=Math.max(max, p.keyTime(p.selectedKeys[p.selectedKeys.length-1]));  

            idx = p.selectedKeys[p.selectedKeys.length-1];     //(*)  

            p.selected = false;     //(*)    

            p.setSelectedAtKey(Math.min(idx+1, p.numKeys), true);     //(*)      

            };

         if (-Infinity<max) comp.time = max; 

        };    

    return;   

    });   

script_doSelectNextKeys();


Viewing all articles
Browse latest Browse all 87158

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>