By raduc
#380323
Hi deadalvs,

Embedding an MXS material usually doesn't need to be updated on a per export basis, so adding these controls to the export utility might burden the workflow, you can set a referenced MXM material to be embedded via the Embed in MXS option in the Maxwell Referenced Material.
If the problem is that you can't set this option globally, you can use MEL to achieve this goal.
Here's two scripts that you can drag with the middle mouse button on your toolbar to set the materials for all selected objects to be embedded (first script) or not (second script)
Code: Select all
//Enable MXM embed for the materials on currently selected objects
hyperShade -smn;
string $selection[] = `ls -selection`;
for($node in $selection)
{
    if(`attributeQuery -exists -node $node "embedInMXS"`)
        setAttr ($node + ".embedInMXS") 1;
}
Code: Select all
//Disable MXM embed for the materials on currently selected objects
hyperShade -smn;
string $selection[] = `ls -selection`;
for($node in $selection)
{
    if(`attributeQuery -exists -node $node "embedInMXS"`)
        setAttr ($node + ".embedInMXS") 0;
}
User avatar
By deadalvs
#380325
Hi raduc,


thanks for the scripts.. very helpful ! thanks !


meanwhile, I got an other workaround, where I embed the mxms directly in the mxs file, via pyMaxwell.

thanks again !

Matt
Help with swimming pool water

Hi Andreas " I would say the above "fake[…]

render engines and Maxwell

Other rendering engines are evolving day by day, m[…]