Material Path Right Click

Much like how you can right click on a model and copy the model path to the clipboard, I would like to be able to right click and copy the path of materials in the selection window.

If this is already out there, could someone please point me in the right direction?


Just a question but if the model was for example


would the material have to be



Unfortunately it’s not that easy, models can use multiple materials. There is a module(dll) for getting a table of the materials used on a model, so it’s not impossible, but you’d need to load the model run the function to get the table of materials and then copy the list to the clipboard, making it dependent on the dll.

I think the dll is gm_modelinfo or something like that, if I remember where the page for it is i’ll post it.

Not talking about the materials the models use, it was just an example of how you can right click them and copy the model path.

I want to be able to right click on those “swatches” and copy their material path.

Sorry for the misunderstanding.

ok, that’s a little different, so you’re talking about the material tools list. It looks like someone needs to overwrite or modify the MatSelect vgui control to add the extra functionality, If I get time I might try it.

Material Tool Code: /gamemodes/sandbox/entities/weapons/gmod_tool/stools/material.lua
Control Panel Code(Defines MatSelect Control): /gamemodes/sandbox/gamemode/spawnmenu/controlpanel.lua

I’ll just leave those there in case someone else want to try it, then they don’t have as much research to do.