Python plugin in costum C4D-Layout
-
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 -
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
forinfo
, is that intentional? The usual flags for aCommandData
plugin would be0
orPLUGINFLAG_SMALLNODE
. I never usedPLUGINFLAG_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 -
@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