how to find out map type of a texture
for m in bitmaps do
(
print m.?????????
)
when I use print bitmaps
I get
name1:Bitmap
name2:Bitmap
But I need
DIFFUSE
BUMP
Forum topic · General Scripting
By artrender · 2013-02-09
how to find out map type of a texture
for m in bitmaps do
(
print m.?????????
)
when I use print bitmaps
I get
name1:Bitmap
name2:Bitmap
But I need
DIFFUSE
BUMP
Comments (23)
Comment policy
add me to your skype! My skype name is also artrender.info
I need to go out, but when I come, I will ask you about payment methods!
Thank you, you really deserve money for your knowledge!
How much to pay!!!!!
I need instead of
only
Everything else works fine!!!!
That's what happens when I drop a single argument.. oh well, another iteration:
I want to make such a script:
smth like in image
for every ID it's texture paths with it's collor range in bg
Attachments
I will pay
tell me how much!
Thx but smth missing
results:
in other vrayMtl diffuse, bump reflection etc
close to finish
I've excluded the word map inside "diffuse map" "bump map" etc,
the result:
but I still can't figure out how to put color corect instead of "Map"
It worked in your second script that you wrote at 1st page. - here:
Yeah, my fault:
hurraaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaay, yay
I'm so glad that you helped me! HUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUGS! Finallllllllllyyyyyyyyyyyy! I will just try to exclude the word map and to put color corect inside
where diffuse map\Map\
has to be Diffuse\Color_corect
I'm not sure that I can but I will really try
but everything else works perfectly!
Thank you Swordslayer! I will give you this plugin that I'm making now, and your name will be there like a very GOOD supporter!
Glad to be of assistance :)
This is some really horrible code but it might work:
No idea why refs.dependsOn doesn't work in some cases, in the end I had to switch to the previous implementation you've posted before.
we need to integrate somehow this function
Find all submaterials in one mat, but unfortunately it is also limited, not going deep enough!!! And after finding the last submaterial, it is possible to use your code that works for any materials without submaterials
hmm...
Who wrote this function?
And how you using it?
I see that it's a recursive function but... it store the result in
(that s'd be array), but this variable is not a part of this function (not defined inside, nor yet passed as argument). So that mean, that this function will work properly only if you define array variable with exact the same name before calling the function. In other words:
I found it in materialselector_2
sorry for this if smth !!!!
This is shorter and does the same:
Anyway, I don't think it's a good idea to work from top to bottom and then back again... Have a look at my previous reply, it's certainly not universal and handles Blend material and Multisub material separately (obviously you'd have to add any other material type that can contain other materials - but there are not really that many cases).
Thanks
I've wrote the code to find submaterials inside composite material
Thanks, Swordslayer, YOU ARE A GREAT MAN!!!!
You answer is very GOOD and your code works perfectly! I could not even imagine how to do this! And thank you that you found time to think about this problem.
The only thing is that it does not work now for multisubobject materials, or composite, or blend material(those materials which contain submaterials) - I tried your first code for detecting MAP TREE in ActiveSlot in MTLEDITOR:
and it's working well! I have in my slot Multisubobject Material with 3 sub vraymtl's. I get this answer in listener:
When I get inside 1st VrayMTL, I get this answer:
And this is typically what I need + submaterials tree + submaps tree:
Your second code is very POWERFUL. It's working great for Materials which does not contain submaterials. For a material with no submaterials I get very fine result:
or
but for other materials I get no answer :(
We need to combine them somehow!
Is this the way you intend to use it? If that is so, it could have saved a lot of hassle had you said this in the original post... Getting the material tree going from the lowest level up is way harder than going the other way round:
THANKS Swordslayer! You're really perfect scripter
This Script is much better!
But how to make it work for all materials, for example, if we have inside multimaterial blend mtl - then it skips it at all!
or if we have composite material, it does not work! This should be Universal! Where we have
it should recall somehow
and all other mtl types
We need smth recursive - material in material in material...
while
( material contains submaterial) do
And it's very interesting that if I have a vrayLightmtl inside multimaterial then it's showing all it's textures, but if we have blend or composite, override etc it doesn't! I'm really stupid at this! I need to test 3 months to make it work by myself!
THANK YOUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU!
IT's working very well, the only thing is that when I use it I get
Slot name: Map 1
Slot name: Mask
Slot name: Radius
Slot name: Occluded
Slot name: Diffuse map
Slot name: Bump map
Slot name: Refl. gloss.
Slot name: Reflect map
Slot name: Bump map
Slot name: Refl. gloss.
Slot name: Diffuse map
Slot name: Reflect map
Slot name: Bump map
Slot name: Refl. gloss.
Slot name: Bump map
I get Map instead of Diffuse(I have there collor corect then texture in diffuse)
I want DIFFUSE/COLOR CORRECT/
Except this, I want all this info without the word
map
for example - not BUMP MAP but BUMP.
In this case
Slot name: Map 1
Slot name: Mask
Slot name: Radius
Slot name: Occluded
Slot name: Map 2
Map1 and Map2 are located in Diffuse Slot/Fallof then - Map1 and Map2!
I would like to list tem like:
Difuse/Fallof/Map1
Difuse/Fallof/Map2
Thank you in advance!
This will work in some cases:
SubTexmap methods work both for materials and maps, yet it is quite likely that some info will be missing - anything that will be missing in getClassInstances/refs.dependents calls.