PDA

View Full Version : Change Map Channels


Maven
09-01-2004, 08:43 PM
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,

lechoo
09-01-2004, 09:40 PM
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.

for 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
)
)

Maven
09-02-2004, 12:26 PM
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
)
_________________________________________________

lechoo
09-02-2004, 07:10 PM
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:\\tex.bmp"

Maven
09-02-2004, 07:59 PM
Thanks again. Your the best.:thumbsup:

CGTalk Moderation
01-19-2006, 03:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.