PDA

View Full Version : Remove Previous Material and Assign new Issue


ColMatrix
10-23-2009, 11:58 AM
Hi everyone,

I am having a few issues which worked when testing but when trying to do it issues arrised and I have no idea how to solve it and what I have read I do not understand. Any adivce is greatly appreciate. Note I am new, please excuse the code if it is no optimized, I will attempt this later when it works.

Task

We have made many max files containing the same aircraft and each has different animations and other objects inside. We wish to take this aircraft change the textures and re-render the files again. Since I will be applying this script to the same aircraft containing the same 'named objects' I decided to use this as a means of removing and applying the materials.

Code


--Function that removes all materials applied to the geometry in the array.
fn matRemoval =
(
--Array containing the aircraft geometry
objArray = #($tail01,$tail_support02,$landing_gear_door_rear06,$chassis01,$wing_rear02,$tail_support03,$window_frame_front02,$window_frame_side02,$window_frame_rear02,$landing_gear_door_rear07,$tail_rudder01,$wing_flap_rear02,$wing_flap_rear03,$navigation_light02,$turbine_holder02,$turbine02,$p_turbine_fan02,$flap_movable_rear11,$flap_front18,$flap_front19,$flap_front20,$flap_front21,$flap_front22,$flap_front23,$flap_front24,$p_flap_support02,$turbine_holder03,$turbine03,$flap_front25,$landing_gear_door_rear08,$p_landing_gear_parts_rear02,$door_suspention02,$suspention_hinge10,$p_hinge_pivot04,$suspention_hinge11,$landing_gear_upper_rear02,$suspention_hinge12,$p_hinge_parts03,$suspwntion_hinge02,$p_hinge_pivot05,$landing_gear_lower_rear02,$tyre_rear08,$tyre_rear09,$rim_rear08,$rim_rear09,$rim_rear10,$rim_rear11,$p_landing_gear_parts_lower02,$p_hinge_rod02,$suspention_hinge13,$p_hinge_parts04,$tyre_rear10,$tyre_rear11,$suspention_hinge14,$flap_front26,$flap_front27,$flap_front28,$flap_front29,$flap_front30,$flap_front31,$flap_front32,$p_flap_support03,$p_winglet_points02,$winglet02,$navigation_light03,$flap_movable_rear12,$flap_movable_rear13,$flap_movable_rear14,$flap_movable_rear15,$flap_front33,$window_frame_front03,$window_frame_rear03,$window_frame_side03,$wiper02,$wiper03,$turbine_exhaust02,$turbine_exhaust03,$wing_rear03,$wing_lines03,$p_turbine_fan03,$wing_front02,$flap_movable_front04,$wing_front03,$flap_movable_front03,$p_wing_hinges_front03,$flap_movable_rear16,$wing_lines04,$winglet03,$p_winglet_points03,$p_wing_hinges_front02,$landing_gear_door_rear05,$p_landing_gear_parts_rear01,$door_suspention01,$suspention_hinge05,$p_hinge_pivot02,$suspention_hinge06,$landing_gear_upper_rear01,$suspention_hinge07,$p_hinge_parts01,$suspwntion_hinge01,$p_hinge_pivot03,$landing_gear_lower_rear01,$tyre_rear04,$tyre_rear05,$rim_rear04,$rim_rear05,$rim_rear06,$rim_rear07,$p_landing_gear_parts_lower01,$p_hinge_rod01,$suspention_hinge08,$p_hinge_parts02,$tyre_rear06,$tyre_rear07,$suspention_hinge09,$landing_gear_door_front_small03,$landing_gear_door_front_small02,$landing_gear_door_front02,$landing_gear_door_front03,$landing_gear_front01,$p_headlight_cone02,$p_headlight_glass02,$p_headlight_chrome02,$p_headlight_glass03,$p_headlight_chrome03,$p_headlight_cone03,$shocker_front01,$p_landing_gear_parts_front01,$tyre_front02,$tyre_front03,$rim_front02,$rim_front03)

--Wipes all the materials from the objects in the array.
for i=1 to objArray.count do
(
objArray[i].material = undefined
)

)

