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 - Bradford Smith

Pages: [1] 2 3 ... 8
1
I just realized that my response to item 2 assumes you are using the python API. It's been a while since I've written JS plugins, but I remember that being more complicated, and I don't think I ever successfully extended the QT import paths

2
Regarding item 1.. this is typically part of a shelf deployment since they shelf resources. You could probably have a plugin install those preset resources into a shelf on init as long as you know what shelf they need to be put in. Deploying them with your project shelves is likely a better approach though for consistent asset interface and compatibility.

That said, I'm personally not a fan of the application template and export presets for large productions. They have little to no API visibility and must be manually maintained, which generally means they don't get maintained, and require a shelf re-deployment. If you have custom scene assemblers and exporters, your own JSON config might be an option to consider.

Regarding item 2.. Your plugins don't have to reside in the user docs directory. If you are controlling the user environment, you can add a custom plugins path via SUBSTANCE_PAINTER_PLUGINS_PATH. Keep in mind, the folder structure should match the expected user docs structure.

3
Is there a python equivalent to the JS function getProjectExportPreset?

4
I've got a need to query, validate, and potentially set project settings. The Settings object and child settings types are clearly defined, and used in a new scene configuration, but can an existing scene be queried and modified?

5
Substance PainterSubstance Painter - Scripting - Re: Renaming Texture Sets
 on: March 29, 2020, 10:32:23 pm 
I'm going to add a big +1 to this suggestion!

6
Substance PainterSubstance Painter - Scripting - Re: ID Mask Plugin
 on: March 29, 2020, 10:21:17 pm 
As you've no doubt found out by now, Painter does not yet allow for layer stack editing via the API. You won't be able to assign the input.

That said, the standard ID mesh map should already be assigned when the smart material is instantiated (assuming it was authored in a scene with a preview ID map)? Standard mesh maps shouldn't need manual assigned to Smart Materials inputs I don't think. Is this some other expected resource residing in the project, that is not the standard ID Mesh Map?

7
Looking at this issue again.. The workaround doesn't seem to work. The directory must first exist for the file to be written, so creating a temp file and deleting doesn't seem to be an option.

Code: [Select]
QDir doesn't seem to be exposed via the API, at least that I can find. Is it?

I've also tried
Code: [Select]
subprocess.check_call(mkdir) which interesting doesn't seem to work either. If I change the command to `explorer`and provide an existing path, the command works. It's only the
Code: [Select]
mkdir command failing.

8
Sorry for the super late response.
I wouldn't want to have to tag assets manually via the shelf window though. Ideally we could set some meta-data on the asset itself, in the event it's a substance. The user data field is already stuffed with painter specific metadata, maybe that's an option?

The concern about delegating the filtering to the shelf.ini... That would only work in situations where the painter environment and shelf.ini were under complete control of the pipeline.

For external locations or manually managed shelves, an .ini filter wouldn't be sufficient I would image. Someone could load the library, and view deprecated assets if they didn't setup filters properly or at all.

If the plugin API could manage shelf filters on application startup, that would make shelf.ini based filtering more appealing, and we could actually stuff the metadata where ever we wanted

9
Ah, so I might be on an older version of Painter. I'll have to test my file in a newer version.
Thanks!

10
Regarding..
Quote
retrieve the resolved output path to the file via sbsrender.
SBSRender does actually output a useful dictionary of information on each graph's rendered output files, including the output identifier and absolute path of the rendered image. I parse that out of StdOut after a successful render process and convert that to a dictionary as necessary for post processing or daisy-chaining into another substance.

I also do path resolving prior to execution, where I can pre-compute "anticipated" output names from a configured SBSrender wrapper object. That is useful as you said.. where you can validate naming tokens on the fly, and display a mapped output name to a user in some UI.

11
Thanks NevTD. I was afraid that those were the only available options, but was hoping to be surprised with more :)

This seems to not reflect and support what user's are use to outputting in Designer.
For now, I'll have to catch and rename those output files in code, but that doesn't seem ideal

12
Is there a full list of supported output name tokens for SBSRender?
Designer supports more output attribute tokens for example:
Code: [Select]
$(graph)_$(label)
While SBSRender seems to take only the
Code: [Select]
OutputNodeName

13
Beautiful! Thanks a lot NevTD.

14
Is it possible to get and set the output size mode for a given node? The $outputsize seems to imply that 0,0 is relative, but I don't know to what (the graph or the input).

My goal, is to iterate over all or selected bitmaps, and set them to "relative to parent"

15
Is this officially supported in Painter? I see a parameter preset combobox in Painter, however in my test, the parameters aren't actually being updated in Painter when I change the selected preset.

I know the preset is set successfully in the .sbs file (snippet below), but I'm unsure about the SBSAR contents ATM or how Painter is handling those settings.
Code: [Select]
      <sbspresets>
        <sbspreset>
          <label v="Up"/>
          <presetinputs>
            <presetinput>
              <uid v="1240531352"/>
              <identifier v="Normal_Direction"/>
              <paramValue>
                <constantValueFloat1 v="0"/>
              </paramValue>
              <type v="256"/>
            </presetinput>
          </presetinputs>
        </sbspreset>
        <sbspreset>
          <label v="Down"/>
          <presetinputs>
            <presetinput>
              <uid v="1240531352"/>
              <identifier v="Normal_Direction"/>
              <paramValue>
                <constantValueFloat1 v="1"/>
              </paramValue>
              <type v="256"/>
            </presetinput>
          </presetinputs>
        </sbspreset>
      </sbspresets>

Pages: [1] 2 3 ... 8