THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/04/2008 at 13:53, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 10.5
Platform: Mac OSX ;
Language(s) : C++ ;
---------
Ok guys, perhaps I'm a bit dense... if I have what is shown below, where should I see my new attribute (IS_TRUE_OR_NOT) show up? Am I missing something? I can't find any errors nor is anything showing up that I can find. Thanks again everyone! (I left out main.cpp because it seems to register ok)
source/MyMenuPlugin/oMyMenuPlugin.cpp:
> \> #include "c4d.h" \> #include "Omymenuplugin.h" \> \> class MyMenuPlugin : public CommandData \> { \> public: \> virtual Bool Execute(BaseDocument \*doc); \> }; \> \> Bool MyMenuPlugin::Execute(BaseDocument \*doc) \> { \> GePrint("----------------"); \> GePrint("Menu Executed..."); \> \> StopAllThreads(); \> \> BaseObject \*null_p = NULL; \> null_p = BaseObject::Alloc(Onull); \> null_p->SetName("MY_NULL"); \> \> BaseContainer \*bc = null_p->GetDataInstance(); \> bc->SetBool(IS_TRUE_OR_NOT, TRUE); \> \> doc->StartUndo(); \> doc->InsertObject(null_p, NULL, NULL); \> doc->AddUndo(UNDO_NEW, null_p); \> doc->EndUndo(); \> \> doc->Message(MSG_UPDATE); \> EventAdd(); \> \> return TRUE; \> } \> \> Bool RegisterMyMenuPlugin(void) \> { \> return RegisterCommandPlugin(1000002,"My Plugin Name",0,"",String("MyMenuPlugin"),gNew MyMenuPlugin); \> }
res/strings/Omymenuplugin.str:
> \> STRINGTABLE Omymenuplugin \> { \> Omymenuplugin "This is my plugin."; \> IS_TRUE_OR_NOT "Is it true or not?"; \> }
res/description/Omymenuplugin.h:
> \> #ifndef \_Omymenuplugin_H\_ \> #define \_Omymenuplugin_H\_ \> \> enum \> { \> IS_TRUE_OR_NOT = 1 \> }; \> \> #endif
res/description/Omymenuplugin.res:
> \> CONTAINER Omymenuplugin \> { \> NAME Omymenuplugin; \> INCLUDE Onull; \> \> GROUP ID_OBJECTPROPERTIES \> { \> BOOL IS_TRUE_OR_NOT { } \> } \> }