3 Replies Latest reply on Jun 6, 2006 7:23 AM by Newsgroup_User

    using more then 126 chars for naming models...

    _lw Level 1
      Today i noticed that models in Shockwave3D can have a maximum number of 126 characters. I needed to know that because i have to store some Informations in the names of the models when i export them (i have not option to use the "userdate" when exporting the models).

      But now something interesting happend when i tried to create long names in director via lingo. If the names are longer then 126 charakters they are limited to the first 126.

      if you use for example this code to generate a new group:

      member("world").newgroup("Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliq")

      this are 126 chars, you get a group with exact this name.

      if you now add more charakters at the end it will produce another group with the same name as the group above. You can check this in the Objectinspector.

      use now this code:
      member("world").newgroup("Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliqLorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliq")

      It will produce a second Group with exact the same name. The good thing is, that you can still reference to the model with that long name, the bad thing is, you can't read the full name of the model anymore.

      What does this mean in the end?
      There is a visible name of the model that can be read by lingo, but there is the "real" name of the model that can be used to reference to models. If the names have more then 126 chars you can only see the shortend name but its still nessesary to reference to the longer name.

      if you try this in the message window (this are 127 chars, i added a "2" as last character):
      member("world").newgroup("Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliq2")

      put member("world").group("Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliq2").name

      -- "Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliq"

      but
      put member("world").group("Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliq").name

      will give you an error!

      Conclusion:
      It's better not to use more then 126 characters for naming models.

      But if you want to prevent your 3D models from being used by other people, then you can use longer names and add for example a serialnumber to the models, behind char 126. So you can generate shockwave apps that need to know the correct name of the model.

      if you give your models in your 3D app names like this:
      "Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliq_12345"
      (132 chars)
      the last part is in this example the serialnumber "_12345"

      you can only reference to the models with

      serialnum="_12345"
      rightname=member("world").model[1].name & serialnum
      put rightname.position

      Maybe interesting to some people that want to make external w3D files unconfortable to handle for other people, you still can reference to the models by their numbers. I think it will only prevent models form the "CloneModelFromCastmember" command, not much... in the end there is no real protection when external *.w3d files are used...

      regards!

        • 1. Re: using more then 126 chars for naming models...
          a¿ex Level 1
          quote:

          Originally posted by: hondo3000you can only reference to the models with
          serialnum="_12345"
          rightname=member("world").model[1].name & serialnum


          you can still reference the nodes by index.
          clone the nodes in a repeat loop and you're done.

          • 2. Re: using more then 126 chars for naming models...
            _lw Level 1
            I know that this is not more then a gesture. but if people try to use "3DPI" for example and push the "CloneModelsFromCastmember" button it will not work. CloneModelFromCastmember needs to know the model by name.

            Using the "clone" comand like this:
            member("world").model[1].clone("clone001")

            will produce a errormessage and a model that is named like the original one.

            But you are right, this is absolute useless at all. if you know a little lingo its possible to copy models in different ways.... So sorry for posting this here, it was just little bit late and i was not thinking long enough about it...

            cheers!
            • 3. Re: using more then 126 chars for naming models...
              Level 7
              hondo3000 wrote:

              > I know that this is not more then a gesture. but if people try to use "3DPI"
              > for example and push the "CloneModelsFromCastmember" button it will not work.
              > CloneModelFromCastmember needs to know the model by name.
              >
              > Using the "clone" comand like this:
              > member("world").model[1].clone("clone001")
              >
              > will produce a errormessage and a model that is named like the original one.
              >
              > But you are right, this is absolute useless at all. if you know a little lingo
              > its possible to copy models in different ways.... So sorry for posting this
              > here, it was just little bit late and i was not thinking long enough about
              > it...

              hehe Don�t worry! It�s good to post here things like these. I already
              faced the character limitation and couldn�t use userData either because
              the modeler needed to use Maya. Can�t recall how did I solve it... I
              think that using a database. Anyway, now we know that we won�t be able
              of stealing your models with 3DPI

              Regards,
              --
              Agust�n Mar�a Rodr�guez

              www.onwine.com.ar > Macromedia Director demos & code