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
    • Recent
    • Tags
    • Users
    • Login

    Inch character in str file

    Scheduled Pinned Locked Moved SDK Help
    7 Posts 0 Posters 522 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 09/08/2011 at 15:56, xxxxxxxx wrote:

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

      ---------
      In my .str file I have several entries with names for
      different cameras film properties.
      Some names by tradition use the " sign. (Inch)
      I.e. one film format is called: 1/1.8"

      However I'm not able to get it correct in my .str file such as:

      SDOF_FILM_17 "1/1.8",""";

      Any idea if this is possible to do in the .str file?
      (It's the res/string_us/description/my.str I'm talking about)

      Cheers
      Lennart

      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 09/08/2011 at 17:25, xxxxxxxx wrote:

        You might need to include the Unicode representation in the .str file but escape sequences should work.

        "1/1.8","""  is two strings.  I don't think you can do that.  I have never seen multiple strings associated with a single string resource description using a comma separator.  You should try it like this:

        "1/1.8""

        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 09/08/2011 at 17:44, xxxxxxxx wrote:

          Thanks Robert for checking. Didn't work thou, it
          then reports an error for the next line.

          Afaik "1/1.8"""; should work (no comma as I had before)
          the little research I've done so far.

          But the .str file itself is maybe not C++ ?
          I'm using it in a Python plug but thought the descriptions are C++ ?

          Cheers
          Lennart

          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 09/08/2011 at 19:21, xxxxxxxx wrote:

            " 1/1.8 " "" won't work since you've already closed the quoted string (bolded)

            The .str file is just a file used by C4D.  It is not C++.
            You will need the Unicode representation instead.  The escape character is still used but uses the numerical reference instead (copyright symbol, for instance) :

            \u00a9

            \u represents a Unicode sequence and the 4 digits are the value in hexadecimal.  \u0022 is the double quote.  So, you might need to represent the string resource like this:

            SDOF_FILM_17 "1/1.8\u0022";

            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 09/08/2011 at 19:28, xxxxxxxx wrote:

              This is a trick.
              But it appears that the way that C4D displays characters in it's GUI's. You can create the "illusion" of a double quote by using two single quotes next to each other like this:

              SDOF_FILM_17 "1/1.8 '' ";

              The forum here doesn't seem to display single quotes differently either.
              So here's the same line of code written phonetically:
              SDOF_FILM_17   (DoubleQuotes)1/1.8(singleQuote)(singleQuote)(DoubleQuote).

              I tried this in both a C++ and a Python tag plugin. And they both work fine under a Windows environment. And the next entries in the .str file also work properly.
              But since you're on a Mac. I don't know if this trick will work for you.

              -ScottA

              *Oops- Cross posted with Robert

              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 09/08/2011 at 19:30, xxxxxxxx wrote:

                Thanks Robert! Works a treat!
                Was hunting Unicode on Wiki and didn't get it, now I do thanks to your snippet.
                Earlier example was also a typo. it should be: "1.8"";
                That actually works within Cinema itself, like userdata strings.
                (Even thou the ending ; (the semicolon) is "blue" in coffee script.

                Cheers
                Lennart

                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 09/08/2011 at 19:32, xxxxxxxx wrote:

                  Oh, missed your post Scott, thanks for your input as well 🙂

                  Cheers
                  Lennart

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