Announcement

Collapse
No announcement yet.

What Characters are allowed in Plugin Names?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • What Characters are allowed in Plugin Names?

    I'd like to have my artist coworkers put a tag in the name of their meshes (in 3dsMax) so I can lookup specific meshes by said tag.
    I have noticed most characters other then letters and numbers, get converted to underscores '_'.

    Are there any other characters I could use that won't get converted to underscores?
    it would be usefull to me, because then I could tell my coworkers to exclusively use that character for tags.

    I'm curious for your thoughts!
    and thanks for reading!

    P.s. I just realised i should have probably posted this in general instead; Apologies!

  • #2
    Here is the code that checks plugin name validity in V-Ray AppSDK:
    Code:
    bool checkPluginNameValidity(const char* name) {
        if (!name || !*name)
            return false;
    
        // A digit not allowed at first character position
        if (*name >= '0' && *name <= '9')
            return false;
    
        while (char c = *name) {
            // Allowed characters: A-Z a-z 0-9 @ | _
            if ((c < '0' || c > '9') && (c < 'A' || c > 'Z') && (c < 'a' || c > 'z') && c != '@' && c != '|' && c != '_')
                return false;
            ++name;
        }
        return true;
    }
    ​

    Comment


    • #3
      Thanks! Thats perfect! Exactly what I needed to know.

      The '|' character does in fact stay '|' when I save a maxscene to a .VRScene so I could use this for tags like so:
      item_1|TAG| => item_1|TAG|@node_1234

      Outside of artist not correctly naming meshes, is there any false positives i should be aware of?
      I don't think I have seen the '|' character in any plugin names so far.

      Comment


      • #4
        I think I've seen | in vrscenes exported from some V-Ray integrations, SketchUp maybe.

        Comment

        Working...
        X