10 October 2004, 06:53 PM
What do you mean when you say that the new material doesn't arise? It doesn't get created? I'm not sure I understand why it's important to the functioning of the material creation script that the hypershade panel be refreshed.
10 October 2004, 09:10 PM
Hey lilli! Thanx for your interest. It has been almost solved.
Yea.. "...dosn't arise..." damn dictionary. Its a general problem: I meant: Only if you got the HyperShade minimized and you create a Material via script, eg:
shadingNode -asShader lambert;
Then you won't see the new Material, when you open up the HyperShade again.
So Joojaa from highend3D-MEL-forum told me to use:
as some kind of "refresh" :) It seemes to work!
My only problem was: I use to hide the "Work Area"-Tab in Maya and that command always showed up both Top and Bottom Tab. But if you got your HyperShade that way another command with "showTopTabsOnly" instead of "showUpstream" fixes this.
Anyone thats got a better idea: Give it to me! :scream:
But for now its ready to release I think!
If you create a lot of game-assets for instance, you also create a lot of simple lambert-materials. And Its always the same: Open hypershade, create lambert, open attributes, click color connection, select file, click on the browse-icon, select your texture, select your object, rightclick material, "Assign To Selection" or MMB-drag the material to your object.
This script puts it all into a mouseclick and a little more:
no HyperShade, just opens up the texture browse dialouge
+ assigns the new material to all objects selected
+ it renames the new material after the textures filename
+ its also useful to simply create a lambert (just esc/cancel dialouge)
+ built in Nebula2 toolkit for Maya (http://www.radonlabs.de/toolkit.html)-support
Just put it in your scripts folder, and a "createNewLambertWithTex"-command on your shelf or a hotkey. Have Phun!
01 January 2006, 02:00 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.