UI improvement: new icon for patten source

Minor UI improvements in help and menus
This commit is contained in:
Bruno Herbelin
2023-08-16 14:06:16 +02:00
parent a033b74f7f
commit 9ff5b90605
9 changed files with 150 additions and 45 deletions

View File

@@ -552,6 +552,7 @@ set(VMIX_RSC_FILES
./rsc/mesh/icon_video.ply
./rsc/mesh/icon_image.ply
./rsc/mesh/icon_render.ply
./rsc/mesh/icon_pattern.ply
./rsc/mesh/icon_gear.ply
./rsc/mesh/icon_camera.ply
./rsc/mesh/icon_share.ply

Binary file not shown.

122
rsc/mesh/icon_pattern.ply Normal file
View File

@@ -0,0 +1,122 @@
ply
format ascii 1.0
comment Created by Blender 3.4.1 - www.blender.org
element vertex 48
property float x
property float y
property float z
element face 64
property list uchar uint vertex_indices
end_header
-0.095770 0.052446 0.000000
-0.059169 0.098427 0.000000
-0.065370 0.108653 0.000000
-0.002557 0.108653 0.000000
-0.014104 0.098427 0.000000
-0.005498 0.092637 0.000000
0.026488 0.056116 0.000000
-0.081265 0.057541 0.000000
-0.036699 0.057541 0.000000
-0.027736 0.052410 0.000000
0.016705 0.052464 0.000000
0.081407 0.056116 0.000000
0.075188 0.045890 0.000000
0.111806 -0.000110 0.000000
-0.005890 0.012022 0.000000
0.021926 0.040313 0.000000
0.030658 0.045890 0.000000
-0.069184 0.003293 0.000000
-0.081265 0.047333 0.000000
-0.036735 0.047333 0.000000
-0.059169 0.006464 0.000000
-0.014639 0.006464 0.000000
0.052771 0.005003 0.000000
0.097301 0.005003 0.000000
-0.000669 -0.000128 0.000000
0.043772 -0.000074 0.000000
-0.097855 -0.049744 0.000000
-0.061272 -0.003780 0.000000
0.021534 -0.040302 0.000000
0.052736 -0.005205 0.000000
0.097301 -0.005205 0.000000
0.081407 -0.056318 0.000000
-0.016207 -0.003780 0.000000
-0.007600 -0.009552 0.000000
-0.083368 -0.044631 0.000000
-0.038784 -0.044631 0.000000
0.030141 -0.046092 0.000000
0.075206 -0.046092 0.000000
-0.029839 -0.049779 0.000000
0.014620 -0.049726 0.000000
-0.007992 -0.090167 0.000000
0.022764 -0.056318 0.000000
-0.067473 -0.105969 0.000000
-0.083368 -0.054857 0.000000
-0.038820 -0.054857 0.000000
-0.061254 -0.095743 0.000000
-0.016724 -0.095743 0.000000
-0.004981 -0.105969 0.000000
3 0 1 2
3 1 3 2
3 1 4 3
3 4 5 3
3 5 6 3
3 0 7 1
3 8 5 4
3 8 9 5
3 10 6 5
3 0 8 7
3 0 9 8
3 10 11 6
3 10 12 11
3 12 13 11
3 14 15 10
3 15 16 10
3 16 12 10
3 17 18 0
3 18 9 0
3 18 19 9
3 19 14 9
3 17 20 18
3 21 14 19
3 15 22 16
3 23 13 12
3 14 24 15
3 25 22 15
3 21 24 14
3 17 21 20
3 17 24 21
3 25 23 22
3 25 13 23
3 26 27 17
3 27 24 17
3 28 29 25
3 29 13 25
3 29 30 13
3 30 31 13
3 27 32 24
3 32 33 24
3 33 28 24
3 26 34 27
3 35 33 32
3 28 36 29
3 37 31 30
3 35 38 33
3 39 28 33
3 39 36 28
3 26 35 34
3 26 38 35
3 39 37 36
3 39 31 37
3 40 41 39
3 41 31 39
3 42 43 26
3 43 38 26
3 43 44 38
3 44 40 38
3 42 45 43
3 46 40 44
3 40 47 41
3 46 47 40
3 42 46 45
3 42 47 46

View File

@@ -448,8 +448,10 @@ Symbol::Symbol(Type t, glm::vec3 pos) : Node(), type_(t)
shadows[RENDER] = shadow;
icons[GROUP] = new Mesh("mesh/icon_group_vimix.ply");
shadows[GROUP] = shadow;
icons[PATTERN] = new Mesh("mesh/icon_gear.ply");
icons[PATTERN] = new Mesh("mesh/icon_pattern.ply");
shadows[PATTERN]= shadow;
icons[GEAR] = new Mesh("mesh/icon_gear.ply");
shadows[GEAR] = shadow;
icons[CAMERA] = new Mesh("mesh/icon_camera.ply");
shadows[CAMERA] = shadow;
icons[SCREEN] = new Mesh("mesh/icon_cube.ply");

View File

@@ -60,7 +60,7 @@ protected:
class Symbol : public Node
{
public:
typedef enum { CIRCLE_POINT = 0, SQUARE_POINT, IMAGE, SEQUENCE, VIDEO, SESSION, CLONE, RENDER, GROUP, PATTERN, CAMERA, SCREEN, SHARE, RECEIVE,
typedef enum { CIRCLE_POINT = 0, SQUARE_POINT, IMAGE, SEQUENCE, VIDEO, SESSION, CLONE, RENDER, GROUP, PATTERN, GEAR, CAMERA, SCREEN, SHARE, RECEIVE,
DOTS, BUSY, LOCK, UNLOCK, EYE, EYESLASH, TELEVISION, ARROWS, ROTATION, CROP, CIRCLE, SQUARE, CLOCK, CLOCK_H, GRID, CROSS, EMPTY } Type;
Symbol(Type t, glm::vec3 pos = glm::vec3(0.f));
~Symbol();

View File

@@ -30,7 +30,7 @@
#include "RenderSource.h"
std::vector< std::tuple<int, int, std::string> > RenderSource::ProvenanceMethod = {
{ 16, 12, "Loopback" }, { 15, 12, "Non-recursive"}
{ 16, 12, "Recursive" }, { 15, 12, "Non-recursive"}
};
RenderSource::RenderSource(uint64_t id) : Source(id), session_(nullptr), runtime_(0), rendered_output_(nullptr), rendered_surface_(nullptr),

View File

@@ -19,7 +19,7 @@
#define ICON_SOURCE_DEVICE 2, 14
#define ICON_SOURCE_SEQUENCE 3, 9
#define ICON_SOURCE_NETWORK 18, 11
#define ICON_SOURCE_PATTERN 11, 5
#define ICON_SOURCE_PATTERN 5, 3
#define ICON_SOURCE_SESSION 19, 6
#define ICON_SOURCE_GROUP 10, 6
#define ICON_SOURCE_RENDER 19, 1

View File

@@ -2357,60 +2357,41 @@ void UserInterface::RenderHelp()
ImGui::SetColumnWidth(0, width_column0);
ImGui::PushTextWrapPos(width_window );
ImGui::Text(ICON_FA_PHOTO_VIDEO); ImGui::NextColumn();
ImGuiToolkit::PushFont(ImGuiToolkit::FONT_BOLD); ImGui::Text("File");ImGui::PopFont();
ImGui::NextColumn();
ImGuiToolkit::Icon(ICON_SOURCE_VIDEO); ImGui::SameLine(0, IMGUI_SAME_LINE);ImGui::Text("Video"); ImGui::NextColumn();
ImGui::Text ("Video file (*.mpg, *mov, *.avi, etc.).");
ImGui::Text ("Video file (*.mpg, *mov, *.avi, etc.). Decoding can be optimized with hardware acceleration.");
ImGui::NextColumn();
ImGuiToolkit::Icon(ICON_SOURCE_IMAGE); ImGui::SameLine(0, IMGUI_SAME_LINE);ImGui::Text("Image"); ImGui::NextColumn();
ImGui::Text ("Image file (*.jpg, *.png, etc.) or vector graphics (*.svg).");
ImGui::NextColumn();
ImGuiToolkit::Icon(ICON_SOURCE_SESSION); ImGui::SameLine(0, IMGUI_SAME_LINE);ImGui::Text("Session"); ImGui::NextColumn();
ImGui::Text ("Render a session (*.mix) as a source.");
ImGui::NextColumn();
ImGui::Separator();
ImGui::Text(ICON_FA_IMAGES); ImGui::NextColumn();
ImGuiToolkit::PushFont(ImGuiToolkit::FONT_BOLD); ImGui::Text("Sequence");ImGui::PopFont();
ImGui::Text ("Render a session (*.mix) as a source. Recursion is limited.");
ImGui::NextColumn();
ImGuiToolkit::Icon(ICON_SOURCE_SEQUENCE); ImGui::SameLine(0, IMGUI_SAME_LINE);ImGui::Text("Sequence"); ImGui::NextColumn();
ImGui::Text ("Set of images numbered sequentially (*.jpg, *.png, etc.).");
ImGui::NextColumn();
ImGui::Separator();
ImGui::Text(ICON_FA_PLUG); ImGui::NextColumn();
ImGuiToolkit::PushFont(ImGuiToolkit::FONT_BOLD); ImGui::Text("Connected");ImGui::PopFont();
ImGui::NextColumn();
ImGuiToolkit::Icon(ICON_SOURCE_DEVICE); ImGui::SameLine(0, IMGUI_SAME_LINE);ImGui::Text("Device"); ImGui::NextColumn();
ImGui::Text ("Connected webcam or frame grabber.");
ImGuiToolkit::Icon(ICON_SOURCE_RENDER); ImGui::SameLine(0, IMGUI_SAME_LINE);ImGui::Text("Loopback"); ImGui::NextColumn();
ImGui::Text ("Loopback the rendering output as a source, with or without recursion.");
ImGui::NextColumn();
ImGuiToolkit::Icon(ICON_SOURCE_DEVICE_SCREEN); ImGui::SameLine(0, IMGUI_SAME_LINE);ImGui::Text("Screen"); ImGui::NextColumn();
ImGui::Text ("Screen capture of the entire screen or a selected window.");
ImGui::NextColumn();
ImGuiToolkit::Icon(ICON_SOURCE_DEVICE); ImGui::SameLine(0, IMGUI_SAME_LINE);ImGui::Text("Device"); ImGui::NextColumn();
ImGui::Text ("Connected webcam or frame grabber. Highest resolution and framerate automatically selected.");
ImGui::NextColumn();
ImGuiToolkit::Icon(ICON_SOURCE_NETWORK); ImGui::SameLine(0, IMGUI_SAME_LINE);ImGui::Text("Shared"); ImGui::NextColumn();
ImGui::Text ("Connected stream from another vimix in the local network (shared output stream).");
ImGui::Text ("Connected stream from another vimix in the local network (peer-to-peer).");
ImGui::NextColumn();
ImGuiToolkit::Icon(ICON_SOURCE_SRT); ImGui::SameLine(0, IMGUI_SAME_LINE);ImGui::Text("SRT"); ImGui::NextColumn();
ImGui::Text ("Connected Secure Reliable Transport (SRT) stream emitted on the network (e.g. broadcasted by vimix).");
ImGui::NextColumn();
ImGui::Separator();
ImGui::Text(ICON_FA_COG); ImGui::NextColumn();
ImGuiToolkit::PushFont(ImGuiToolkit::FONT_BOLD); ImGui::Text("Generated");ImGui::PopFont();
ImGui::NextColumn();
ImGuiToolkit::Icon(ICON_SOURCE_PATTERN); ImGui::SameLine(0, IMGUI_SAME_LINE);ImGui::Text("Pattern"); ImGui::NextColumn();
ImGui::Text ("Algorithmically generated source; colors, grids, test patterns, timers...");
ImGui::NextColumn();
ImGuiToolkit::Icon(ICON_SOURCE_GSTREAMER); ImGui::SameLine(0, IMGUI_SAME_LINE);ImGui::Text("GStreamer"); ImGui::NextColumn();
ImGui::Text ("Custom gstreamer pipeline, as described in command line for gst-launch-1.0 (without the target sink).");
ImGui::NextColumn();
ImGui::Separator();
ImGui::Text(ICON_FA_SYNC); ImGui::NextColumn();
ImGuiToolkit::PushFont(ImGuiToolkit::FONT_BOLD); ImGui::Text("Internal");ImGui::PopFont();
ImGui::NextColumn();
ImGuiToolkit::Icon(ICON_SOURCE_RENDER); ImGui::SameLine(0, IMGUI_SAME_LINE);ImGui::Text("Loopback"); ImGui::NextColumn();
ImGui::Text ("Loopback the rendering output as a source, with or without recursion.");
ImGui::NextColumn();
ImGuiToolkit::Icon(ICON_SOURCE_CLONE); ImGui::SameLine(0, IMGUI_SAME_LINE);ImGui::Text("Clone"); ImGui::NextColumn();
ImGui::Text ("Clones the frames of a source into another one, and applies a filter on the way.");
ImGui::Text ("Clones the frames of a source into another one and applies a GPU filter.");
ImGui::NextColumn();
ImGuiToolkit::Icon(ICON_SOURCE_GROUP); ImGui::SameLine(0, IMGUI_SAME_LINE);ImGui::Text("Bundle"); ImGui::NextColumn();
ImGui::Text ("Bundles together several sources and renders them as an internal session.");
@@ -3202,7 +3183,7 @@ void Navigator::RenderNewPannel()
clearNewPannel();
}
ImGui::NextColumn();
if (ImGuiToolkit::SelectableIcon( 3, 9, "##SOURCE_SEQUENCE", selected_type[SOURCE_SEQUENCE], iconsize)) {
if (ImGuiToolkit::SelectableIcon( ICON_SOURCE_SEQUENCE, "##SOURCE_SEQUENCE", selected_type[SOURCE_SEQUENCE], iconsize)) {
Settings::application.source.new_type = SOURCE_SEQUENCE;
clearNewPannel();
}
@@ -3212,13 +3193,12 @@ void Navigator::RenderNewPannel()
clearNewPannel();
}
ImGui::NextColumn();
if (ImGuiToolkit::SelectableIcon( 11, 5, "##SOURCE_GENERATED", selected_type[SOURCE_GENERATED], iconsize)) {
if (ImGuiToolkit::SelectableIcon( ICON_SOURCE_PATTERN, "##SOURCE_GENERATED", selected_type[SOURCE_GENERATED], iconsize)) {
Settings::application.source.new_type = SOURCE_GENERATED;
clearNewPannel();
}
ImGui::NextColumn();
ImGui::Columns(1);
ImGui::PopStyleVar();
ImGui::PopFont();
@@ -3232,7 +3212,7 @@ void Navigator::RenderNewPannel()
static DialogToolkit::OpenMediaDialog fileimportdialog("Open Media");
static DialogToolkit::OpenFolderDialog folderimportdialog("Select Folder");
ImGui::Text("Load media or session file:");
ImGui::Text("Video, image & session files");
// clic button to load file
if ( ImGui::Button( ICON_FA_FOLDER_OPEN " Open", ImVec2(ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN, 0)) )
@@ -3424,7 +3404,7 @@ void Navigator::RenderNewPannel()
}
}
// Folder Source creator
// Sequence Source creator
else if (Settings::application.source.new_type == SOURCE_SEQUENCE){
static DialogToolkit::MultipleImagesDialog _selectImagesDialog("Select multiple images");
@@ -3432,7 +3412,7 @@ void Navigator::RenderNewPannel()
static MultiFileRecorder _video_recorder;
static int _fps = 25;
ImGui::Text("Create image sequence:");
ImGui::Text("Image sequence");
// clic button to load file
if ( ImGui::Button( ICON_FA_FOLDER_OPEN " Open multiple", ImVec2(ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN, 0)) ) {
@@ -3566,11 +3546,12 @@ void Navigator::RenderNewPannel()
}
// Generated patterns Source creator
else if (Settings::application.source.new_type == SOURCE_GENERATED){
bool update_new_source = false;
ImGui::Text("Generate graphic patterns:");
ImGui::Text("Patterns & generated graphics");
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
if (ImGui::BeginCombo("##Pattern", "Select", ImGuiComboFlags_HeightLarge))
@@ -3657,10 +3638,10 @@ void Navigator::RenderNewPannel()
}
}
}
// External source creator
// Input and connected source creator
else if (Settings::application.source.new_type == SOURCE_CONNECTED){
ImGui::Text("Input device or stream:");
ImGui::Text("Input devices & streams");
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
if (ImGui::BeginCombo("##ExternalConnected", "Select "))
@@ -3813,10 +3794,10 @@ void Navigator::RenderNewPannel()
if (custom_screencapture) {
ImGui::Text("\nWindow:");
ImGui::Text("\nScreen Capture:");
ImGui::SetNextItemWidth(IMGUI_RIGHT_ALIGN);
if (ImGui::BeginCombo("##ScreenCaptureSelect", "Select ", ImGuiComboFlags_HeightLarge))
if (ImGui::BeginCombo("##ScreenCaptureSelect", "Select window", ImGuiComboFlags_HeightLarge))
{
for (int d = 0; d < ScreenCapture::manager().numWindow(); ++d){
std::string namewin = ScreenCapture::manager().name(d);

View File

@@ -77,8 +77,7 @@ public:
SOURCE_FILE = 0,
SOURCE_SEQUENCE,
SOURCE_CONNECTED,
SOURCE_GENERATED,
SOURCE_TYPES
SOURCE_GENERATED
} NewSourceType;
Navigator();