Skip to content

Commit

Permalink
Fix Issue BearKidsTeam#3: explicity set the File Write Mode for files…
Browse files Browse the repository at this point in the history
… saved with Virtools 3.0+
  • Loading branch information
tomysshadow committed Mar 16, 2023
1 parent c0310c6 commit a8ebedd
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 a8ebedd

Please sign in to comment.