Bug getting selected keys from F-Curve Timeline



  • On 03/05/2018 at 21:00, xxxxxxxx wrote:

    I'm writing a python script that does some custom easing on the user selected keyframes and I've got everything up and working, but it only works consistently with keyframes selected in the Dope Sheet. If I then unselect some or select more in the F-Curve Timeline the script doesn't see them till I switch back and forth between the modes.

    I'm using GetNBit() to check for NBIT_TL1_FCSELECT, 2, 3, 4 and NBIT_TL1_SELECT, 2, 3, 4.

    Is this a known bug with the SDK, or am I approaching this task wrong?



  • On 04/05/2018 at 04:44, xxxxxxxx wrote:

    Hi,

    To check the selection state of keyframes in the F-Curve Timeline use NBIT_TL1_SELECT2 to NBIT_TL4_SELECT2. These are marked as private but it is safe to read these NBIT states.
    Note you must not change their values. Please read this post.



  • On 04/05/2018 at 10:34, xxxxxxxx wrote:

    Ah! Thank you so much Yannick!



  • On 04/05/2018 at 18:12, xxxxxxxx wrote:

    After implementing and testing with those NBit values, I still have bugginess when selecting keyframes in both timelines. It works 90% of the time, but every once in awhile it will preform my script on the previous selection and not the current selection. Any ideas why? Is there a way to tell C4D to double check the selection before running my routines on them?



  • On 07/05/2018 at 07:18, xxxxxxxx wrote:

    Hi,

    Have you been able to spot the case(s) when the selection is not up-to-date?
    What's the current mode, Dope Sheet or F-Curve? Are you changing the selection or just reading its state?



  • On 07/05/2018 at 12:26, xxxxxxxx wrote:

    Sorry Yannick, it was user error! Geek

    I didn't realize Shift+F3 brought up timeline1 and Shift+Alt+F3 brought up timeline2. I thought Shift+Alt+F3 just brought up timeline1 in F-Curve mode.

    NBIT_TL1_SELECT2 works like a charm.



  • On 08/05/2018 at 10:04, xxxxxxxx wrote:

    Hehe you're welcome 🙂
    Remember several Timeline dialogs can be open by the user so make sure to check the corresponding NBIT_TLX_SELECT2 for the 4 Timeline windows.


Log in to reply