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

    C++ new plugin with Project tool fail

    Cinema 4D SDK
    c++ r20 project tool
    3
    9
    2.7k
    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.
    • César VoncC
      César Vonc
      last edited by

      Hello,

      I tried to make a new plugin with the Project tool, but I got an error when I exec the vcxproj file generated. Here is my steps :

      • I created my plugin folder with res and source into the R20/plugins folder.
      • I copied the cinema4dsdk/project folder into my plugin folder and changed the custom ID by a new one registered : ModuleId=1050015
      • I added my plugin into plugins\projects\projectdefinition.txt
      • I exec the command : kernel_app_64bit.exe g_updateproject="C:\Program Files\MAXON\Cinema 4D R20 Demo\plugins", it said it's ok, the files was generated.
      • I exec the vcsproj generated into my plugin and I got a Visual Studio Express error saying that C:\Program Files\MAXON\Cinema 4D R20 Demo\frameworks\cinema.framework.includes.props is not found.

      I find the documentation to start a new C++ project very messy, and I lost 10 min to understand that the old forum was down and to find the new one, because there is no link nowhere to it on the "How to get Plugin IDs" page. : /

      https://code.vonc.fr

      1 Reply Last reply Reply Quote 0
      • M
        mp5gosu
        last edited by mp5gosu

        You should have an "sdk" folder that contains the "plugins" & "framework" folder from the zip. Now run the project tool on that "sdk"-folder.

        By the way. Inside the plugins-folder there is another one called "project". Inside it, there's your main solution for all plugins that you added via projectdefinition.txt. Do not run your project solution directly, or it will miss all frameworks.

        1 Reply Last reply Reply Quote 0
        • César VoncC
          César Vonc
          last edited by César Vonc

          Thanks for your help,

          Before all these steps I extracted the sdk.zip into the Cinema 4D R20 folder.

          What do you mean by "run the project tool on that "sdk"-folder" ?
          I executed the command : kernel_app_64bit.exe g_updateproject="C:\Program Files\MAXON\Cinema 4D R20 Demo\plugins"
          where "plugins" folder is from the sdk.zip.

          I removed my plugin, to try to build the sdk, but when I open the plugins/project/plugins.sln, I got the exact same error about the file not found :

          C:\Program Files\MAXON\Cinema 4D R20 Demo\plugins\microsdk\project\microsdk.vcxproj : error : Le projet importé "C:\Program Files\MAXON\Cinema 4D R20 Demo\frameworks\core.framework\project\core.framework.includes.props" est introuvable. Vérifiez que le chemin dans la déclaration <Import> est correct et que le fichier existe sur le disque. C:\Program Files\MAXON\Cinema 4D R20 Demo\plugins\microsdk\project\microsdk.vcxproj

          Edit : My bad, I just needed to execute the tool to the frameworks too :
          kernel_app_64bit.exe g_updateproject="C:\Program Files\MAXON\Cinema 4D R20 Demo\frameworks"

          I understand now what you mean.

          It works now.

          https://code.vonc.fr

          1 Reply Last reply Reply Quote 0
          • M
            mp5gosu
            last edited by

            If you create a new folder called "sdk", you can extract the zip into it. Now running the project tool on this folder will process everything it contains.

            1 Reply Last reply Reply Quote 0
            • César VoncC
              César Vonc
              last edited by César Vonc

              Thanks for the info.

              By the way, how can we disable the "Style guide" errors ?

              For example, all my { after "if" generate an error "Style guide requires a new line for the substatement of if.".

              https://code.vonc.fr

              1 Reply Last reply Reply Quote 0
              • M
                mp5gosu
                last edited by mp5gosu

                In your projectdefinition.txt, set stylecheck.level to 0 or false.

                1 Reply Last reply Reply Quote 0
                • S
                  s_bach
                  last edited by

                  Hello,

                  you find all information on new resources published with Cinema 4D R20 on the developers blog: Cinema 4D R20 Released[URL-REMOVED].

                  There is no reason to create a "plugins" folder in your Cinema 4D installation or to copy your development environment into that folder. You can unzip the sdk.zip file anywhere and use the command line argument the preference settings to define the plugin location.

                  You find an overview over the first steps and more detailed information on development on these pages:

                  • Plugin Migration
                  • Development for Microsoft Windows
                  • Project Tool

                  best wishes,
                  Sebastian


                  [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

                  MAXON SDK Specialist

                  Development Blog, MAXON Registered Developer

                  1 Reply Last reply Reply Quote 0
                  • César VoncC
                    César Vonc
                    last edited by

                    Thanks,

                    The informations a bit dispatched and I don't find the doc very clear, for example, there is no link to download Project Tool on the Project Tool page, and globally not enough examples in the sdk.

                    Sorry but the more clear doc to build and update faster our plugins is the tutorial made by a member here, because all the infos are on the same page : https://developers.maxon.net/forum/topic/10967/compiling-the-cinema-4d-r20-c-sdk-examples

                    https://code.vonc.fr

                    1 Reply Last reply Reply Quote 0
                    • M
                      mp5gosu
                      last edited by mp5gosu

                      @césar-vonc said in C++ new plugin with Project tool fail:

                      The informations a bit dispatched and I don't find the doc very clear, for example, there is no link to download Project Tool on the Project Tool page, and globally not enough examples in the sdk.

                      Second sentence on this page: https://developers.maxon.net/docs/cpp/2023_2/page_maxonapi_projecttool.html
                      Agreed, the link is not very well visible, but it says "The Project Tool can be obtained from developers.maxon.net[URL-REMOVED]"
                      And of course, the docs are very helpful, it just needs a bit of reading. 😉


                      [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

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