ScriptSpot home

[Another] Get Material from Selected

Downloads

Release history (1)
  • Version 1.2Listed version

    Listing updated

    No download linked to this version

Other files (2)
3ds Max compatibility
Unknown
Community compatibilityNo compatibility reports yet

No reports yet for the available releases.

Community reviewsNo reviews yet.

Listing details

Version
1.2
Original version requirement
9 n Up
Other software required
3ds Max 9 -----> may be below can work too
Author’s update date
Legacy votes
15
Listing created
How compatibility works

Compatibility comes from the author’s supported range or requirements in the original listing. A tested version records what the author tried.

“2020 unconfirmed” in the catalog means support for 3ds Max 2020 is still unknown.

Community reports record successful tests on specific releases.

Posted by

fajar

Credited author: fajar [wong solo]

More by this author

Description

Well everybody already know what it is . its put selected object (many object) material to medit [material editor]. I make the script as small as posible so the script work faster n efficient as posible. check the script for the source.

thanks and happy scripting.

Edit : Thanks as always to anubis to give me a support

Comments (3)

Comment policy

fajar

thanks anubis for input ....so long not see you.

Reply to fajar
Panayot Karabakalov

:)

Yes, I was away from Max for a while

Panayot Karabakalov

Hi Fajar

Here is 2 notes from me ;)

1)

selection.count

return integer number, so testing for undefined:

selection.count != undefined

will always return True, so better compare with "> 0".

2) the mat edior slots are 24, so you need to check the amount of collected materials, something like:

objMats = for obj in selection where \
	obj.mat != undefined collect obj.mat
maxIndex = objMats.count
if maxIndex > 24 do maxIndex = 24
for i = 1 to maxIndex do
	setMeditMaterial i objMats[i]

..or just collect maximum 24 materials:

matIndex = 0
objMats = for obj in selection while matIndex < 24 where \
obj.mat != undefined collect (matIndex += 1; obj.mat)
for i = 1 to matIndex do
	setMeditMaterial matIndex objMats[matIndex]

best regards,
Anubis