Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev] no-ui setting. #2056

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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();
}
Loading