Skip to content

Commit

Permalink
Fix Issue #3: explicity set the File Write Mode for files saved with …
Browse files Browse the repository at this point in the history
…Virtools 3.0+
  • Loading branch information
tomysshadow authored and yyc12345 committed Mar 22, 2023
1 parent c0310c6 commit 4f2f259
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions BBDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ int BBDecoder(const CKBehaviorContext& behcontext)
DeleteCKObjectArray(array);
throw "fuck";
}

// in files saved with Virtools 3.0+, the Variable Manager setting
// for File Options/Compression is implemented as a File Write Mode, so
// the global File Write Mode defaults back to CKFILE_FORVIEWER, and
// scripts will be hidden
// we correct this by explicity setting the File Write Mode after Loading
ctx->SetFileWriteMode((CK_FILE_WRITEMODE)(ctx->GetFileWriteMode() & ~CKFILE_FORVIEWER));

clock_t c=clock();
for (array->Reset(); !array->EndOfList(); array->Next()) {
CKObject* o = array->GetData(ctx);
Expand Down

0 comments on commit 4f2f259

Please sign in to comment.