name of material

Home Forums General discussions name of material

Tagged: ,

Viewing 1 reply thread
  • Author
    Posts
    • #3396
      antoine JULLIEN
      Participant

      Hi, i want to find the name of material MaterialAttribute_1, this a variable can be modify by a user object
      i want to write in the objet the name of material that as been choosed

      ! TEXTURE NAME
      _nomcolor = REQUEST (“Name_of_material”,”MaterialAttribute_1″, name)

      DEFINE STYLE text arial, 3, 5, 1
      STYLE text
      text2 A/2,B/1.5, _nomcolor

      Tonio

    • #3397
      Péter Baksa
      Keymaster

      Hi,

      The result of the REQUEST command is the number of successfully retrieved values (integer). The name of the material will be in the variable name in your example.
      This request expects a material index, unquote ”MaterialAttribute_1″.
      In define style use quotes: DEFINE STYLE “text” “arial”, 3, 5, 1

      _nResult = REQUEST (“Name_of_material”, MaterialAttribute_1, _nomcolor)

      DEFINE STYLE “text” “arial”, 3, 5, 1
      STYLE “text”
      if _nResult then
      text2 A/2,B/1.5, _nomcolor
      else
      text2 A/2,B/1.5, “undefined”
      endif

      Péter Baksa
      Library Platform, Software Engineer
      GRAPHISOFT SE

Viewing 1 reply thread
  • The forum ‘General discussions’ is closed to new topics and replies.