Is there a way in which the “Generate Mapping Coordinates” would be switch on automatically when you create objects, splines, modifications, Extrude, Sweep and etc.?
For example on VrayMtl:
global dmat
fn defaultmat=(
(
mybitmap=“Path to your bitmap file”
mytexmap=BitmapTexture filename:mybitmap filtering:1
dmat=VRayMtl Name:”White” Diffuse:(color 210 210 210) reflection_subdivs:16 reflection_fresnel:on texmap_bump:mytexmap effectsChannel:8
showTextureMap dmat mytexmap true
)
)
calbScr=”if objects.count!=0 then (newNode=objects[objects.count]\n”
calbScr+=”dmat=sceneMaterials[\"White\"]\n”
calbScr+=”if (newNode.material==undefined) do (\n”
calbScr+=”if dmat==undefined or (classof dmat != VRayMtl) do (defaultmat())\n”
calbScr+=”newNode.material=dmat\n))\n”
callbacks.addScript #filePostOpen “dmat=sceneMaterials[\"White\"];if dmat==undefined do defaultmat()” id:#VGCreate
callbacks.addScript #sceneNodeAdded calbScr id:#VGCreate
Place text in Notepad with extension “ms” and save to directory scripts\startup
Posted 5 months, 3 weeks ago. Add a comment
Анатолий:
В общем идея скрипта заключается в том,
чтобы скрипт обрабатывал все материалы в сцене и
отключал на них displacement
и устанавливал указанную maxDepth и subdivs))
A:
То что выделено устанавливайте по вкусу.
————————————————————-
In general, the idea of the script to handle all materials in the scene and
disables to them displacement
and install the specified maxDepth and subdivs.
VrayMatArray = getclassInstances VrayMtl
for i in 1 to 24 where classof MeditMaterials[i] == VrayMtl and findItem VrayMatArray MeditMaterials[i] == 0 do append VrayMatArray MeditMaterials[i]
for m in VrayMatArray do
(
m.texmap_displacement_on = off
m.reflection_subdivs = 20
m.refraction_subdivs = 20
m.reflection_maxDepth = 10
m.refraction_maxDepth = 10
m.reflection_useInterpolation = off
m.refraction_useInterpolation = off
)–end
Для того чтобы узнать все свойства материала Vray используйте команду
show (VrayMtl()) или getPropNames VrayMtl
—————————————————————————————————-
To learn all the material properties Vray strong> use the command
show (VrayMtl ()) strong> or getPropNames VrayMtl strong>
Posted 11 months, 2 weeks ago. Add a comment