--Function that applies new materials
fn applyNewMats =
(
--Arrays containing objects that are to have the same material applied to them.
matEngineOuterCasing = #($turbine02,$turbine03)
matTires = #($tyre_rear08,$tyre_rear09,$tyre_rear10,$tyre_rear11,$tyre_rear04,$tyre_rear05,$tyre_rear06,$tyre_rear07,$tyre_front02,$tyre_front03)
matBaseColour = #($landing_gear_door_rear06,$landing_gear_door_rear07,$wing_flap_rear02,$wing_flap_rear03,$turbine_holder02,$flap_movable_rear11,$turbine_holder03,$flap_front25,$landing_gear_door_rear08,$p_winglet_points02,$winglet02,$flap_movable_rear12,$flap_movable_rear13,$flap_movable_rear14,$flap_movable_rear15,$flap_front33,$wing_front02,$wing_front03,$flap_movable_rear16,$winglet03,$p_winglet_points03,$landing_gear_door_rear05,$landing_gear_door_front_small03,$landing_gear_door_front_small02,$landing_gear_door_front02,$landing_gear_door_front03)
matGrey = #($tail_support02,$tail_support03,$flap_front18,$flap_front19,$flap_front20,$flap_front21,$flap_front22,$flap_front23,$flap_front24,$flap_front26,$flap_front27,$flap_front28,$flap_front29,$flap_front30,$flap_front31,$flap_front32)
matMainBase = #($chassis01)
matSlats = #($flap_movable_front04,$flap_movable_front03)
matEngineExterior = #($p_turbine_fan02,$landing_gear_upper_rear02,$suspention_hinge12,$suspwntion_hinge02,$landing_gear_lower_rear02,$suspention_hinge13,$suspention_hinge14,$turbine_exhaust02,$turbine_exhaust03,$p_turbine_fan03,$landing_gear_front01,$p_landing_gear_parts_front01)
mat_2164 = #($wing_rear02,$wing_rear03)
matTails = #($tail_rudder01,$tail01)
matGlass = #($p_headlight_glass02,$p_headlight_glass03)
matCanadianBase = #($shocker_front01)
matBlank15 = #($window_frame_front02,$window_frame_side02,$window_frame_rear02,$window_frame_front03,$window_frame_rear03,$window_frame_side03)
mat_1521 = #($suspention_hinge09,$suspention_hinge08,$suspwntion_hinge01,$suspention_hinge07,$landing_gear_upper_rear01)
matMetal_1 = #($p_flap_support02,$p_hinge_pivot04,$p_suspention_cable05,$p_suspention_cable06,$p_hinge_pivot05,$p_flap_support03,$p_wing_hinges_front03,$p_wing_hinges_front02,$p_hinge_pivot02,$p_suspention_cable04,$p_suspention_cable03,$p_hinge_pivot03,$p_headlight_chrome02,$p_headlight_chrome03)
matMetal_2 = #($rim_front03,$rim_front02,$p_headlight_cone03,$p_headlight_cone02,$rim_rear07,$rim_rear06,$rim_rear05,$rim_rear04,$suspention_hinge06,$suspention_hinge05,$door_suspention01,$rim_rear11,$rim_rear10,$rim_rear09,$rim_rear08,$suspention_hinge11,$suspention_hinge10,$door_suspention02)
mat_1658 = #($p_landing_gear_parts_rear02,$p_hinge_parts03,$p_landing_gear_parts_lower02,$p_hinge_rod02,$p_hinge_parts04,$p_landing_gear_parts_rear01,$p_hinge_parts01,$p_landing_gear_parts_lower01,$p_hinge_rod01,$p_hinge_parts02)
mat_24 = #($wing_lines03,$wing_lines04)
mat_1132 = #($p_landing_gear_parts_front01)
mat_1788 = #($landing_gear_lower_rear01)
mat_1036 = #($landing_gear_front01)
matBlack = #($wiper03,$wiper02)
mat_08 = #($navigation_light02, $navigation_light03)

--Load a material Library from the specified location
loadMaterialLibrary "R:\MaterialLibraryFile.mat"

--Assign the named material from the current library to the array
matTires.material = currentMaterialLibrary["tires"]
matEngineOuterCasing.material = currentMaterialLibrary["Luftwaffe Engine_Outer_Casing"]
matBaseColour.material = currentMaterialLibrary["Luftwaffe base Colour"]
matGrey.material = currentMaterialLibrary["Luftwaffe _Grey"]
matMainBase.material = currentMaterialLibrary["Luftwaffe main Base"]
matSlats.material = currentMaterialLibrary["Luftwaffe Slats"]
matEngineExterior.material = currentMaterialLibrary["Luftwaffe_Engine_Exterior"]
mat_2164.material = currentMaterialLibrary["Material #2164"]
matTails.material = currentMaterialLibrary["Luftwaffe Tails"]
matCanadianBase.material = currentMaterialLibrary["Canadian_Base"]
matGlass.material = currentMaterialLibrary["glass"]
matBlank15.material = currentMaterialLibrary["Blank 15"]
mat_1521.material = currentMaterialLibrary["Material #1521"]
matMetal_1.material = currentMaterialLibrary["metal_1"]
matMetal_2.material = currentMaterialLibrary["metal_2"]
mat_1658.material = currentMaterialLibrary["Material #1658"]
mat_24.material = currentMaterialLibrary["material24"]
mat_1132.material = currentMaterialLibrary["Material #1132"]
mat_1788.material = currentMaterialLibrary["Material #1788"]
mat_1036.material = currentMaterialLibrary["Material #1036"]
matBlack.material = currentMaterialLibrary["black"]
mat_08.material = currentMaterialLibrary["08 - Default"]
)

