I'm trying to create a script which stores the current materials applied to the asset, then apply one material to the whole thing, then be able to paste my original materials back on at a later. Is that possible, and what command should I use to query what materials are assigned to my faces.
You can maybe use that new Render Setup where using scripting do the following: 1. Create new material with your checker map. 2. In render setup create a new layer 3. In that new layer create (RMB click) a new collection and there (on the right side) add your object(s) where you want that new material with checker map. 4.…
Yeah, I'd be inclined to avoid anything that's reliant on face numbering because that's subject to change and would completely knacker any lists you store. The material swap is relatively safe as you're dealing with a list of things that won't go away unless you explicitly delete them, it's easy to store a list of…
Hi guys, made some good progress, still working on it. But it does appear to be working in a contained environment. I've given up on trying to paste the materials back to the faces, and instead just plugging the checker map into the materials' shading group is a much better way to go. This is much safer and easier to code.…
Yeah I actually thought about duping the object, but that won't work because the user needs to be able to make changes to UV mapping while the script is active. I'm trying to create a toggle button that assigns a checker map, then when you toggle remove the checker map it puts back your previous materials. Very tricky,…
I don't do Mel but you need to do this... 1.Get a list of shading groups 2.Get a list of members from each shading group - which will be shape nodes or faces 3. Store all that for later It's about 5 lines of pymel, no idea how it'd work in mel. It gets awkward if you're only interested in a subset of objects or your scene…
I've got something just about working sorry don't have the code here will share the solution once I've figured it out. @poopipe yes the face order changing is an issue, ideally the script would be robust, but after working on it for 3 days I'd be happy if it worked at all. If I could just plug the checker into all the…