Getting Plugin custom data
-
On 01/07/2014 at 11:46, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R15
Platform: Windows ; Mac OSX ;
Language(s) : C++ ;---------
Hello, I'm implementing a plugin in C++ and trying to interact with the VRay plugin. I found that I can't access to the custom parameters of the plugin.This is the test code that I am using:
BaseList2D *mat =nullptr; //Get the vray plugin for Vray Advanced Material BasePlugin *plug = FindPlugin(1020295, PLUGINTYPE_MATERIAL); if (plug && plug->Message(MSG_RETRIEVEPRIVATEDATA, &mat)) { if ( mat != nullptr) { BaseContainer *bc = mat->GetDataInstance(); if (bc != nullptr) { GePrint("-----OPTIONS------"); Int32 i = 0; Int32 id = 0; while (true) { id = bc->GetIndexId(i); i++; if (id == NOTOK) break; else { Int32 dt = bc->GetData(id).GetType(); GePrint("ID: " + String::IntToString(id)); GePrint(" ->Type: " + String::IntToString(dt)); } } } } }
Any ideas? Tips? Something I should try?
Any comments are welcome.
Thank you.
-
On 01/07/2014 at 11:56, xxxxxxxx wrote:
Hi GonzaloO,
what custom parameters are you talking about? And why do you think that
MSG_RETRIEVEPRIVATEDATA sent to the Advanced Material Plugin gives you a BaseList2D* ?
What are you trying to do?-Niklas
-
On 01/07/2014 at 12:55, xxxxxxxx wrote:
Hi Niklas.
I'm trying to get the Texture Map on the diffuse layer. I need the path of the texture so i can get all the textures used in the scene and save them in a folder. I already did it with TextureTags that is the easy part, but with the VRay materials I can't get the data that is in the GUI.
I have used the same code with a diferent plugin and worked giving to me a BaseList2D*. I do it with the FBX exporter and get all the parameters used to export the FBX just changing one line.
BasePlugin *plug = FindPlugin(FBX_PLUGIN_ID, PLUGINTYPE_SCENESAVER);
How can I know what the MSG_RETRIEVEPRIVATEDATA return?
Thank you for your answerPS: Sorry for my clumsy english.
-
On 03/07/2014 at 09:41, xxxxxxxx wrote:
Never mind, my bad.
I should use the GetParameter() function to get the parameters I need.
Thanks anyway guys.