--executing the functions
matRemoval()
applyNewMats()



I would like to thank everyone in advance for your help.

Col

PEN
10-23-2009, 12:15 PM
You don't need to remove them first, you can just apply new ones. Do you have a question in there some where?

JHN
10-23-2009, 12:16 PM
Maybe you can post what the problem is with the script, error messages etc. Since you don't provide a sample scene/matlib it's hard to guess what errors did arise. And it's too much work (well for me anyway ;)) to build a sample scene myself.

But if I'm speculating, I'm not certain you can assign materials to arrays of objects like that. Maybe you have to do a for loop just like when your cleaning the materials.

Please provide some more info,

Thanks,
-Johan

ColMatrix
10-23-2009, 12:48 PM
hello

You don't need to remove them first, you can just apply new ones. Do you have a question in there some where?

Your absolutely correct - it is mainly visual clarification for myself as textures go black when unassigned so when i reapply materials I can clearly see which havnt worked. My apologies I should have added in my errors messages.

Maybe you can post what the problem is with the script, error messages etc. Since you don't provide a sample scene/matlib it's hard to guess what errors did arise. And it's too much work (well for me anyway ) to build a sample scene myself. But if I'm speculating, I'm not certain you can assign materials to arrays of objects like that. Maybe you have to do a for loop just like when your cleaning the materials. Please provide some more info, Thanks, -Johan

the script worked when experiementing on one (which contained all the material I wanted on anyway I just removed them and then reapplied - all semed to work perfectly - until I tried it on a max scene with the old materials applied to it.

Please see below the error messages I receive when executing the script (Without the 'matRemoval' function).

applyNewMats()
-- Error occurred in applyNewMats(); filename: C:\Filename.ms; position: 6315; line: 58 --
Frame:
-- matBlack: #($wiper03, $wiper02)
-- Mat_24: #($wing_lines03, $wing_lines04)
-- matMetal_2: #($rim_front03, $rim_front02, $p_headlight_cone03, $p_headlight_cone02, undefined, undefined, undefined, undefined, undefined, undefined, undefined, $rim_rear11, $rim_rear10, $rim_rear09, $rim_rear08, $suspention_hinge11, $suspention_hinge10, $door_suspention02)
-- mat_08: #($navigation_light02, $navigation_light03)
-- mat_1788: #(undefined)
-- matSlats: #(undefined, $flap_movable_front03)
-- mat_1521: #(undefined, undefined, undefined, undefined, undefined)
-- matEngineOuterCasing: #($turbine02, $turbine03)
-- matBlank15: #($window_frame_front02, $window_frame_side02, $window_frame_rear02, $window_frame_front03, $window_frame_rear03, $window_frame_side03)
-- matEngineExterior: #($p_turbine_fan02, $landing_gear_upper_rear02, $suspention_hinge12, $suspwntion_hinge02, $landing_gear_lower_rear02, $suspention_hinge13, $suspention_hinge14, $turbine_exhaust02, $turbine_exhaust03, $p_turbine_fan03, $landing_gear_front01, $p_landing_gear_parts_front01)
-- matMetal_1: #($p_flap_support02, $p_hinge_pivot04, $p_suspention_cable05, $p_suspention_cable06, $p_hinge_pivot05, $p_flap_support03, $p_wing_hinges_front03, $p_wing_hinges_front02, undefined, undefined, undefined, undefined, $p_headlight_chrome02, $p_headlight_chrome03)
-- mat_1658: #($p_landing_gear_parts_rear02, $p_hinge_parts03, $p_landing_gear_parts_lower02, $p_hinge_rod02, $p_hinge_parts04, undefined, undefined, undefined, undefined, undefined)
-- mat_2164: #($wing_rear02, $wing_rear03)
-- mat_1036: #($landing_gear_front01)
-- matTails: #($tail_rudder01, $tail01)
-- mat_1132: #($p_landing_gear_parts_front01)
-- matBaseColour: #($landing_gear_door_rear06, $landing_gear_door_rear07, $wing_flap_rear02, $wing_flap_rear03, $turbine_holder02, $flap_movable_rear11, $turbine_holder03, $flap_front25, $landing_gear_door_rear08, $p_winglet_points02, $winglet02, $flap_movable_rear12, $flap_movable_rear13, $flap_movable_rear14, $flap_movable_rear15, $flap_front33, $wing_front02, $wing_front03, $flap_movable_rear16, $winglet03, ...)
-- matGlass: #($p_headlight_glass02, $p_headlight_glass03)
-- matGrey: #($tail_support02, $tail_support03, $flap_front18, $flap_front19, $flap_front20, $flap_front21, $flap_front22, $flap_front23, $flap_front24, $flap_front26, $flap_front27, $flap_front28, $flap_front29, $flap_front30, $flap_front31, $flap_front32)
-- matMainBase: #($chassis01)
-- matCanadianBase: #($shocker_front01)
-- Unknown property: "material" in undefined
OK


I initially thought the same Johan but applying the material to the array worked previously...

Thanks for the help and sorry for nto being more clearer.

Col

P.S. Ok looking at it more closely it appears the file I opened to change from one material set to another actually as inconsistencies with the model names...after executing an array there was some 'undefined' elements, when i execute an array without any issues the material can then be applied. But due to the arrays (containing the geometry) obviously needing to be called first then the material assignment doesnt get reached due to error. I will have to put some code to tell the script that is a element is undefined skip it and continue.

I will post back when I manage to incorporate this.

Thank you.

ColMatrix
10-23-2009, 12:58 PM
hehe thanks you beat me to it, i found the cause of this error i will incorporate a solution and mention the results. thanks for the cathall.

JHN
10-23-2009, 12:58 PM
Looks like a naming error somehow.
What I would suggest is to wrap all material assignment calls in a try catch context.

For example:

try(matTires.material = currentMaterialLibrary["tires"])catch(print "Error in tires")

That way the script won't crash and you can determine where the error occurs more exactly.

Welcome to the world of debugging! ;)

