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

    CommandData Hotkey

    Scheduled Pinned Locked Moved PYTHON Development
    2 Posts 0 Posters 433 Views
    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 Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 25/06/2011 at 03:37, xxxxxxxx wrote:

      Hi,

      Assigning my CommandData Plugin to a hotkey and pressing that Hotkey doesn't work.
      What did I do wrong ?

        
        def Execute(self, doc) :  
            if not self.dlg:  
                self.dlg        = QuickDocs_Dialog()  
            self.dlg.Open(c4d.DLG_TYPE_ASYNC, self.GetPluginId())  
        
            return True  
        
        
        def RestoreLayout(self, subid) :  
            if not self.dlg:  
                self.dlg        = QuickDocs_Dialog()  
            return self.dlg.Restore(self.GetPluginId(), subid)  
        
        @classmethod  
        def Register(cls) :  
            icon                    = cls.LoadIcon()  
            data    = {  
                "id":       cls.GetPluginId(),  
                "icon":     icon,  
                "str":      "QuickDocs",  
                "help":     "Lets you quickly switch between your open documents.",  
                "info":     c4d.PLUGINFLAG_COMMAND_HOTKEY,  
                "dat":      cls(),  
            }  
        
            RegisterCommandPlugin(**data)
      

      Thanks,
      Niklas

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 28/06/2011 at 11:52, xxxxxxxx wrote:

        push

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