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 - Melissa Wiederrecht 0

Pages: [1]
I'm no substance expert, but my gut tells me that is beyond the capabilities of substance.  I can imagine making it work in Processing.

Hey, @NevTD!

Thanks so much for the reply!  Yes, you understood what I am after perfectly.  I am making filters that will take in a jpg and spit out another seamless jpg.  So yes, as you put it, I will "add a bitmap, connect it to the transform node and then render the output".  Exactly.

Ok the steps you outlined at the bottom appear to be exactly what I needed to know.  I couldn't seem to figure out the difference between baking, cooking, and rendering, lol, and also I didn't realize I needed to save an sbsar file first.  I will try that.  Thanks again!!!

So sorry about the rookie question, but I've been staring at the python api docs for hours and can't seem to figure out how to do a simple thing:  SAVE the (one and only) output node 2d bitmap as a jpg.  I have a reference to the correct node in my code, have made all the changes I need via code, and I want to save the output.  Help. ;)  In case it helps you understand where I am at, here is my code (yes, adapted from a demo):

Code: [Select]
import os
import glob
from pysbs import sbsenum
from pysbs import context
from pysbs import substance
from pysbs import batchtools

aContext = context.Context()

xOffset = [150, 0, 0]
yOffset = [0, 150, 0]
initPos = [0, 0, 0]

# Open a sbs file
sbsDoc = substance.SBSDocument(aContext, FILE_PATH)

aGraph = sbsDoc.getSBSGraph(aGraphIdentifier='graphid')

# Retrieve bitmaps
aPathInputs = sbsDoc.mDirAbsPath + os.path.sep
aListInputs = glob.glob(aPathInputs+"*.jpg")

for x in range(0, len(aListInputs)):
    # Create a Bitmap node
    aBitmapNode = aGraph.createBitmapNode(aSBSDocument=sbsDoc,
                                            aGUIPos=[y * x for y in yOffset],

    aId = aListInputs[x][aListInputs[x].rfind(os.path.sep)+1:-4]

    trans2dnode = aGraph.getAllFiltersOfKind(sbsenum.FilterEnum.TRANSFORMATION)[0]

    output = aGraph.getGraphOutputs()[0]

Pages: [1]