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.


Topics - Bradford Smith

Pages: [1] 2 3
1
Are the exposed JS / Qt libraries capable of create OS folders? I need to create a number of sub-directories off my asset level directory in a plugin

2
I'm finding that I need to hide / deprecate content in a shelf to keep it from moving forward in new assets, but I also need it around for resource update / clean / compact operations.

This would be similar to "hide in library" in Designer, but in Painter it would need to be configured independently of that particular attribute.

3
I'm stuck trying to replace dependencies. I'm creating permutations of template graphs, and I need to replace the dependency and update it's associated comp node instances with the correct graph path.

I first create my new dependency with
Code: [Select]
sbs_doc.createDependency(new_dependency_path)
Then I update references using
Code: [Select]
sbs_doc.declareDependencyUIDChanged(dependency.mUID, new_dependency.mUID)
I can query for dependent nodes using
Code: [Select]
sbs_doc.getAllReferencesOnDependency(dependency) but I can't figure out how to update the path to the graph.

My comp node instance looks something like this:

Code: [Select]
<path v="pkg:///Old_Graph?dependency=1348955762"/>
but I need to update to something like this:
Code: [Select]
<path v="pkg:///New_Graph?dependency=1348955762"/>

4
I have a number of use cases in painter, where I need to set some blend modes by default for certain types of base materials. These are usually modes specific to well defined user channels. Without the ability to do so, implementations often don't get set or set properly, resulting in un-intended results or bugs

Can the user data input in designer be utilized to specify a default Painter blend mode for a given output?

Example.. on an output node in Designer, the user data could have an expression:
(blend_mode=["Sadd"])

5
Is it possible to query for the user channel assignment for a given channel identifier?

Problem:
I'm needing to validate that a standard channel "heat" is assigned to userX.

Actual Issue:
I actually don't WANT to have to validate it however since materials and tools don't rely on hard coded user index assignments. They supply I/O by using the defined names, like "heat". But I'm still reliant on needing hard coded user index assignments because of the following two limitations that I'm aware of:
  • I'm auto disabling channels in materials, tools,  etc using the userData string parameter. Since it does NOT take into account the string identifier when it enables / disables, I'm stuck with need to hard code user channel index assignments instead of supplying a list of string literal names
  • The export presets also don't work with generically named identifiers. They always expect "heat" to be in a certain user channel

6
I'm needing to get information on the exported texture resolution, per texture set (since each texture set has it's own output size property). That however, doesn't seem to be a property of the maps object returned by the engine via onExportFinished(), and I don't see any other way to query that info.

The current texture set isn't a guarantee, since the exported size may be different.

Is it possible to get that info from the API currently?

7
Is there any information on making the AlgDialog modal? I need to pause the script execution and prompt and wait for user feedback to branch the logic. The
Code: [Select]
modality: Qt.ApplicationModal doesn't seem to be working as expected

8
I'm finding that for complex plugins, I'm often doing the following to debug scope and async issues...

I configure plugins with both a debugMode and stackTrace which print various values and function calls to the console for debugging. I'd love to be able to configure verbosity levels and set additional colors in the output console. I could subclass the logger now, and add my own levels that rely on some global value, but I can't seem to set the color of the particular line or substring in the console output.. or can I?

Ideally, I'd want to colorize things differently: signal emissions, method calls, etc

9
Is there a way I can query for the number of times that a resource is referenced by the project? Certain resources are meant to have only 1 instance in the layer stack, and I need to check the number of times the resource is instanced in the stack.

Thanks!

10
I'm currently logging multiple project issues, and would like to update the current layer selection based on it's path / uid in order to better the user toward the issue. Is that possible at this time?

11
I'm not finding anything in the API docs.. Is there a way I can query for the template used to create a file? I need to ensure that the file was created with a template, and then run checks based on that template used.

12
I don't suppose it's possible to get the resolution of a bitmap resource? I need to be able to detect resolution incompatibility in a project (mesh maps are 1k, but the texture set it 2k).

13
I'm updating a plugin to support AlgWidgets 2.0, and I've started getting binding loop errors in the log when using "Layout.fillWidth = true" with AlgToggleButton

Code: [Select]
RowLayout {
    AlgToggleButton {
        id: toggle_Limit
        text: "Limit Slider"
        toggled: true
        Layout.fillWidth: true
        onClicked: ui_set_kelvin_limit()
    }
    AlgToggleButton {
        id: toggle_sRGB
        text: "sRGB Color"
        toggled: true
        Layout.fillWidth: true
        onClicked: update_internals()
    }
}

Code: [Select]
[Script] file:///C:/Program Files/Allegorithmic/Substance Painter/qml/AlgWidgets.2/AlgPushButton.qml:123:5: QML Image: Binding loop detected for property "controlPreferredHeight"
[Script] file:///C:/Users/.../Documents/Allegorithmic/Substance Painter/plugins/Kelvin Color/plugin/dock.qml:70:17: QML AlgToggleButton: Binding loop detected for property "implicitHeight"

14
Substance PainterSubstance Painter - Scripting - Write JSON File to Disk
 on: August 20, 2018, 03:48:17 pm 
Is there a way to write a json file to disk, without using subprocess and / or xmlHttpRequest?

15
I'm needing the full local filepath of all imported resources, and I tried using the fileIO.urlToLocalFile method.. however it doesn't seem to be working with those resource urls.
  • Which kind of object / url attribute is it expecting?
  • Is there any other way to get the local path, including file extension, of imported resources?

Pages: [1] 2 3