-Johan

ColMatrix
10-26-2009, 01:04 PM
Ok it appears the newer version someone had renamed the models, so when search via model names I was getting errors. I have gone back into the original file of the aircraft took all the names and manually ensured the newer version had the correct names.

Last time i did this procedure I done it a long and tedious way, now i want to try a better way but i am a little bit stuck any guidance is appreciated.


Task


For each material in the current library make a array
Each array needs to have a logical name such as: arrMat_MaterialName
Search through each geometry for the material name.
put this object into the relevant array (if it has 'Material A' assign it would go into array 'arrMat_Material A'


Once I have this I can use the information in another script to assign the material to the objects. which will replace the old with the new ;)


Code


for i = 1 to currentMaterialLibrary.count do -- Their are 23 materials
(

--STUCK Help please, I need to generate an empty array #() for each material with a logical name.
currentMaterialLibrary[i].name = #() -- Doesnt work cannot convert string

for m = 1 to geometry.count where geometry[m].material.name == currentMaterialLibrary[i].name do
(
print geometry[m].name -- Here I will appendIfUnique to the above array
)

)




If anyone has 'any' suggesstions at all I am happy to hear them.

Thank you.

Col

ColMatrix
10-26-2009, 04:18 PM
Ok i have done what was required - although manually! :banghead: Code is below and everything in red I changed 23 times in order to get each array with the correct geometry inside.


arr08_Default = #()
for m = 1 to geometry.count where geometry[m].material.name == currentMaterialLibrary[1].name do
(
appendIfUnique arr08_Default geometry[m].name
)




I know what needs to be done (I think) but I cant find out how to do it. If anyone has the answer please comment here so in future I can do similar processes once instead of 23 times.

Thanks

Col

PiXeL_MoNKeY
10-26-2009, 05:50 PM
You would want to create a string and wrap it in a execute command. The result of the execute will be a variable equal to the name and the array assigned:execute (currentMaterialLibrary[i].name+" = #()") -- currentMaterialLibrary[i].name returns a string, you then add the rest of the code in side a string.-Eric

ColMatrix
10-26-2009, 05:53 PM
Thanks Eric

