CGTalk > Software > Autodesk 3ds max > 3dsMax SDK and MaxScript
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 11-21-2007, 09:56 PM   #1
Hobbs
Tech Artist
Dan
Incredible Technologies
Chicago, USA
 
Join Date: Oct 2006
Posts: 252
a way to loop through MultiBitmap maps?

I think i know the answer to this, but does anyone know of a way to loop through all the bitmaps effectively in a multiBitmap?

For example,

. instead of having to go

. bitmapA = openBitmap a, bitmapB = openBitmap a, etc


would there be a way to go,

. for bitmaps in $.material.maps[2] do.....


I know since i'm accessing bitmaps instead of actual values this doesn't really work, but writing it out individually seems kind of tedious.

Any help would be appreciated. Thanks.
 
Old 11-21-2007, 10:22 PM   #2
Bobo
Krakatoa Guy
 
Bobo's Avatar
Borislav Petrov
Product Specialist
Thinkbox Software
Vancouver, Canada
 
Join Date: Mar 2002
Posts: 5,321
Quote:
Originally Posted by Hobbs
I think i know the answer to this, but does anyone know of a way to loop through all the bitmaps effectively in a multiBitmap?

For example,

. instead of having to go

. bitmapA = openBitmap a, bitmapB = openBitmap a, etc


would there be a way to go,

. for bitmaps in $.material.maps[2] do.....


I know since i'm accessing bitmaps instead of actual values this doesn't really work, but writing it out individually seems kind of tedious.

Any help would be appreciated. Thanks.


Forgive me my ignorance, but what is a multiBitmap?
__________________
Bobo
 
Old 11-21-2007, 10:35 PM   #3
Rick Stirling
Veteran
Rick Stirling
Senior Artist/TD
Rockstar North
Edinburgh, United Kingdom
 
Join Date: Oct 2003
Posts: 95
Is that like a multisub?

For a multisub, assuming material 1 in the editor

howmany = meditMaterials[1].numsubs

for matLoop = 1 to howmany do
(
DTex = meditMaterials[1].materialList[matLoop].diffuseMap.filename
-- do something with our filename here. Maybe bung them into an array
)

You can also query the other maps, for example

STex = meditMaterials[1].materialList[matLoop].specularLevelMap.filename
BTex = meditMaterials[1].materialList[matLoop].BumpMap.filename

Last edited by Rick Stirling : 11-21-2007 at 10:58 PM.
 
Old 11-21-2007, 10:36 PM   #4
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 11:43 PM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.