diff --git a/data/rofi/rofiworlds/loop.json b/data/rofi/rofiworlds/loop1.json similarity index 100% rename from data/rofi/rofiworlds/loop.json rename to data/rofi/rofiworlds/loop1.json diff --git a/data/rofi/rofiworlds/pick1.json b/data/rofi/rofiworlds/pick1.json new file mode 100644 index 0000000000000000000000000000000000000000..c08c808bc0c6ff9c17d88acc1dea95bd0f32349b --- /dev/null +++ b/data/rofi/rofiworlds/pick1.json @@ -0,0 +1,256 @@ +{ + "modules" : [ + { + "alpha" : 0, + "beta" : 0, + "gamma" : 0, + "id" : 0, + "type" : "universal" + }, + { + "alpha" : 0, + "beta" : 0, + "gamma" : -0, + "id" : 5, + "type" : "universal" + }, + { + "alpha" : 0, + "beta" : 0, + "gamma" : -0, + "id" : 6, + "type" : "universal" + }, + { + "alpha" : 0, + "beta" : -42, + "gamma" : -0, + "id" : 9, + "type" : "universal" + }, + { + "alpha" : 0, + "beta" : 90, + "gamma" : 0, + "id" : 3, + "type" : "universal" + }, + { + "alpha" : 0, + "beta" : 0, + "gamma" : 90, + "id" : 7, + "type" : "universal" + }, + { + "alpha" : 0, + "beta" : 0, + "gamma" : -0, + "id" : 42, + "type" : "universal" + }, + { + "alpha" : -90, + "beta" : 0, + "gamma" : -0, + "id" : 8, + "type" : "universal" + }, + { + "alpha" : 0, + "beta" : 90, + "gamma" : 0, + "id" : 10, + "type" : "universal" + }, + { + "alpha" : 0, + "beta" : 0, + "gamma" : 0, + "id" : 2, + "type" : "universal" + }, + { + "alpha" : 0, + "beta" : 0, + "gamma" : 31, + "id" : 1, + "type" : "universal" + }, + { + "alpha" : 0, + "beta" : 0, + "gamma" : -0, + "id" : 4, + "type" : "universal" + } + ], + "spaceJoints" : [ + { + "point" : [ + -1.47725, + 0.645358, + 1.03008 + ], + "joint" : { + "type" : "rigid", + "sourceToDestination" : [ + [ + 1, + -2.71465e-07, + -1.30124e-07, + 0 + ], + [ + -2.82768e-08, + -0.515038, + 0.857167, + 0 + ], + [ + -2.9971e-07, + -0.857167, + -0.515038, + 0 + ], + [ + 0, + 0, + 0, + 1 + ] + ], + "positions" : [ + + ] + }, + "to" : { + "component" : 0, + "id" : 42 + } + } + ], + "moduleJoints" : [ + { + "from" : { + "id" : 1, + "connector" : "B+X" + }, + "to" : { + "id" : 42, + "connector" : "B-Z" + }, + "orientation" : "North" + }, + { + "from" : { + "id" : 2, + "connector" : "B-Z" + }, + "to" : { + "id" : 1, + "connector" : "B-X" + }, + "orientation" : "North" + }, + { + "from" : { + "id" : 0, + "connector" : "B+X" + }, + "to" : { + "id" : 42, + "connector" : "A-X" + }, + "orientation" : "North" + }, + { + "from" : { + "id" : 4, + "connector" : "B+X" + }, + "to" : { + "id" : 42, + "connector" : "B-X" + }, + "orientation" : "South" + }, + { + "from" : { + "id" : 3, + "connector" : "A-Z" + }, + "to" : { + "id" : 1, + "connector" : "A+X" + }, + "orientation" : "South" + }, + { + "from" : { + "id" : 5, + "connector" : "A+X" + }, + "to" : { + "id" : 0, + "connector" : "B-Z" + }, + "orientation" : "East" + }, + { + "from" : { + "id" : 6, + "connector" : "A-X" + }, + "to" : { + "id" : 7, + "connector" : "B+X" + }, + "orientation" : "West" + }, + { + "from" : { + "id" : 2, + "connector" : "B-X" + }, + "to" : { + "id" : 7, + "connector" : "B-Z" + }, + "orientation" : "East" + }, + { + "from" : { + "id" : 8, + "connector" : "B-Z" + }, + "to" : { + "id" : 42, + "connector" : "A-Z" + }, + "orientation" : "West" + }, + { + "from" : { + "id" : 9, + "connector" : "A-Z" + }, + "to" : { + "id" : 8, + "connector" : "A-Z" + }, + "orientation" : "East" + }, + { + "from" : { + "id" : 10, + "connector" : "A+X" + }, + "to" : { + "id" : 8, + "connector" : "B+X" + }, + "orientation" : "West" + } + ] + } \ No newline at end of file diff --git a/data/rofi/rofiworlds/pick2.json b/data/rofi/rofiworlds/pick2.json new file mode 100644 index 0000000000000000000000000000000000000000..341db1c6a61b2cbae05ce356cd83051377507503 --- /dev/null +++ b/data/rofi/rofiworlds/pick2.json @@ -0,0 +1,234 @@ +{ + "modules" : [ + { + "alpha" : 0, + "beta" : 0, + "gamma" : -0, + "id" : 0, + "type" : "universal" + }, + { + "alpha" : 0, + "beta" : -58, + "gamma" : -151, + "id" : 2, + "type" : "universal" + }, + { + "alpha" : 41, + "beta" : 0, + "gamma" : -151, + "id" : 3, + "type" : "universal" + }, + { + "alpha" : 0, + "beta" : 90, + "gamma" : 0, + "id" : 4, + "type" : "universal" + }, + { + "alpha" : 0, + "beta" : 0, + "gamma" : 0, + "id" : 42, + "type" : "universal" + }, + { + "alpha" : 0, + "beta" : 0, + "gamma" : -0, + "id" : 8, + "type" : "universal" + }, + { + "alpha" : 0, + "beta" : -90, + "gamma" : 0, + "id" : 1, + "type" : "universal" + }, + { + "alpha" : 0, + "beta" : 0, + "gamma" : 0, + "id" : 6, + "type" : "universal" + }, + { + "alpha" : 0, + "beta" : 0, + "gamma" : -0, + "id" : 7, + "type" : "universal" + } + ], + "spaceJoints" : [ + { + "point" : [ + 3.51739, + 0.0103855, + 0 + ], + "joint" : { + "type" : "rigid", + "sourceToDestination" : [ + [ + -1.19209e-07, + -2.98023e-07, + 1, + 0 + ], + [ + 5.96046e-08, + 1, + 3.57628e-07, + 0 + ], + [ + -1, + 0, + -1.78814e-07, + 0 + ], + [ + 0, + 0, + 0, + 1 + ] + ], + "positions" : [ + + ] + }, + "to" : { + "component" : 0, + "id" : 42 + } + }, + { + "point" : [ + 0.00640446, + 0.845423, + 7.10543e-15 + ], + "joint" : { + "type" : "rigid", + "sourceToDestination" : [ + [ + -1, + -1.74846e-07, + 8.74228e-08, + 0 + ], + [ + -8.74228e-08, + -2.08432e-14, + -1, + 0 + ], + [ + 1.74846e-07, + -1, + 5.55774e-15, + 0 + ], + [ + 0, + 0, + 0, + 1 + ] + ], + "positions" : [ + + ] + }, + "to" : { + "component" : 0, + "id" : 2 + } + } + ], + "moduleJoints" : [ + { + "from" : { + "id" : 8, + "connector" : "A-Z" + }, + "to" : { + "id" : 1, + "connector" : "A-Z" + }, + "orientation" : "East" + }, + { + "from" : { + "id" : 0, + "connector" : "A+X" + }, + "to" : { + "id" : 8, + "connector" : "A-X" + }, + "orientation" : "South" + }, + { + "from" : { + "id" : 7, + "connector" : "B-X" + }, + "to" : { + "id" : 0, + "connector" : "B-Z" + }, + "orientation" : "West" + }, + { + "from" : { + "id" : 42, + "connector" : "A-Z" + }, + "to" : { + "id" : 1, + "connector" : "A+X" + }, + "orientation" : "West" + }, + { + "from" : { + "id" : 2, + "connector" : "A-Z" + }, + "to" : { + "id" : 6, + "connector" : "A-Z" + }, + "orientation" : "South" + }, + { + "from" : { + "id" : 4, + "connector" : "A-Z" + }, + "to" : { + "id" : 3, + "connector" : "B-Z" + }, + "orientation" : "South" + }, + { + "from" : { + "id" : 3, + "connector" : "A-Z" + }, + "to" : { + "id" : 6, + "connector" : "A+X" + }, + "orientation" : "West" + } + ] + } \ No newline at end of file diff --git a/src/edit/src/editor.cpp b/src/edit/src/editor.cpp index 9329a0929c18c1ff790d78a42208c07df85e4bb7..7383819e84f5531466f921562cd0e939ca6857a3 100644 --- a/src/edit/src/editor.cpp +++ b/src/edit/src/editor.cpp @@ -406,10 +406,10 @@ void Editor::changeModeI() auto previous_mode = editor_mode_I; /* Contextual change */ - if (keyboard.just_pressed().contains("B")) - editor_mode_I = editor_mode_I == build ? spectate : build; - if (keyboard.just_pressed().contains(";")) - editor_mode_I = editor_mode_I == debug ? spectate : debug; + // if (keyboard.just_pressed().contains("B")) + // editor_mode_I = editor_mode_I == build ? spectate : build; + // if (keyboard.just_pressed().contains(";")) + // editor_mode_I = editor_mode_I == debug ? spectate : debug; /* Independent change */ if (keyboard.down().contains("LeftCtrl")) diff --git a/src/edit/src/scene.cpp b/src/edit/src/scene.cpp index 68e621d11741ee142560ffd15f08fa7578845c2b..e8ec6523c740cd040e00385d9de886336defc612 100644 --- a/src/edit/src/scene.cpp +++ b/src/edit/src/scene.cpp @@ -517,13 +517,15 @@ void Scene::manageSelection(node_ptr nearest_node) if (!nearest_node) { - manageObjectAxes(nullptr); // REMOVE AFTER SHOWCASE + // Uncomment for Debug + // manageObjectAxes(nullptr); selections[0] = nullptr; return; } selections[0] = nearest_node; addSelectionAABB(nearest_node); - manageObjectAxes(selections[0]); // REMOVE AFTER SHOWCASE + // Uncomment for Debug + // manageObjectAxes(selections[0]); } void Scene::manageHighlight(glm::vec3 hit_coord, node_ptr nearest_node) @@ -632,8 +634,8 @@ void Scene::manageCameraAxes(bool enabled) } camera_axes_enabled = enabled; - // TO DO: remove - manageCameraAxesDebug(enabled); + // Uncomment for Debug + // manageCameraAxesDebug(enabled); } void Scene::manageCameraAxesDebug(bool enabled) @@ -668,8 +670,8 @@ void Scene::updateCameraAxesPosition() const auto camera_rotation = active_cameras.front().lock()->getNode()->getRotationMatWorld(); camera_axes->setRotationQuat(glm::inverse(camera_rotation)); - // TO DO: remove - updateCameraAxesDebugPosition(); + // Uncomment for Debug + // updateCameraAxesDebugPosition(); } void Scene::updateCameraAxesDebugPosition() diff --git a/src/gui/src/ui.cpp b/src/gui/src/ui.cpp index 733b68313ae1482869478e949bb317bb515141cf..892be6cabc5d52ac5ff460b77996bc81c1663afc 100644 --- a/src/gui/src/ui.cpp +++ b/src/gui/src/ui.cpp @@ -179,7 +179,7 @@ void rofiworld_menu_ui(const osi::Window &window, edit::UIData &data) data.save_rofiworld_visible = true; } - if (ImGui::MenuItem("Clear##ClearRofiWorldMenuIteM", NULL, false, data.editor_mode_II == edit::mode_II::build)) + if (ImGui::MenuItem("New##NewRofiWorldMenuIteM", NULL, false, data.editor_mode_II == edit::mode_II::build)) { data.start_new_rofiworld_visible = true; }