add ObjectBase::<visible>ForAllPresets methods

This commit is contained in:
2023-11-09 00:29:59 +03:00
parent 2156e1d3e9
commit 5de0f6234d
2 changed files with 10 additions and 0 deletions

View File

@@ -211,6 +211,12 @@ void ObjectBase::setVisible(bool v) {
} }
void ObjectBase::setVisibleForAllPresets(bool v) {
for (auto & p: presets)
p.visible = v;
}
void ObjectBase::setReceiveShadows(bool on) { void ObjectBase::setReceiveShadows(bool on) {
currentPreset().receive_shadow = on; currentPreset().receive_shadow = on;
setObjectsChanged(); setObjectsChanged();

View File

@@ -82,6 +82,10 @@ public:
void setHidden(bool v) { setVisible(!v); } void setHidden(bool v) { setVisible(!v); }
void show() { setVisible(true); } void show() { setVisible(true); }
void hide() { setVisible(false); } void hide() { setVisible(false); }
void setVisibleForAllPresets(bool v);
void setHiddenForAllPresets(bool v) { setVisibleForAllPresets(!v); }
void showForAllPresets() { setVisibleForAllPresets(true); }
void hideForAllPresets() { setVisibleForAllPresets(false); }
bool isReceiveShadows() const { return currentPreset().receive_shadow; } bool isReceiveShadows() const { return currentPreset().receive_shadow; }
bool isCastShadows() const { return currentPreset().cast_shadow; } bool isCastShadows() const { return currentPreset().cast_shadow; }