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

    C4D doesn't find description

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 303 Views
    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 Offline
      Helper
      last edited by

      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

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

        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...

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

          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

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