I just read through the MaxScript help and at the first read it does not make any sense. I will implement what you have typed and this should help me to fully understand when I see what happens.

Thank you for your response.

Col

denisT
10-26-2009, 06:27 PM
Ok it appears the newer version someone had renamed the models, so when search via model names I was getting errors. I have gone back into the original file of the aircraft took all the names and manually ensured the newer version had the correct names.

Last time i did this procedure I done it a long and tedious way, now i want to try a better way but i am a little bit stuck any guidance is appreciated.


Task

For each material in the current library make a array
Each array needs to have a logical name such as: arrMat_MaterialName
Search through each geometry for the material name.
put this object into the relevant array (if it has 'Material A' assign it would go into array 'arrMat_Material A'
Once I have this I can use the information in another script to assign the material to the objects. which will replace the old with the new ;)


Code


for i = 1 to currentMaterialLibrary.count do -- Their are 23 materials
(

--STUCK Help please, I need to generate an empty array #() for each material with a logical name.
currentMaterialLibrary[i].name = #() -- Doesnt work cannot convert string

for m = 1 to geometry.count where geometry[m].material.name == currentMaterialLibrary[i].name do
(
print geometry[m].name -- Here I will appendIfUnique to the above array
)

)




If anyone has 'any' suggesstions at all I am happy to hear them.

Thank you.

Col


if any currentmateriallibrary material is an instance of a scene material:

for m in currentmateriallibrary collect
(
nodes = for n in (refs.dependentnodes m) where iskindof n.mat Material and n.mat.name == m.name collect n
#(m, nodes)
)


if every currentmateriallibrary material has unique name but material is not an instance of a scene material:

mats_array = #()
name_array = #()
for m in currentmateriallibrary do
(
append mats_array #(m, #())
append name_array m.name
)
for n in (geometry as array) where iskindof n.mat Material and (i = finditem name_array n.mat.name) != 0 do
(
append mats_array[i][2] n
)
mats_array



they are the fastest ways to search for...

ColMatrix
10-27-2009, 10:01 AM
Thanks Dennis,

From looking it sort of makes sense - I dont quite get soem of it but I will cross ref what you have provided with the help section.

Thanks for the assitance I will respond to let you know how things go.

Col

ColMatrix
10-27-2009, 11:52 AM
OK Dennis I have broken it down to understand whats going on and hopefully help others that come along with similar query. btw this script is awesome :applause:


--First part loops through the current material library and puts each material into an array (mats_Array) and puts the materials name into another (name_array).

mats_array = #() --Makes empty array
name_array = #() --Makes empty array
for m in currentmateriallibrary do --loop through every material in the current material library
(
append mats_array #(m, #()) --Adds each material (variable m) into the array and add an empty nested array.
append name_array m.name --adds the name of every material in this array.
)

--This part loops through each geometry in the scene, if the geometry has a material applied 'AND' the material name is found in the array 'name_array' (Created previously) then access the element (in array 'mats_array') containing the material, then add the geometry that has this material applied to it inside the nested (multidimensional) array (created above).

for n in (geometry as array) where iskindof n.mat Material and (i = finditem name_array n.mat.name) != 0 do -- make each geometry int he scene into an array and loop through it. Filter the search to ensure a material is applied to the geometry and find that material in the array of material names we created above (name_array), IF both are NOT 0 (false) then proceed.
(
append mats_array[i][2] n --add the geometry into the materials nested array.
)
mats_array --display the array


Thanks for the code it makes sense (i believe so anyway any coments i have misinterpretted please say so). :beer:

My next step is to take this information and in a other max file with the same geometry (nmes) I can search the scene for the geometry and assign the materials from the current material library (will have to be loaded first) - all the geometry and material names are stored in the mats_array.

ColMatrix
11-06-2009, 12:01 PM
Hi all,

Ok here is my script finished.

@Dennis I tried your method and although I managed to understand what it was doing I tried for hours to actually use it and access the multidimensional array and couldnt get it to work.

@Eric I tried your suggestion also and I couldnt get it to work I think it must be something to do with path literals or somethign alogn them lines when to addd in certain characters such as '' "" /n. I used format instead which seemed to work unsure why the execute didnt - more practice and I am sure I will understand.

There are many stages to this script. the first one is not shown - i actually used MS to find all the objects and all the materials in a list. Once I gathered this list together I compoiled all the information and added more scripts to it - which is what you see below. I execute this script below into a file with older textures (that i want replacing with new ones) and replaces them.

