drop bsz file in cwd and render image in cwd
This commit is contained in:
parent
3768f7f73a
commit
a404054c48
10
README.md
10
README.md
@ -8,9 +8,13 @@ Watch folder for images and flip them
|
||||
|
||||
```
|
||||
joomer-efsw-bsz-monitoring
|
||||
- drag and drop bszs into the test folder
|
||||
- drag and drop bszs into the current directory (same folder as exe file)
|
||||
- rendered image will be saved in the current directory as well
|
||||
```
|
||||
|
||||
# TODO
|
||||
- make it work for linux version
|
||||
|
||||
# Build
|
||||
```
|
||||
learndir/
|
||||
@ -81,10 +85,6 @@ curl -LO https://raw.githubusercontent.com/nothings/stb/master/stb_image.h
|
||||
curl -LO https://raw.githubusercontent.com/nothings/stb/master/stb_image_write.h
|
||||
msbuild joomer-efsw-bsz-monitoring.vcxproj /p:Configuration=release
|
||||
|
||||
# create test folder to put images in
|
||||
mkdir x64\release\test
|
||||
mkdir x64\release\renders
|
||||
|
||||
# run
|
||||
x64\release\joomer-efsw-bsz-monitoring.exe
|
||||
```
|
||||
|
||||
@ -173,9 +173,8 @@ void do_sync_render(std::string fileToRender)
|
||||
}
|
||||
|
||||
// 2. Setup the output path using a relative path that goes OUTSIDE 'test'
|
||||
// This assumes your 'renders' folder is in x64/release/renders
|
||||
dl::bella_sdk::Node pathNode = engine.scene().createNode("outputImagePath");
|
||||
pathNode["dir"] = dl::String("./renders/");
|
||||
pathNode["dir"] = dl::String(".");
|
||||
pathNode["name"] = dl::String("render_result");
|
||||
pathNode["ext"] = dl::String(".png");
|
||||
|
||||
@ -192,7 +191,7 @@ void do_sync_render(std::string fileToRender)
|
||||
}
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1000)); // Give Windows time to finish the file write
|
||||
std::cout << ">>> RENDER FINISHED. Check x64/release/renders/" << std::endl;
|
||||
std::cout << ">>> RENDER FINISHED. Saved in current directory" << std::endl;
|
||||
}
|
||||
|
||||
void render_thread(dl::bella_sdk::Engine& engine, MyEngineObserver& engineObserver, std::string selected_name) {
|
||||
@ -360,7 +359,7 @@ int main( int argc, char** argv ) {
|
||||
fileWatcher.watch();
|
||||
|
||||
/// add a watch to the system
|
||||
handleWatchID( fileWatcher.addWatch( CurPath + "test", ul, true ) );
|
||||
handleWatchID( fileWatcher.addWatch( CurPath , ul, true ) );
|
||||
|
||||
} else {
|
||||
if ( fileWatcher.addWatch( path, ul, true ) > 0 ) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user