Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Bug getting selected keys from F-Curve Timeline

    PYTHON Development
    0
    7
    1.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

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

          Ah! Thank you so much Yannick!

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            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?

            1 Reply Last reply Reply Quote 0
            • H
              Helper
              last edited by

              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?

              1 Reply Last reply Reply Quote 0
              • H
                Helper
                last edited by

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

                Sorry Yannick, it was user error! !Geek[URL-REMOVED]

                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.


                [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

                1 Reply Last reply Reply Quote 0
                • H
                  Helper
                  last edited by

                  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.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post