Oh sorry, thank you. I totally missed that.
Posts made by Yakuza
-
RE: Legacy Code still a thing?
@ferdinand
Thank you very much. I don't get a lot of that but was able to change the flow/logic of the plugin so that the compiler doesn't throw any errors anymore (but a bazillion warnings ). I have no idea if this will work because I still cannot test it since actually it's two plugins, the command plugin and its preferences dialog. The latter is unfortunately larger than the command itself and still throws 21 errors.They all occur in PrefsDialogObject class. Do you have any ideas on these?
Severity Code Description Project File Line Suppression State Error C4263 'Bool SoloPrefs::Init(GeListNode *)': member function does not override any base class virtual member function solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\SoloPrefs.cpp 134 Error C4264 'Bool NodeData::Init(GeListNode *,Bool)': no override available for virtual member function from base 'NodeData'; function is hidden solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\SoloPrefs.cpp 146 Error C4263 'Bool SoloPrefs::GetDParameter(GeListNode *,const DescID &,GeData &,DESCFLAGS_GET &)': member function does not override any base class virtual member function solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\SoloPrefs.cpp 135 Error C4264 'Bool NodeData::GetDParameter(const GeListNode *,const DescID &,GeData &,DESCFLAGS_GET &) const': no override available for virtual member function from base 'NodeData'; function is hidden solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\SoloPrefs.cpp 146 Error C4263 'Bool SoloPrefs::GetDEnabling(GeListNode *,const DescID &,const GeData &,DESCFLAGS_ENABLE,const BaseContainer *)': member function does not override any base class virtual member function solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\SoloPrefs.cpp 137 Error C4264 'Bool NodeData::GetDEnabling(const GeListNode *,const DescID &,const GeData &,DESCFLAGS_ENABLE,const BaseContainer *) const': no override available for virtual member function from base 'NodeData'; function is hidden solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\SoloPrefs.cpp 146 Error C4263 'Bool SoloPrefs::GetDDescription(GeListNode *,Description *,DESCFLAGS_DESC &)': member function does not override any base class virtual member function solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\SoloPrefs.cpp 138 Error C4264 'Bool NodeData::GetDDescription(const GeListNode *,Description *,DESCFLAGS_DESC &) const': no override available for virtual member function from base 'NodeData'; function is hidden solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\SoloPrefs.cpp 146 Error C2664 'Bool SoloPrefs::InitValues(const DescID &,Description *)': cannot convert argument 1 from '<unnamed-enum-PREF_SOLOPREFS_MAIN_GROUP>' to 'const DescID &' solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\SoloPrefs.cpp 210 Error C2440 '<function-style-cast>': cannot convert from 'initializer list' to 'GeData' solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\SoloPrefs.cpp 230 Error C2664 'Bool SoloPrefs::InitValues(const DescID &,Description *)': cannot convert argument 1 from '<unnamed-enum-PREF_SOLOPREFS_MAIN_GROUP>' to 'const DescID &' solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\SoloPrefs.cpp 272 Error C2440 'return': cannot convert from 'const BaseContainer *' to 'BaseContainer *' solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\SoloPrefs.cpp 287
-
RE: Legacy Code still a thing?
Thank you, Ferdinand. Yes, I did that already and changed the first bc to const. Your link says btw.:
" Note -Legacy code will compile and run without adaptions but adhering to these changes will yield performance improvements."Now there are 10 instances of error 3 above.
-
RE: Legacy Code still a thing?
Thank you. It's actually "only" 26 errors on compilation. They are mostly BaseContainer related, to no surprise, since the plugin does largely only handle containers and their values. See console output below.
So if you for starters could nudge me regarding
cannot convert from 'const BaseContainer * to 'BaseContainer* and
cannot convert 'this' pointer from 'const BaseContainer' to 'BaseContainer &
I might be half way done.Error1 - Lines 51ff look like this
Int32 SOLO::GetState(BaseDocument *doc, GeDialog* parentManager) { BaseContainer *bc = doc->GetDataInstance()->GetContainerInstance(SOLO_ID); if (!bc) return CMD_ENABLED; else if (bc->GetInt32(ID_SOLO_SET, 0) == 0) return CMD_ENABLED; else return CMD_ENABLED | CMD_VALUE; }
Error3 - Line 181
obj->GetDataInstance()->GetContainerInstance(SOLO_ID)->SetInt32(ID_SOLO_STATE, data);
Any pointers to pointers and constant containers would be welcome.
Cheers,
Bo
Severity Code Description Project File Line Suppression State
Error C2440 'initializing': cannot convert from 'const BaseContainer *' to 'BaseContainer *' solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\solo2023.cpp 53
Error C4996 'BaseList2D::GetData': Use GetDataInstanceRef() to avoid the unnecessary BaseContainer copy solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\solo2023.cpp 109
Error C2662 'void BaseContainer::SetInt32(Int32,Int32)': cannot convert 'this' pointer from 'const BaseContainer' to 'BaseContainer &' solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\solo2023.cpp 181
Error C2662 'void BaseContainer::SetInt32(Int32,Int32)': cannot convert 'this' pointer from 'const BaseContainer' to 'BaseContainer &' solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\solo2023.cpp 182
Error C2662 'void BaseContainer::SetBool(Int32,Bool)': cannot convert 'this' pointer from 'const BaseContainer' to 'BaseContainer &' solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\solo2023.cpp 183
Error C4263 'Bool SoloPrefs::Init(GeListNode *)': member function does not override any base class virtual member function solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\SoloPrefs.cpp 133
Error C2662 'void BaseContainer::SetInt32(Int32,Int32)': cannot convert 'this' pointer from 'const BaseContainer' to 'BaseContainer &' solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\solo2023.cpp 199
Error C4264 'Bool NodeData::Init(GeListNode *,Bool)': no override available for virtual member function from base 'NodeData'; function is hidden solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\SoloPrefs.cpp 145
Error C4263 'Bool SoloPrefs::GetDParameter(GeListNode *,const DescID &,GeData &,DESCFLAGS_GET &)': member function does not override any base class virtual member function solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\SoloPrefs.cpp 134
Error C2662 'void BaseContainer::SetInt32(Int32,Int32)': cannot convert 'this' pointer from 'const BaseContainer' to 'BaseContainer &' solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\solo2023.cpp 200
Error C4264 'Bool NodeData::GetDParameter(const GeListNode *,const DescID &,GeData &,DESCFLAGS_GET &) const': no override available for virtual member function from base 'NodeData'; function is hidden solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\SoloPrefs.cpp 145
Error C4263 'Bool SoloPrefs::GetDEnabling(GeListNode *,const DescID &,const GeData &,DESCFLAGS_ENABLE,const BaseContainer *)': member function does not override any base class virtual member function solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\SoloPrefs.cpp 136
Error C2662 'void BaseContainer::SetBool(Int32,Bool)': cannot convert 'this' pointer from 'const BaseContainer' to 'BaseContainer &' solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\solo2023.cpp 201
Error C4264 'Bool NodeData::GetDEnabling(const GeListNode *,const DescID &,const GeData &,DESCFLAGS_ENABLE,const BaseContainer *) const': no override available for virtual member function from base 'NodeData'; function is hidden solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\SoloPrefs.cpp 145
Error C4263 'Bool SoloPrefs::GetDDescription(GeListNode *,Description *,DESCFLAGS_DESC &)': member function does not override any base class virtual member function solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\SoloPrefs.cpp 137
Error C2662 'void BaseContainer::SetInt32(Int32,Int32)': cannot convert 'this' pointer from 'const BaseContainer' to 'BaseContainer &' solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\solo2023.cpp 208
Error C4264 'Bool NodeData::GetDDescription(const GeListNode *,Description *,DESCFLAGS_DESC &) const': no override available for virtual member function from base 'NodeData'; function is hidden solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\SoloPrefs.cpp 145
Error C2662 'void BaseContainer::SetInt32(Int32,Int32)': cannot convert 'this' pointer from 'const BaseContainer' to 'BaseContainer &' solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\solo2023.cpp 209
Error C2662 'void BaseContainer::SetBool(Int32,Bool)': cannot convert 'this' pointer from 'const BaseContainer' to 'BaseContainer &' solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\solo2023.cpp 210
Error C2440 'initializing': cannot convert from 'const BaseContainer *' to 'BaseContainer *' solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\solo2023.cpp 228
Error C2662 'void BaseContainer::SetInt32(Int32,Int32)': cannot convert 'this' pointer from 'const BaseContainer' to 'BaseContainer &' solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\solo2023.cpp 260
Error C2664 'Bool SoloPrefs::InitValues(const DescID &,Description *)': cannot convert argument 1 from '<unnamed-enum-PREF_SOLOPREFS_MAIN_GROUP>' to 'const DescID &' solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\SoloPrefs.cpp 209
Error C2440 '<function-style-cast>': cannot convert from 'initializer list' to 'GeData' solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\SoloPrefs.cpp 229
Error C2664 'Bool SoloPrefs::InitValues(const DescID &,Description *)': cannot convert argument 1 from '<unnamed-enum-PREF_SOLOPREFS_MAIN_GROUP>' to 'const DescID &' solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\SoloPrefs.cpp 271
Error C2440 'initializing': cannot convert from 'const BaseContainer *' to 'BaseContainer *' solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\SoloPrefs.cpp 278
Error C2440 '=': cannot convert from 'const BaseContainer *' to 'BaseContainer *' solo2023 D:\MAXON_CODE\C4D_2024_2_CODE\sdk\plugins\solo2023\source\SoloPrefs.cpp 282 -
Legacy Code still a thing?
Hi.
I just tried to compile a simple plugin for 2024 whose code basically worked for the last 16 years. Now it throws 40 errors.
Has the time come for an inevitable re-write or should it continue to work and it's just a matter of fixing some stuff?
Cheers
-
RE: Plug-in running fine on one OS but not another
Yes. it's solved. Thank you.
-
RE: Plug-in running fine on one OS but not another
@kbar said in Plug-in running fine on one OS but not another:
I was reading through this to see if you used a Debug build. Glad you finally found it. I assume what you were doing was compiling on one machine in Debug mode and then just copying the plugin to your second machine to try it out. That second machine wouldn't have had Visual Studio installed so it wouldn't have had the debug runtime dlls, so your plugin wouldn't have loaded. Always compile in Release mode if you are going to test your plugin on another machine, or if you are giving the plugin to someone to test out.
That's exactly what happened. Thanks.
-
RE: Plug-in running fine on one OS but not another
OK, it's working now. I changed two things but probably what did the trick was the latter: I updated Visual Studio and compiled a Release build. The shakey one was Debug config which I totally missed until after the update. FYI I'm using the Community Edition. You can re-download via the above link and test 2023.0.1. and 2023.1.0 again if you are interested. Here it's running just fine in both versions incl. prefs.
Cheers!
-
RE: Plug-in running fine on one OS but not another
Yup, very odd. BTW on the failing OS neither the locally installed 2023.0.1. loads the plugin nor the installation that is installed on the other OS and works there does.
-
RE: Plug-in running fine on one OS but not another
Hi Ferdinand.
The folder is the default "plugin" folder in the application folder with both OS so no path in the C4D prefs. But even with path it makes no difference. Yes, I'm using pluginflag_hide and access the command via Comand Manager shift+F12. Here the console doesn't even print the copyright remark. On the other OS everything works, console out, prefs dialog in C4D preferences, command in Command Manager.
I'll get back on this later. Thank you so far. -
RE: Plug-in running fine on one OS but not another
You can download the plugin here http://synesthetic.de/plugins/solo2023.zip
-
RE: Plug-in running fine on one OS but not another
Hi Ferdinand.
Thanks for the quick reply. I'm currently a bit busy and can only answer some questions without investigating further.
First of all I'm using legacy code and it's a commanddata plugin. I downloaded the project tool last week. I compiled it for 2023.0.1 and copied the same folder over to the other Windows running a fresh install of 2023.0.1 with no other plugins present in the plugins folder.
Regarding registration I check this in Main like this
#include "c4d.h" Bool RegisterSOLO(void); Bool RegisterSoloPrefs(void); Bool PluginStart(void) { if (!RegisterSOLO()) { ApplicationOutput(maxon::String("Solo could not be registered.")); return false; } if(!RegisterSoloPrefs()) { ApplicationOutput(maxon::String("SoloPrefs could not be registered.")); return false; } ApplicationOutput(maxon::String("solo for Cinema 4D 2023.0.1 (C) 2007-2022 by synesthetic.de")); return true; } void PluginEnd(void){ } Bool PluginMessage(Int32 id, void *data) { switch (id) { case C4DPL_INIT_SYS: // Don't start plugin without resources if (!g_resource.Init()) return false; return true; case C4DMSG_PRIORITY: return true; } return false; }
There is no output in the console at all. I'm going to double check API and C4D versions later this evening and do a rebuild.
Cheers!
-
Plug-in running fine on one OS but not another
I rebuilt my plugin for 2023 and it is working on the Win10 istallation I built it on but not on my 2nd installation of Win10. Any Ideas? It's not running from the sdk folder but rom a separate folder in the plugin directory. With the same folder copied to the other OS it doesn't even register. I checked the redistributables and the x64 ones seem to be there. Unfortunately this was the only thing I can think of as a cause.
Left is the non-working OS.
Thanks a lot!
-
RE: Project Tool Stops At Non-Existent Path
Ahh. headdesk
I'm doing this too rarely. Thanks a lot. -
Project Tool Stops At Non-Existent Path
Hi.
I'm trying to run the Project Tool on a fresh install of C4D for coding purposes on D.
This is what happens:I have no idea why. It throws the same warning when I try this on C:\Program Files where there actually is a "Maxon" folder. But it's just Maxon App stuff I think.
Thanks in advance.
-
RE: C++ Debugging Setup
Thanks again. This works now but one last thing. It now triggers a stop on startup. Can I safely uncheck stopping for this kind of exception?
-
RE: C++ Debugging Setup
@m_magalhaes said in C++ Debugging Setup:
But there's always room to improve so let us know if something is still not clear.
Thanks. Your link states: "The plugin location can be set with the g_additionalModulePath command line argument."
Where and how do I use it exactly? Using it in an alias of the C4D.exe lets me start Cinema and it finds the plugin but VC++ doesn't accept aliases and converts the path to the target .exe. Forcing the link leads to an error. When using g_additionalModulePath in VC++ directly it complains about the syntax. -
C++ Debugging Setup
Hi.
I compiled the sdk on Windows and my plugin for R21 in standard configuration according to the documentation. Now I'd like to be able to press "Debug" in VC++ and have it compile and run C4D.exe just like before R20. At the moment the sdk/plugins folder is not the plugins folder so C4D won't load the plugin.
How do I have to set it up so I can compile in the plugins folder? I'm a bit intimidated by the new dependencies, frameworks, solutions, projectfiles, projectdefinitions, configurations and stuff. I hope it is just setting the plugin path in CInema.
Additionally, where in VC++ do I have to link the C4D.exe? In the "Debugging" section of the project file?Thanks a lot.
-
RE: Allocation of PrefsDialogObject
SOLVED
It's just static NodeData *Alloc() { return NewObjClear(SoloPrefs); }