Solved Can't add plugin name into cinema4d

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

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

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

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

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

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