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

    Can't add plugin name into cinema4d

    General Talk
    r21
    3
    5
    5.8k
    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.
    • Y
      Yaroslav
      last edited by Yaroslav

      Dear fellows, I'm trying to write my first plugin in c++.
      I followed instructions, and with the help of the projecttool created the plugin folders.

      I managed to create a plugin that draws a cube in viewpoirt.
      Even more, my plugin has its own logo.tif in the r21 <extensions menu> in cinema4d r21, but it has a blank space instead of a name.

      As far as I understand the name comes from the file myplugin/res/strings_en-US/c4d_strings.str

      I created this folder and c4d_strings.str file with


      STRINGTABLE
      {
      IDS_MYPLUGIN "Make Cube";
      }


      Here is my registration line in the myplugin.cpp


      RegisterCommandPlugin(1054040, GeLoadString(IDS_MYPLUGIN), 0, AutoBitmap("icon.tif"_s), "MyPlugin"_s, NewObjClear(MyPlugin));
      

      However, the name of the plugin is still missing in the extentions menu in c4d.
      What do I do wrong?

      Yaroslav.
      P.S.

      I'm newbe in c++ and had only python experience before.
      I use vs 2019

      1 Reply Last reply Reply Quote 0
      • ManuelM
        Manuel
        last edited by

        hi,

        welcome to the forum and thanks for reaching us out.

        I'm a bit surprised that you have a blank space. If the string cannot be found you should have something like "str_notfound"

        IDS_MYPLUGIN must be defined in your c4d_symbols.h
        something like this.

        enum
        {
        	// string table definitions
        	IDS_MYPLUGIN = 10000,
        }
        

        i don't see anything that could lead to this kind of "error"

        No message from VS2019 ? (in the ouput tab)

        Could you share your plugin directory in a zip file ? (you can use our mail box if you don't want to share it in public [email protected])

        Cheers,
        Manuel

        MAXON SDK Specialist

        MAXON Registered Developer

        Y 1 Reply Last reply Reply Quote 0
        • Y
          Yaroslav @Manuel
          last edited by Manuel

          @m_magalhaes
          Thank you for a quick reply!
          I'm sorry, I made an idiotic mistake. I simply didn't add
          the following piece of code:


          case C4DPL_INIT_SYS:
          	{
          		// load resources defined in the the optional "res" folder
          		if (!g_resource.Init())
          			return false;
          
          		return true;
          	}
          

          in the main.cpp

          Thanks, again.
          I hope my next questions will have more sense.
          It should be an architecture plugin in the end 🙂
          Yaroslav.

          1 Reply Last reply Reply Quote 1
          • ManuelM
            Manuel
            last edited by Manuel

            hi,
            don't worry, I've made this one several times.

            Feel free to ask questions as you go it needed.

            Cheers,
            Manuel

            MAXON SDK Specialist

            MAXON Registered Developer

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

              Hi,

              without further feedback, we will consider this thread as solved by Wednesday and flag it accordingly.

              Cheers,
              Ferdinand

              MAXON SDK Specialist
              developers.maxon.net

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