Menu

#2 Big problem with dirty propagation

open
Core (2)
8
2005-03-26
2005-03-26
Dan Bethell
No

For some reason dirty attributes at the top of graphs
are not propagating down the tree. For instance in the
following example the scale node (sc) is not detecting
the filein.filename attribute becoming dirty.

--8<---

-- add some nodes
filein = compost:add( "file:in" )
sc = compost:add( "transform:resize" )
sc.scale.value = Vector( 0.5, 0.5 ) -- half scale image
sc.filter.value = "cubic" -- cubic filtering
fileout = compost:add( "file:out" )

-- connect them up
compost:connect( filein.output, sc.input )
compost:connect( sc.output, fileout.input )

-- do some work
for n=1, table.getn( files ) do
filename = files[n] -- a table of filenames
print( "Processing "..filename )
filein.filename.value = filename
fileout.filename.value = "scaled/"..filename
fileout:work()
end

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.