C4D doesn't find description



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 05/07/2012 at 14:07, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   R12 
    Platform:      
    Language(s) :     C++  ;

    ---------
    Hello,

    I'm doing my first steps with the C++ API of Cinema 4D and have some problems with descriptions. This is my code (Yes, the first line might be unfamiliar to you ;).

    #include <c4d/c4d.h>  
    #include "res/description/Xsimpleshader.h"  
      
    class SimpleShader : ShaderData {  
      
      static const LONG PLUGIN_ID = 1000089; // For testing purpose only!!  
      
      public:  
      
          static NodeData* Alloc() {  
              return (NodeData* ) gNew SimpleShader;  
          }  
      
          static Bool Register() {  
              return RegisterShaderPlugin(  
                      PLUGIN_ID, "Simple Shader", 0, Alloc, "Xsimpleshader",  
                      0);  
          }  
      
          SHADERINFO GetRenderInfo(BaseShader* sh) {  
              return SHADERINFO_0;  
          }  
      
    };  
      
    Bool PluginStart() {  
      if (!SimpleShader::Register()) {  
          MessageDialog("SimpleShader was not registered successfully.");  
      }  
      return TRUE;  
    }  
      
    void PluginEnd() {  
    }  
      
    Bool PluginMessage(LONG, void* ) {  
      return FALSE;  
    }
    

    I have my res/ folder set up properly.

    simple-shader/
      res/
      description/
        Xsimpleshader.h
        Xsimpleshader.res
      strings_us/
        description/
          Xsimpleshader.str

    But when I want to open the options of my Shader, Cinema 4D tells me that it couldn't open Xsimpleshader.str. The strange thing is, that the path C4D tried to open, does not point to the .str file in my res/ folder.

    Can someone please tell me what's wrong here?

    Thanks,
    Nik



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 06/07/2012 at 01:10, xxxxxxxx wrote:

    You need to respond to the message C4DPL_INIT_SYS in PluginMessage() and call resource.Init() - see main.cpp in the C++ examples.

    Don't know if that will fix the problem but every plugin I've ever seen does that, and since you're having resource issues...



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 06/07/2012 at 03:30, xxxxxxxx wrote:

    Ow, so simple? haha, thank you spedler. It works just fine. :)
    -Nik


Log in to reply