[Closed] material editor help
Mine does.
you have to use diffusemap.coords.mapchannel not diffusemap.mapchannel
guys these scripts are not working with me … am going crazyyyyyyyyyy
plz i want u to understand what i want … all what i want is to :
for each object selected in scene .... do the following :
1)add UVW mapping modifier
2)from parameters :mapping ,,,,choose BOX
3)map channel = 2
4)go to material editor and press get material
5)choose selected and click on material
6)from basic parameters :diffuse; change map channel = 2
7)assign material to selection
8)show map in view port
and i used this code but i didnt work exactly like what i want:
for s in selection do addModifier s (UVWMap())
s.modifiers[#UVW_Mapping].maptype = 4
s.modifiers[#UVW_Mapping].mapChannel = 2
mtlBrowser.browseFrom #selected
myMat = meditmaterials[1]
01 - Default:Standard
myMap = Noise()
Noise:Noise
myMat.diffuseMap = myMap
Noise:Noise
so plz try to help me guys i should show my work to my manager and i did nothing till now
and this is all what i need …nothing more …nothing less
thx in advance
Well if it’s Vray then it should be something like this instead.
for o in getclassinstances VrayMtl do
(
try
(
o.texmap_diffuse.coords.mapchannel = 2
Showtexturemap o o.texmap_diffuse on
)
catch()
)
Yeah…if you replace the code in the first function in my script with the one Dave posted, it should work with VRay. Also, if you use single VRay Mats only, you don’t really need the material test part…
fn MapChannel2 MyMat
(
try
(
MyMat.texmap_diffuse.coords.mapChannel = 2
showTextureMap MyMat MyMat.texmap_diffuse true
)
catch()
)
for i in selection do
(
MapChannel2 i.Material
addModifier i (uvwmap maptype:4 MapChannel:2)
)
Hope it works…
dude this is exactly what i want …i only want to ask a last question
i want to write a for loop which chooses sertain objects according to their name instead of selecting objects … example
i want to select all objects will name box like box01 box02 box 03 … but if their is sphere01 it will not be selected in the loop …
thx in advance
All you have to change is instead of
for i in selection do
you write
for i in $box* do