Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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

    Getting Plugin custom data

    SDK Help
    0
    4
    363
    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.
    • H
      Helper
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          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 answer

          PS: Sorry for my clumsy english.

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            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.

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