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 - chrisilva3d

Pages: [1]
Hi guys,

I'm having problems to save graphs on which the parameters were created via Python Script.

1 - I'm setting up my parameters values as follows:
Code: [Select]
self.sdGraph.setPropertyAnnotationValueFromId(graphInputTargetSwitch, 'clamp', SDValueBool.sNew(True))
            self.sdGraph.setPropertyAnnotationValueFromId(graphInputTargetSwitch, 'label', SDValueString.sNew('Tint White'))
            self.sdGraph.setPropertyAnnotationValueFromId(graphInputTargetSwitch, 'min', SDValueInt.sNew(1))
            self.sdGraph.setPropertyAnnotationValueFromId(graphInputTargetSwitch, 'max', SDValueInt.sNew(2))
                self.sdGraph.setInputPropertyValueFromId('use_color_match', SDValueInt.sNew(2))
                self.sdGraph.setInputPropertyValueFromId('use_color_match', SDValueInt.sNew(1))

2- Saving my Package as follows:
Code: [Select]
self.sdPackageMgr.savePackageAs(self.sdPackage, packageAbsPath)
3-Then, I publish my new package as SBSAR

4- Once imported the SBSAR, my parameters on Painter are "broken", like this(non-sliders based)

5-However, if I open the package back on Designer and click on its Graph, after the Parameters Tab is loaded, the package identify as there was a changes that needs saving.

6- If I save the "new changes" and publish my SBSAR again. The parameters on Painter looks as expected(sliders based), respecting the constraints defined by code (Min, Max and Clamp).

Seems like there is a step missing on my code, before saving the package. The Editor apparently does apply additional steps on the graph parameters when the parameters tab is loaded.
Is it possible to force open the Parameters Tab by script or something similar?
Do I need to call something else before saving the package? The only process I call before saving is sdgraph.compute()

Many thanks in advance,

Cristiano da Silva


I'm creating my parameters through code and everything is working fine, however, I'm not able to set the Propery Annotation Value of 'editor' to 'color' instead Slider. Everything else I can easily modify.

Code: [Select]
self.sdGraph.setPropertyAnnotationValueFromId(graphInputTargetColor, 'type', SDValueString.sNew('float3'))
            self.sdGraph.setPropertyAnnotationValueFromId(graphInputTargetColor, 'editor', SDValueString.sNew('color'))
            self.sdGraph.setPropertyAnnotationValueFromId(graphInputTargetColor, 'label', SDValueString.sNew('Tint Color'))
            self.sdGraph.setPropertyAnnotationValueFromId(graphInputTargetColor, 'clamp', SDValueBool.sNew(True))
            self.sdGraph.setInputPropertyValueFromId('target_color', SDValueFloat3.sNew(float3(1.0, 1.0, 1.0)))

Any help is very much appreciated.



Is there a way which I can specify filenames for my outputs, when using exportSDGraphOutputs?

The Exporter module doesn't provide a way to do that.

Code: [Select]
def exporter(self, destinationPath):
        #Export the graph's Outputs to the destination folder, as a PSD file
        exportSDGraphOutputs(self.sdGraph, aOutputDir= destinationPath, aFileExt='psd')

Any help is very much appreciated.


Pages: [1]