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

    Error in c4d_symbols.h

    SDK Help
    0
    7
    667
    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 17/09/2015 at 15:07, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   15 
      Platform:   Windows  ;   Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      I have a plugin (not mine) that produces an error, while Cinema 4D is loading the plugins.
      The error is:

      Error reading resource
      file '/Applications/Maxon/CINEMA 4D R16 Beta/plugins/ColourTableR13/res/c4d_symbols.h'
      Line 40

      In line 40 of the c4d_symbols.h file, the line reads:

      COLOURTABLE_M_MASK = 0xFFFFF000, // use to determine menu

      I converted the hexadecimal value to decimal and changed the line to:

      COLOURTABLE_M_MASK = 4294963200, // use to determine menu

      But I still get the same error.
      What could it be?

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

        On 18/09/2015 at 03:58, xxxxxxxx wrote:

        Hi Rui,

        the IDs are signed 32-Bit integer. So you are actually trying to set a negative value here.
        Interpreting 0xFFFFF000 as signed 32-Bit integer actually ends up being -4096. The symbol parser is a bit picky here, as it expects signed values and expects the user to explicitly have the sign for negative values. I mean for the decimal value it is absolutely correct, as the value can't be displayed as a signed 32-Bit integer, but one might discuss, if the hex value should be ok.
        Using -4096 (0xFFFFF000 as signed 32-Bit integer) in c4d_symbols.h actually works, though I'm not convinced it's a good idea in the end. I'd rather say stick to values ranging from 0 to 2147483647 (0x7FFFFFFF).

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

          On 18/09/2015 at 06:52, xxxxxxxx wrote:

          Thank you for the answer, Andreas.
          So, should I keep it as hexadecimal? Because this seems to be used as a mask.

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

            On 18/09/2015 at 07:01, xxxxxxxx wrote:

            Ooopsy, just realizing, you are looking at my very own source... didn't touch it for quite a long time... and indeed I did some strange things back then. Nowadays I probably wouldn't define masks in that place, rather do it in some header file, Cinema is not parsing.

            I have a new version that plugin, which will probably never get uploaded (I never received much feedback, so I figured nobody would be interested). If you want, I can send it to you. Even more confusing code, but who knows what it's good for.

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

              On 18/09/2015 at 07:19, xxxxxxxx wrote:

              Ahahahahahahah!! It is a small world, after all.
              Yes, this is ColorTable.
              I was asked by someone who bought some of my plugins if I would make it work for R15, R16 and R17 since it was a plugin that he used a lot in R13.
              Is it possible to make it work for those versions?

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

                On 18/09/2015 at 07:37, xxxxxxxx wrote:

                Sure. Actually the current version also works in R17, but it changed quite a lot...
                I don't think, it will be much work to get the old version running in R15-R17.

                I also wouldn't mind, if you want to take over the code. As long as you keep my name in there somewhere, you could do whatever you want with it.

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

                  On 18/09/2015 at 08:10, xxxxxxxx wrote:

                  Sure. Of course I would not take credit for it 🙂

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