View Full Version : upgrade mia_material
bigbrother 09-03-2009, 08:27 AM Hi!!
how can I upgrade mia_material_x to mia_material_x_pass same time on much shader?
|
|
mclausch
09-08-2009, 03:11 PM
Open the attribute editor for your mia_material_x shader, open the "Upgrade Shader" section and then press the "Upgrade shader to mia_material_x_passes" button.
Matt
bigbrother
09-09-2009, 02:51 PM
thanks! I know that! But, if i have many mia_material_x shader, i can't upgrade each shader!
mclausch
09-09-2009, 03:42 PM
Sorry, I did not understand.
There is a helper method written in MEL for upgrading multiple shaders to their pass equivalents. Check out $MAYA_LOCATION/scripts/others/upgradeAllMentalRayShaders.mel.
There are two methods of use:
upgradeAllMentalRayShadersOfType(string $oldType, string $newType, string $suffix)
and
upgradeAllMentalRayShaders(int $passSupport)
The first can upgrade ALL of the mia_material_x shaders in your scene to mia_material_x_passes by invoking it as follows:
upgradeAllMentalRayShadersOfType("mia_material_x", "mia_material_x_passes", "_passes");
The second can be called like:
upgradeAllMentalRayShaders(1);
and will upgrade ALL of the mental ray materials in your scene to their _x_passes equivalent if they exist (this includes mia_material, mi_metallic, mi_car_paint and misss_fast_shader).
Matt
bigbrother
09-09-2009, 05:02 PM
oh! thanks for your helps! i 'll try it!
CGTalk Moderation
09-09-2009, 05:02 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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.