Notifications
Clear all

[Closed] Change Map Channels

Can someone help me out with a script?

I need it to change the map channel in the uvw modifier to 2 of any selected object.

Can this be done?

Thanks,

4 Replies

Hi,
You just have to loop through all selected objects and check their modifiers. If any of them is uvw map then change map channel property to 2.


[color=white]for[/color] s in 1 to selection.count do --loop through selected objects
(
for m in 1 to selection[s].modifiers.count do --loop through modifiers on object
	(
	--if modifier is Uvwmap then set its map channel to 2
	if ((classof selection[s].modifiers[m]) == Uvwmap)
		then selection[s].modifiers[m].mapChannel = 2
	)
[size=2])
[/size]

thanks man:thumbsup: I needed that.

It seems so easy but I can never get anything to work. I’m not very good at this.

How would you add a blank bitmap to the diffuse channel in this script?


for obj in geometry do
(
local mat = standard name:obj.name
obj.material = mat
)


Just put bitmaptexture to material’s diffuse map. To put any bitmap to texture use filename property. Like this:

obj.material.diffusemap = bitmaptexture filename:“c:\ ex.bmp”

Thanks again. Your the best.