loadMaterialLibrary "R:\material_Library.mat"
----Functions to determine which objects (that will be selected with the *) are to have one texture applied and the others to not. This is filtered via the numfaces on the object. These contain the array in here rather than further down.

fn flap_front =
(
objLuftwaffe_Grey = #()
objLuftwaffe_base_Colour = $shocker_front* as array + $flap_movable_rear* as array + $landing_gear_door_front* as array + $landing_gear_door_rear* as array + $p_winglet_points* as array + $turbine_holder* as array + $wing_flap_rear* as array + $wing_front* as array + $winglet* as array

for i in $flap_front* do
(
a = i.numfaces
case (if a != 97 then a = 1 else a = 97) of
(
1 : append objLuftwaffe_Grey i
97 : append objLuftwaffe_base_Colour i
)
)
)

fn turbine =
(
objLuftwaffe_Engine_Outer_Casing = #()
for i in $turbine* where i.numfaces == 622 do
(
append objLuftwaffe_Engine_Outer_Casing i
)
)

--list of all the arrays with there respective objects inside.
objBlack = $wiper* as array
objGlass = $p_headlight_glass* as array
objLuftwaffe_Main_Base = $chassis* as array
objLuftwaffe_Slats = $flap_movable_front* as array
objLuftwaffe_Tails = $tail* as array + $tail_rudder*
objMaterial_1658 = $p_hinge_parts* as array + $p_hinge_rod* as array + $p_landing_gear_parts_lower* as array + $p_landing_gear_parts_rear* as array objMaterial_2164 = $wing_rear* as array
objMaterial24 = $wing_lines* as array
objMetal_1 = $p_flap_support* as array + $p_headlight_chrome* as array + $p_hinge_pivot* as array + $p_suspention_cable* as array + $p_wing_hinges_front* as array objMetal_2 = $door_suspention* as array + $p_headlight_cone* as array + $rim_front* as array + $rim_rear* as array + $suspention_hinge* as array + $suspwntion_hinge* as array
objRed_Light = $navigation_light* as array
objTires = $tyre_* as array objWindow_Frames = $window_frame* as array
flap_front()
turbine()
objLuftwaffe_Turbine = $p_turbine_fan* as array
objLuftwaffe_Engine_Exterior = $turbine_exhaust* as array objMaterial_1132 = $p_landing_gear_parts_front* as array
objMaterial_1521 = $landing_gear_front* as array + $landing_gear_lower_rear* as array + $landing_gear_upper_rear* as array

--Assigning the respective materials to the Arrays that contain the geometry.

objBlack.material = currentMaterialLibrary["black"]
objGlass.material = currentMaterialLibrary["glass"]
objLuftwaffe_Main_Base.material = currentMaterialLibrary["Luftwaffe_Main_Base"] objLuftwaffe_Slats.material = currentMaterialLibrary["Luftwaffe_Slats"] objLuftwaffe_Tails.material = currentMaterialLibrary["Luftwaffe_Tails"] objMaterial_1658.material = currentMaterialLibrary["Material_#1658"] objMaterial_2164.material = currentMaterialLibrary["Material_#2164"]
objMaterial24.material = currentMaterialLibrary["material24"]
objMetal_1.material = currentMaterialLibrary["metal_1"]
objMetal_2.material = currentMaterialLibrary["metal_2"]
objRed_Light.material = currentMaterialLibrary["Red_Light"]
objTires.material = currentMaterialLibrary["tires"]
objWindow_Frames.material = currentMaterialLibrary["Window_Frames"] objLuftwaffe_Grey.material = currentMaterialLibrary["Luftwaffe_Grey"] objLuftwaffe_base_Colour.material = currentMaterialLibrary["Luftwaffe_base_Colour"] objLuftwaffe_Engine_Outer_Casing.material = currentMaterialLibrary["Luftwaffe_Engine_Outer_Casing"]
objLuftwaffe_Turbine.material = currentMaterialLibrary["Luftwaffe_Turbine"] objLuftwaffe_Engine_Exterior.material = currentMaterialLibrary["Luftwaffe_Engine_Exterior"] objMaterial_1132.material = currentMaterialLibrary["Material_#1132"] objMaterial_1521.material = currentMaterialLibrary["Material_#1521"]


If anyone has any methods they wish to share, or how I can improve a certain aspect such as all the as arrays I have, maybe I dont need to have them all their is a easier way.

Anyways THANKS to everyone for helping this process has been very educational for me and although has been a long journey it has been worthwhile and will help the project greatly.

Thank you.

Alan

CGTalk Moderation
11-06-2009, 12:01 PM
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.