Script shortcut

  • 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...

  • 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).


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


    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.

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

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

Log in to reply