mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 21:13:04 +02:00
452e0695f4
So, scene editing was interesting (and by interesting I mean excruciating). I almost implemented 'manipulator' visuals (ala 3dsmax for example), and used 3 modes for controlling position/rotation/size, but in a 2D editing, it felt clunky, so I defaulted back to simply click-and-drag for movement, and then took a similar though slightly different looking approach for handling scaling and reszing. I also added a number of menu item helpers related to positioning, scaling, rotating, flipping, and resetting the transform back to default. There is also a new 'transform' dialog (accessible via menu) which will allow you to manually edit every single transform variable of a scene item directly if desired. If a scene item does not have bounds active, pulling on the sides of a source will cause it to resize it via base scale rather than by the bounding box system (if the source resizes that scale will apply). If bounds are active, it will modify the bounding box only instead. How a source scales when a bounding box is active depends on the type of bounds being used. You can set it to scale to the inner bounds, the outer bounds, scale to bounds width only, scale to bounds height only, and a setting to stretch to bounds (which forces a source to always draw at the bounding box size rather than be affected by its internal size). You can also set it to be used as a 'maximum' size, so that the source doesn't necessarily get scaled unless it extends beyond the bounds. Like in OBS1, objects will snap to the edges unless the control key is pressed. However, this will now happen even if the object is rotated or oriented in any strange way. Snapping will also occur when stretching or changing the bounding box size.
128 lines
2.5 KiB
CMake
128 lines
2.5 KiB
CMake
project(obs)
|
|
|
|
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/libobs")
|
|
|
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|
set(_lib_suffix 64)
|
|
else()
|
|
set(_lib_suffix 32)
|
|
endif()
|
|
|
|
if(DEFINED ENV{QTDIR${_lib_suffix}})
|
|
list(APPEND CMAKE_PREFIX_PATH "$ENV{QTDIR${_lib_suffix}}")
|
|
elseif(DEFINED ENV{QTDIR})
|
|
list(APPEND CMAKE_PREFIX_PATH "$ENV{QTDIR}")
|
|
endif()
|
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR TRUE)
|
|
set(CMAKE_AUTOMOC TRUE)
|
|
|
|
find_package(Qt5Widgets REQUIRED)
|
|
find_package(Qt5Network REQUIRED)
|
|
|
|
if(WIN32)
|
|
set(obs_PLATFORM_SOURCES
|
|
platform-windows.cpp)
|
|
elseif(APPLE)
|
|
set(obs_PLATFORM_SOURCES
|
|
platform-osx.mm)
|
|
|
|
find_package(AppKit REQUIRED)
|
|
set(obs_PLATFORM_LIBRARIES ${AppKit_LIBRARIES})
|
|
|
|
add_definitions(-fobjc-arc)
|
|
elseif(UNIX)
|
|
find_package(Qt5X11Extras REQUIRED)
|
|
|
|
set(obs_PLATFORM_SOURCES
|
|
platform-x11.cpp)
|
|
|
|
find_package(X11)
|
|
include_directories(${X11_INCLUDE_DIRS} ${X11_Xinerama_INCLUDE_PATH})
|
|
|
|
if(NOT X11_Xinerama_FOUND)
|
|
message(FATAL_ERROR "Xinerama not found!")
|
|
endif()
|
|
|
|
set(obs_PLATFORM_LIBRARIES
|
|
${X11_LIBRARIES}
|
|
${X11_Xinerama_LIB}
|
|
Qt5::X11Extras)
|
|
endif()
|
|
|
|
set(obs_SOURCES
|
|
${obs_PLATFORM_SOURCES}
|
|
obs-app.cpp
|
|
window-basic-main.cpp
|
|
window-basic-settings.cpp
|
|
window-basic-properties.cpp
|
|
window-basic-source-select.cpp
|
|
window-basic-transform.cpp
|
|
window-basic-preview.cpp
|
|
window-namedialog.cpp
|
|
window-log-reply.cpp
|
|
properties-view.cpp
|
|
volume-control.cpp
|
|
qt-wrappers.cpp)
|
|
|
|
set(obs_HEADERS
|
|
obs-app.hpp
|
|
platform.hpp
|
|
window-main.hpp
|
|
window-basic-main.hpp
|
|
window-basic-settings.hpp
|
|
window-basic-properties.hpp
|
|
window-basic-source-select.hpp
|
|
window-basic-transform.hpp
|
|
window-basic-preview.hpp
|
|
window-namedialog.hpp
|
|
window-log-reply.hpp
|
|
properties-view.hpp
|
|
display-helpers.hpp
|
|
volume-control.hpp
|
|
qt-display.hpp
|
|
qt-wrappers.hpp)
|
|
|
|
set(obs_UI
|
|
forms/NameDialog.ui
|
|
forms/OBSLogReply.ui
|
|
forms/OBSBasic.ui
|
|
forms/OBSBasicTransform.ui
|
|
forms/OBSBasicSettings.ui
|
|
forms/OBSBasicSourceSelect.ui
|
|
forms/OBSBasicProperties.ui)
|
|
|
|
set(obs_QRC
|
|
forms/obs.qrc)
|
|
|
|
qt5_wrap_ui(obs_UI_HEADERS ${obs_UI})
|
|
qt5_add_resources(obs_QRC_SOURCES ${obs_QRC})
|
|
|
|
add_executable(obs WIN32
|
|
${obs_SOURCES}
|
|
${obs_HEADERS}
|
|
${obs_UI_HEADERS}
|
|
${obs_QRC_SOURCES})
|
|
|
|
if(WIN32)
|
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|
set(_output_suffix "64")
|
|
else()
|
|
set(_output_suffix "32")
|
|
endif()
|
|
|
|
set_target_properties(obs
|
|
PROPERTIES
|
|
OUTPUT_NAME "obs${_output_suffix}")
|
|
endif()
|
|
|
|
target_link_libraries(obs
|
|
libobs
|
|
Qt5::Widgets
|
|
Qt5::Network
|
|
${obs_PLATFORM_LIBRARIES})
|
|
|
|
install_obs_core(obs)
|
|
install_obs_data(obs ../build/data/obs-studio obs-studio)
|
|
|