[Linux, mtoa] Custom shaders float/int params without slider ?

[Linux, mtoa] Custom shaders float/int params without slider ?

maxtarpini
Collaborator Collaborator
583 Views
3 Replies
Message 1 of 4

[Linux, mtoa] Custom shaders float/int params without slider ?

maxtarpini
Collaborator
Collaborator

Hi, so I have the same stuff for both linux and win (maya) shader UIs but on linux I notice that for ints/floats there ain't any automatic slider creation. On win afair it appears as soon as I add min/max ranges in the .mtd but that's not the case for linux. Of course your (arnold core) shaders do have sliders but for what I can see you ain't doing anything different then me on .py and .xml stuff, can't see .mtd as it looks you do it in the compiled shader def. Can someone chime in ... maybe @Sebastien Blaineau-Ortega has an easy answer for this ? Thanks in advance.

2676-screenshot-from-2018-11-14-17-43-26.png

0 Likes
Accepted solutions (1)
584 Views
3 Replies
Replies (3)
Message 2 of 4

sebastien.blaineau.ortegaHRM3U
Autodesk
Autodesk
Accepted solution

For Arnold shader, we just need to set the min/max, or softmin/softmax in the .mtd file, and the sliders appear automatically.

It's the file that appears in plug-ins/mtoa.mtd, that's where the metadatas for all arnold nodes are set.

If you don't want to have a metadata file, you can set those directly in the shader node_parameters, function, for example :

AiMetaDataSetFlt(nentry, "transparency", "softmin", 1.);.

0 Likes
Message 3 of 4

sebastien.blaineau.ortegaHRM3U
Autodesk
Autodesk

On our side, we don't have any difference between windows or linux, it's all set the same way.

Maybe something in the environment prevents the mtd file from being loaded at all ? if you want you can send us a compiled shader + mtd so that we test

0 Likes
Message 4 of 4

maxtarpini
Collaborator
Collaborator

@Sebastien Blaineau-Ortega

yakee looks like setting metadata in the node_parameters did the trick, now it works. tomorrow gonna test the external .mtd on some dummy shader to see if I can replicate the problem.

Cheers and thanks a lot !

0 Likes