VectorMap SetSvgString - not saving with file


#1

hi i am using VectorMap() and assigning svg image using SetSvgString

vm = VectorMap(); 

vm.SetSvgString "<svg 
 xmlns=\"http://www.w3.org/2000/svg\" 
 viewBox=\"0 0 2540 2540\" 
 xmlns:xlink=\"http://www.w3.org/1999/xlink\"> 
 <circle fill =\"none\" stroke=\"#FFF700\" stroke-width=\"211.66\" cx=\"1270\" cy=\"1270\" r=\"1168\"/> 
 </svg > "
  
 
stdMat = StandardMaterial()
stdMat.diffuseMap = vm
selection[1].material = stdMat

after saving and reopening max file vector map returns to image
is there a way to save it with material without using external file.


#2

I think Custom Attribute with postLoad event could do the job
You can store/retreive SVG source on vectormap instance using getAppData/setAppData


#3

Thank you it worked