Unable to read metadata during the process or Slow?
i trying write metadata hundreds of files @ time. need me able write , read updated metadata in same process.say add last name photo title append first name title. each piece of data operation can set overwrite or append field.
the problem when enclose entire operation inside withwriteaccessdo block. in case if overwrite title field last name , thend in next operation try append first name. problem not updated metadata in title field, returns orginal value!
i can fix putting withwriteaccessdo block inside operation loop during each operations uses new withwriteaccessdo block. way updated metadata can read append correctly. problem meathod takes long time! hours! before in lightroom 2 whole operation take place in under 30 seconds , takes , hour!
so here pusdocode
1 not old data correctly
withwriteaccessdo
each operation
if overwite
write data field
else if append
current filed data
concat old data data added
write new data
end
loop
end withwriteaccessdo
2 works takes long time
for each operation
withwriteaccessdo
if overwite
write data field
else if append
current filed data
concat old data data added
write new data
end
end withwriteaccessdo
loop
anything doing wrong?
lightrooom has been extensively reworked under hood far catalog writes go.
before: writes wrote.
now: writes accumulated in transaction not committed (and hence not accessible) until exiting with-write gate. and,
complete undo info saved every write.
so, effiiciency either:
1) make "to-do" functions
2) save "to-do" info.
then, call these "to-do" functions, or process saved "to-do" info in single write-gate, or in succession of dependent write-gates.
rob
More discussions in Lightroom SDK
adobe
Comments
Post a Comment