Chargez un fichier .blend
diff --git a/src/renderer/scripts/App.js b/src/renderer/scripts/App.js
index 11b8282..d86f9f9 100644
--- a/src/renderer/scripts/App.js
+++ b/src/renderer/scripts/App.js
@@ -309,6 +309,7 @@ const App = {
str_output_path: App.str_output_path,
list_cameras: CameraList.list_cameras,
list_collections: CollectionList.list_collections,
+ is_skip_collections: CollectionList.is_skip_collections,
obj_render_settings: RenderSettings.get_settings(),
};
@@ -375,9 +376,15 @@ const App = {
obj_badge.textContent = String(obj_config.list_cameras.length);
}
+ if (obj_config.is_skip_collections !== undefined) {
+ CollectionList.is_skip_collections = obj_config.is_skip_collections;
+ document.getElementById("check_skip_collections").checked = obj_config.is_skip_collections;
+ }
+
if (obj_config.list_collections && obj_config.list_collections.length > 0) {
CollectionList.list_collections = obj_config.list_collections;
CollectionList.render();
+ CollectionList._update_panel_state();
let obj_badge_col = document.getElementById("badge_collection_count");
obj_badge_col.textContent = String(obj_config.list_collections.length);
} else {
diff --git a/src/renderer/scripts/CameraList.js b/src/renderer/scripts/CameraList.js
index f12dd2e..b664970 100644
--- a/src/renderer/scripts/CameraList.js
+++ b/src/renderer/scripts/CameraList.js
@@ -5,6 +5,11 @@ const CameraList = {
init: (fn_on_select) => {
CameraList.fn_on_select = fn_on_select;
+
+ let obj_btn_toggle = document.getElementById("btn_toggle_all_cameras");
+ obj_btn_toggle.addEventListener("click", () => {
+ CameraList.toggle_all();
+ });
},
set_cameras: (list_names, obj_scene) => {
@@ -45,6 +50,27 @@ const CameraList = {
return null;
},
+ toggle_all: () => {
+ if (CameraList.list_cameras.length === 0) {
+ return;
+ }
+
+ let is_any_enabled = false;
+ for (let obj_cam of CameraList.list_cameras) {
+ if (obj_cam.is_enabled) {
+ is_any_enabled = true;
+ break;
+ }
+ }
+
+ let is_new_state = !is_any_enabled;
+ for (let obj_cam of CameraList.list_cameras) {
+ obj_cam.is_enabled = is_new_state;
+ }
+
+ CameraList.render();
+ },
+
get_enabled_cameras: () => {
let list_enabled = [];
for (let obj_cam of CameraList.list_cameras) {
diff --git a/src/renderer/scripts/CollectionList.js b/src/renderer/scripts/CollectionList.js
index 32c9a5b..e4cf004 100644
--- a/src/renderer/scripts/CollectionList.js
+++ b/src/renderer/scripts/CollectionList.js
@@ -1,8 +1,29 @@
const CollectionList = {
list_collections: [],
+ is_skip_collections: true,
init: () => {
- // Peuple lors du chargement du .blend
+ let obj_check = document.getElementById("check_skip_collections");
+ obj_check.checked = true;
+ CollectionList.is_skip_collections = true;
+ obj_check.addEventListener("change", () => {
+ CollectionList.is_skip_collections = obj_check.checked;
+ CollectionList._update_panel_state();
+ });
+ },
+
+ _update_panel_state: () => {
+ let obj_container = document.getElementById("container_collection_list");
+ let obj_btn_reset = document.getElementById("btn_reset_collections");
+ if (CollectionList.is_skip_collections) {
+ obj_container.style.pointerEvents = "none";
+ obj_container.style.opacity = "0.4";
+ obj_btn_reset.disabled = true;
+ } else {
+ obj_container.style.pointerEvents = "";
+ obj_container.style.opacity = "";
+ obj_btn_reset.disabled = false;
+ }
},
set_collections: (list_raw) => {
@@ -10,6 +31,7 @@ const CollectionList = {
if (!list_raw || list_raw.length === 0) {
CollectionList.render();
+ CollectionList._update_panel_state();
let obj_badge = document.getElementById("badge_collection_count");
obj_badge.textContent = "0";
return;
@@ -28,12 +50,16 @@ const CollectionList = {
}
CollectionList.render();
+ CollectionList._update_panel_state();
let obj_badge = document.getElementById("badge_collection_count");
obj_badge.textContent = String(CollectionList.list_collections.length);
},
get_overrides: () => {
+ if (CollectionList.is_skip_collections) {
+ return [];
+ }
let list_overrides = [];
for (let obj_col of CollectionList.list_collections) {
list_overrides.push({