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
Will there be a Maxwell Render 6 ?

Although i’ve been happily rendering away in[…]

SS Pinto Bean

Hi Tommy, Great stuff - love it~! Thanks for pos[…]

Never No More Studio Lighting

Hello Mark! Very good tips about the camera setti[…]

Sadly, this lack of a response demonstrates a mori[…]