Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - JohnManticore

Pages: [1]
1
Is it possible via python when exporting, to export black into a channel instead of white if the channel is missing in the project/document?

We currently use several user channels to build some masks, but not every project needs to use all of them, in these cases those packed channels export as White, which is causing annoying issues in the shader we use (having white in channels that should be black). I was curious if its possible at export to find out if a channel doesnt exist in the document. I know the errors return info can point this out in which case I'd like to export the channel as black, but I'm not sure if that would be possible or if I would need to build a new preset when it fails that puts black in those channels instead?

2
I have also asked this question as well. There seems to be some sort of issue with getting Substance to recognize the path as well. Testing with sys.path manually gets results as well and locally I can get a start up script to change the path around to work, but trying to deploy the tool to a team member does not work and the path will not be setup correctly.

Really frustrating that there is no support on this issue.

3
Reading 2 or 3 of the other posts it seems like there is a lot of confusion with loading a "plugin" that isn't in the default python/plugins folder.

What I am trying to accomplish.

Give the user a simple python "plugin" script, they replace a string with the path to their tools repo and place it in their plugins startup folder so it automatically runs.

This script loads all of the plugins that we store in our tools repo. Basically deploying a suite of tools using a small script that initially loads and sets the plugin path. I've looked at the example using importLib, it logs just tell me it doesnt exist.

Looping thru and printing all module names also prints nothing.

Not sure how this is that difficult.

Code: [Select]
import substance_painter
import substance_painter_plugins

##replace this path with with your tools repo/art/substance path
substance_painter_plugins.path = "D:/MyRepos/Tools/Art/SubstancePainter/plugins"
substance_painter_plugins.update_sys_path()

debug = True
deepDebug = True
print("Debug printing is " + str(debug))
print("Deep Debug printing is " + str(deepDebug))


def start_plugin():
if debug: print("Plugin Loaded")

print(substance_painter_plugins.path)
substance_painter_plugins.start_plugin("?????????")

def close_plugin():
print("closing Plugin")

if __name__ == "__main__":
start_plugin()

Not sure if this is happening for anyone else, but once I set the plugins path, reload plugins path and open plugins path options no longer work and substance painter has to be restarted to get the original plugins to show up again.

4
Thanks again, with your json I was able to catch where my initial mistake was. I had a missing comma between the maps dict entries.

The mesh/document/virtual maps all make sense to me. I am also pretty certain L is the equivalent of Gray source channel in the built in preset configuration file.

I have some pretty significant exporter stuff setup and working, will deploy it to the artists soon.

Would I drop other modules like P4's python API stuff in the modules folder within the plugin folder? Or is there another way to install new modules, or PIP stuff for Painters python install?

Really, thanks a lot!

5
I have tried the above and only the last filename and channel pair export, the other 3 are ignored. When running it thru a JSON validator it mentions duplicate key names which would kind of make sense. Its very possible that I have a JSON formatting error as its pretty annoying to break these up. I'll try using your preset shown here and report back.

**update it looks to me like their documentation has some glaring errors in regards to the map names. One of the comments lists them in all lower case, part of the code (and what you have shown here) has it camel case. Its possile that I just have the wrong names, or perhaps you were pseudo coding?

***update 2 - Your config is working to export multiple maps. Thank you so much. Where are you getting the exact naming of the channels and map types etc? I have a feeling its possible my naming on my channels was incorrect, I cant figure out any other reason as I had listed several maps with channels in the maps dict but only the last entry would export.

6
For instance, currently I do not understand how you are supposed to export multiple textures in a single exportPreset defined in json.

Both examples in the documentation only show a single map being exported.

defining the json how I imagine it would go shows up with duplicate key names in a json validator, but other ways of doing it just don't make any sense (like many things in Substance Painter).

Does anyone else have any guides on this?

TIA.

7
This is really frustrating that you can't just pass it a resource or something from the already created exports. Not only is the documentation lacking quite a bit, recreating these by typing them into json manually is time consuming and error prone.

Could we at least be able to get a .json output of our currently setup presets some how?

8
Back in SP1 and early in SP2, reimporting a mesh was much more useful. Small changes would cause some breakage in masking and painting, but 70-80% of your work could be salvaged or would need little to no clean up or adjustment.

Lately using SP2019.1.3 its basically pointless. The feature to me is entirely broken.

Reimporting a mesh that hasn't even changed will ruin most if not all of the texturing work done, across multiple textureSets as well.

Do you really feel like this is a "working feature" of Substance Painter?

As professional who uses SP daily and has setup pipelines around SP/SD and taught numerous other dev's SP, this is becoming very frustrating and worrisome. Features that have been long requested seem ignored entirely and things that used to work, or at least HAD a workaround have become broken.

There needs to be a checkbox that essentially says DO NOTHING when I reimport a mesh and I'll handle the outcome. What is the difficulty in basically re-interpreting the textures AS IS and wiping the 3d stroke projection back to 0 with the new mesh?


Pages: [1]