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

    Create dialog for a shader plugin

    Scheduled Pinned Locked Moved PYTHON Development
    14 Posts 0 Posters 1.0k 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 26/06/2012 at 07:27, xxxxxxxx wrote:

      Thank you, I'll check if I find everything I need soon!

      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 26/06/2012 at 07:31, xxxxxxxx wrote:

        Check this out when you want to create descriptions. πŸ™‚
        Description Editor 0.9 BETA

        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 27/06/2012 at 07:22, xxxxxxxx wrote:

          Originally posted by xxxxxxxx

          Check this out when you want to create descriptions. πŸ™‚
          Description Editor 0.9 BETA

          Danke das sieht sehr interessant aus!
          (*Thanks* )

          Now I got one more question. My Shader Description file and gui is working fine. However trying to learn from the example plugins I saw the parameter IDs can be accessed via c4d.MY_PARAMETER_NAME.

          So for example, I've defined the constant "MYSHADER_BLUR" in res/c4d_symbols.h and res/description/Xmyshader.h and added the fitting gui in res/description/Xmyshader.res. The Gui is shown in the shader editor; everything is fine so far. But when I try to access the constant using c4d.MYSHADER_BLUR I get an error message:Β 
          "AttributeError: 'module' object has no attribute 'MYSHADER_BLUR'".
          When I drag the element into the command line, it says "Myshader[c4d.MYSHADER_BLUR]".
          But when hitting return I get the same attribute error.

          Does anyone know what's wrong?
          Thanks!

          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 27/06/2012 at 07:58, xxxxxxxx wrote:

            Hi,

            This is a know issue. Browse to your C4d preferences folder and the 'prefs' dir. Delete 'symbolcache' file. This will force the symbolcache to be regenerated.

            Also there's no need to define your shader description IDs in res/c4d_symbols.h (In the description header it's enough.)

            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 27/06/2012 at 09:29, xxxxxxxx wrote:

              Thank you Yannick! Just found out about these two by myself a few minutes ago after browsing a bunch of threads in here. One addition for anyone who reads this:

              res/c4d_symbols.h is not used by python scripts but C++/COFFEE.

              Now that the frame is set up I can finally get to work! πŸ˜„

              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 27/06/2012 at 09:43, xxxxxxxx wrote:

                Addition: Don't know why, but when I remove the enumeration of my plugin constants fromΒ res/c4d_symbols.h I get a runtime error - it says the plugins' global resource couldn't be initiated.

                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 27/06/2012 at 10:46, xxxxxxxx wrote:

                  @Yannick: Really? Never heard of that before. Dors Cinema just assigns random values to the symbols, then?
                  @jbjhjm: Freut mich. πŸ˜‰
                  In order to recognize it a resource folder, the c4d_symbols.h must exist. πŸ™‚

                  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 27/06/2012 at 11:09, xxxxxxxx wrote:

                    Originally posted by xxxxxxxx

                    Hi,

                    This is a know issue. Browse to your C4d preferences folder and the 'prefs' dir. Delete 'symbolcache' file. This will force the symbolcache to be regenerated.

                    Also there's no need to define your shader description IDs in res/c4d_symbols.h (In the description header it's enough.)

                    Hy there,

                    seems I have the same problem. But I can't see any symbolcache file in my prefs. There is only a "coffeesymbolcache" and "directorycache" file, but no file named "symbolcache". Also, if the problem happens on my system, can it happen to customers too, that use that plugin?

                    Cheers,
                    maxx

                    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 29/06/2012 at 07:27, xxxxxxxx wrote:

                      Originally posted by xxxxxxxx

                      Hy there,

                      seems I have the same problem. But I can't see any symbolcache file in my prefs. There is only a "coffeesymbolcache" and "directorycache" file, but no file named "symbolcache". Also, if the problem happens on my system, can it happen to customers too, that use that plugin?

                      Cheers,
                      maxx

                      Nope it will just happen during development. When C4D recognizes a new plugin it reads the resource/string/description files and caches them. If these files are changed after that (which will only happen during development) Cinema still uses the old, cached files. No problem for customers though.

                      The cache file names seem to have changed over the last versions. Just rename or remove the cache files you can find and everything should work fine. If you didn't define libraries/custom shortcuts/custom layouts or anything you can even remove the whole appdata/c4d folder. Cinema will just create new files/settings from scratch.

                      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 05/07/2012 at 07:05, xxxxxxxx wrote:

                        ok, thanx for the infos!

                        Cheers,
                        maxx

                        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 16:32, xxxxxxxx wrote:

                          ... unfortunately, it just happened to my client too 😞

                          I had to tell him, how to delete the cache, after an update to the descriptions in a python plugin. Is there no way to prevent this from happening?

                          Thank you,
                          maxx

                          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 07/07/2012 at 02:41, xxxxxxxx wrote:

                            Btw, this can of course also happend when a C++ plugin was updated and a Python script want to access a Symbolthat came along with the new version. When the symbolcache wasn't updated, the Symbol is not available.

                            -nik

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