Page 1 of 1

Custom property headers?

PostPosted: Mon Feb 26, 2018 2:29 pm
by Lizzard
Hello!

I'm working on a shader that has quite a lot of properties.
It gets quite messy if they are all in one row without separation.

I noticed that the name of my custom light function (My Blinn-Phong Light) gets added as bold header.
Is there a way to add custom headers like that so i can separate the properties?

Thanks!

Re: Custom property headers?

PostPosted: Mon Feb 26, 2018 5:01 pm
by Amplify_Borba
Hey there! The bold headers are currently specific for the Shader Functions, for now the only way you can achieve that specific type of control is by creating and using a custom inspector for your materials.

We provide a few node attributes, within certain node parameters, that allow you to hide specific fields in the material inspector through the "Hide in Inspector", or expose them in a simplified way, in regards to Texture Samples, through the "No Scale Offset" attribute. You may also order your properties in the Material Properties tab, within the Output Node Parameters.

Please let me know if this helps, thanks!

Re: Custom property headers?

PostPosted: Mon Feb 26, 2018 6:08 pm
by Lizzard
Thanks for the quick answer!

I guess the additional work would not be worth it then.
I could add the headers by quickly editing the script but then it gets overwritten when i recompile the shader : (.
It would look so nice tho...


EDIT:
Well, i just added a bunch of empty functions. Not the best way but it works and gives in the desired effect : )

Re: Custom property headers?

PostPosted: Tue Feb 27, 2018 10:52 am
by Amplify_Borba
That's a pretty interesting solution, although the proper way would be to develop a custom editor as I've mentioned in the last post, here's a simple guide on how set it up.

Hopefully we can provide further means of customizing the inspector in the future, please let me know if you have any further questions, thanks!