Skip to content

Commit

Permalink
Merge pull request #2056 from zenustech/uioff-zeno
Browse files Browse the repository at this point in the history
[dev] no-ui setting.
  • Loading branch information
zhouhang95 authored Nov 18, 2024
2 parents 0b3785d + 308b608 commit 035fce8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ endif()
option(ZENO_BUILD_EDITOR "Build ZENO editor" ON)
option(ZENO_BUILD_DESIGNER "Build ZENO designer" OFF)
option(ZENO_BUILD_PLAYER "Build ZENO player" OFF)
option(ZENO_HIDE_UI "Hide Editor UI" OFF)
option(ZENO_MULTIPROCESS "Enable multiprocessing for ZENO" ON)
option(ZENO_IPC_USE_TCP "Use TCP for inter-process communication" ON)
option(ZENO_OUT_TO_BIN "Output all target files to build/bin" ON)
Expand Down
4 changes: 4 additions & 0 deletions ui/zenoedit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ if (ZENO_OPTIX_PROC)
target_compile_definitions(zenoedit PRIVATE -DZENO_OPTIX_PROC)
endif()

if (ZENO_HIDE_UI)
target_compile_definitions(zenoedit PRIVATE -DZENO_HIDE_UI)
endif()

if (ZENO_WIN32_RC)
target_compile_definitions(zenoedit PRIVATE -DZENO_WIN32_RC)
endif()
Expand Down
2 changes: 2 additions & 0 deletions ui/zenoedit/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ int main(int argc, char *argv[])
}
}

#ifndef ZENO_HIDE_UI
ZenoMainWindow mainWindow;
zeno::getSession().eventCallbacks->triggerEvent("editorConstructed");
mainWindow.showMaximized();
Expand All @@ -157,5 +158,6 @@ int main(int argc, char *argv[])
if (!zsgPath.isEmpty())
mainWindow.openFileAndUpdateParam(zsgPath, paramsJson);
}
#endif
return a.exec();
}

0 comments on commit 035fce8

Please sign in to comment.