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

    Python plugin in costum C4D-Layout

    Cinema 4D SDK
    2024 python windows
    2
    3
    519
    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.
    • M
      MMayrh
      last edited by ferdinand

      Sorry for the basic question -
      Like the title says - I am trying to add my plugin to my costum c4d Layout but when I try to do it the plugin doesnt show. It is added but simply not visible (I know this because if an loading error occurs the place it should have been says: "Plugin not found"). In the extensions tab of cinema its shown as expected with icon and title.

      I guess I am missing something basic. Anyone who can help?

      The Plugin is registered as follows:

      c4d.plugins.RegisterCommandPlugin(id=PLUGIN_ID, str=plugin_name, icon = get_icon(), 
                                        info = c4d.PLUGINFLAG_COMMAND_ICONGADGET, help=helptext, 
                                        dat = MyCommandData())
      

      Thanks in advance,
      Marc

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand @MMayrh
        last edited by ferdinand

        Hello @MMayrh,

        Welcome to the Plugin Café forum and the Cinema 4D development community, it is great to have you with us!

        Getting Started

        Before creating your next postings, we would recommend making yourself accustomed with our forum and support procedures. You did not do anything wrong, we point all new users to these rules.

        • Forum Overview: Provides a broad overview of the fundamental structure and rules of this forum, such as the purpose of the different sub-forums or the fact that we will ban users who engage in hate speech or harassment.
        • Support Procedures: Provides a more in detail overview of how we provide technical support for APIs here. This topic will tell you how to ask good questions and limits of our technical support.
        • Forum Features: Provides an overview of the technical features of this forum, such as Markdown markup or file uploads.

        It is strongly recommended to read the first two topics carefully, especially the section Support Procedures: Asking Questions.

        About your First Question

        It is hard to answer your question with just such a fragment of code. You should post executable code when you need more help. I have also fenced in your code with code markup.

        But it is a bit odd that you pass PLUGINFLAG_COMMAND_ICONGADGET for info, is that intentional? The usual flags for a CommandData plugin would be 0 or PLUGINFLAG_SMALLNODE. I never used PLUGINFLAG_COMMAND_ICONGADGET myself before, but the description implies that you must draw things yourself in the palette which would explain why you cannot see anything.

        Cheers,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

        1 Reply Last reply Reply Quote 1
        • M
          MMayrh
          last edited by

          @ferdinand thank you for your welcoming words, for your help and edits.

          Since I am no trained developer I was simply copy and pasting my first lines of code including the RegisterCommand function from the maxon python example github and thought it would fit my application since I thought the description in the sdk seemedlike a match to me ["Command can be dragged into an icon bar and delivers its own dialogs instead of icons." (- maybe I got that wrong)]. Also scince I have little developing experience the term "smallnode" is nothing I can make sense of and an accurate description seems to be missing.

          Nevertheless I tried your suggestion and it works like a charm.

          Thanks a lot 🙌
          Marc

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