Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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

    Script shortcut

    SDK Help
    0
    4
    332
    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 19/12/2013 at 08:36, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   14 
      Platform:   Windows  ;   
      Language(s) :   C.O.F.F.E.E  ;    PYTHON  ;

      ---------
      If I have a script with multiple shortcuts assigned to it, how can I determine, which shortcut was pressed?

      It seems that GetInputState is not available in script code...

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

        On 19/12/2013 at 13:30, xxxxxxxx wrote:

        Hi balabuev,

        Reading out the shortcut that was used to invoke a command is not possible. Are you sure you need this
        sort of functionality? Altering the behavior of the command depending on the shortcut that was used to
        execute it is inconsistent with Cinema 4D (and restricts the user unless you provide a separate place for
        the user to define which shortcut invokes which behavior).

        Best,
        -Niklas

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

          On 19/12/2013 at 20:50, xxxxxxxx wrote:

          Hi,

          I've created simple scripts, which saves editor camera positions, and allows to return to them quickly. So, this is actually a Viewport Bookmarks.

          Works like in Delphi:

          Ctrl+Shift+1 (2, 3, 4, 5, ...) - set bookmark
          Ctrl+1 (2, 3, 4, 5, ...) - goto bookmark

          Now they are all separate scripts (similar to each other). I just wanted to combine all them to a single script for convenency.

          I understand the inconsistency with basic "command" notion, but here it will be adequate. And moreover, some built-in commands, like Pan and Zoom actually works the same, e.g. having several shortcuts with tricky differences in behavior depending of it.

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

            On 20/12/2013 at 01:39, xxxxxxxx wrote:

            Basically, I've soolved the problem using Python, where c4d.GetInputState() function is available.

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