Manager: allow setup to finish without Blender #104306

Manually merged
Sybren A. Stüvel merged 34 commits from abelli/flamenco:issue100195 into main 2024-09-09 11:22:42 +02:00
Showing only changes of commit 9c6c059520 - Show all commits

View File

@ -101,7 +101,9 @@
v-show="currentSetupStep == 3"
@next-clicked="nextStepAfterCheckBlenderExePath"
@back-clicked="prevStep"
:is-next-clickable="selectedBlender != null || customBlenderExe != (null || '')"
:is-next-clickable="
selectedBlender != null || customBlenderExe != (null || '') || skipCustomBlenderExe
abelli marked this conversation as resolved Outdated

That original code already won't work, customBlenderExe != (null || '') is not going to do what it's intended to express. null is a false-y value, and so (null || '') gets shortcut to just '').

That's not something to address in this PR though -- this PR adds a feature, and shouldn't also try and fix existing code. But if you're willing to look into this too, a separate PR that fixes this (which could then be landed before adding this new feature) would be much appreciated.

That original code already won't work, `customBlenderExe != (null || '')` is not going to do what it's intended to express. `null` is a false-y value, and so `(null || '')` gets shortcut to just `''`). That's not something to address in this PR though -- this PR adds a feature, and shouldn't also try and fix existing code. But if you're willing to look into this too, a separate PR that fixes this (which could then be landed before adding this new feature) would be much appreciated.

I have opened #104307 to address this one.

I have opened #104307 to address this one.
"
title="Blender">
<div v-if="isBlenderExeFinding" class="is-in-progress">Looking for Blender installs...</div>
@ -193,23 +195,48 @@
</label>
</fieldset>
<div v-if="autoFoundBlenders.length === 0">
<input
v-model="customBlenderExe"
@keyup.enter="nextStepAfterCheckBlenderExePath"
:class="{
'is-invalid': blenderExeCheckResult != null && !blenderExeCheckResult.is_usable,
}"
type="text"
placeholder="Path to Blender executable" />
<fieldset v-if="autoFoundBlenders.length === 0">
<label for="custom_blender-input_path">
<div>
<input
v-model="skipCustomBlenderExe"
value="false"
type="radio"
name="blender"
id="custom_blender-input_path" />
I have a Blender path:
</div>
<div>
<input
v-model="customBlenderExe"
@keyup.enter="nextStepAfterCheckBlenderExePath"
:class="{
'is-invalid': blenderExeCheckResult != null && !blenderExeCheckResult.is_usable,
}"
type="text"
placeholder="Path to Blender executable" />
<p v-if="isBlenderExeChecking" class="is-in-progress">Checking...</p>
<p
v-if="blenderExeCheckResult != null && !blenderExeCheckResult.is_usable"
class="check-failed">
{{ blenderExeCheckResult.cause }}
</p>
</div>
<p v-if="isBlenderExeChecking" class="is-in-progress">Checking...</p>
<p
v-if="blenderExeCheckResult != null && !blenderExeCheckResult.is_usable"
class="check-failed">
{{ blenderExeCheckResult.cause }}
</p>
</div>
</label>
<label for="skip_blender-input_path">
<div>
<input
v-model="skipCustomBlenderExe"
value="true"
type="radio"
name="blender"
id="skip_blender-input_path" />
Skip, let the Workers use whatever Blender is available.
</div>
</label>
</fieldset>
</step-item>
<step-item
@ -236,10 +263,13 @@
>" as found on <code>$PATH</code> (currently "<code>{{ selectedBlender.path }}</code
>")
</dd>
<dd v-if="selectedBlender.source == 'input_path'">
<dd v-if="selectedBlender.source == 'input_path' && !skipCustomBlenderExe">
The command you provided: "<code>{{ selectedBlender.path }}</code
>"
</dd>
<dd v-if="selectedBlender.source == 'input_path' && skipCustomBlenderExe">
You have choosen to skip adding a blender path.
</dd>
</dl>
</div>
<p v-if="isConfirmed" class="check-ok">
@ -286,6 +316,7 @@ export default {
selectedBlender: null, // the chosen api.BlenderPathCheckResult
customBlenderExe: '',
skipCustomBlenderExe: false,
isBlenderExeChecking: false,
blenderExeCheckResult: null, // api.BlenderPathCheckResult
sourceLabels: {
@ -387,6 +418,17 @@ export default {
},
checkBlenderExePath() {
if (this.skipCustomBlenderExe) {
this.selectedBlender = {
input: 'blender',
path: 'blender',
source: 'input_path',
is_usable: true,
cause: 'blender',
};
return;
}
const exeToTry = this.cleanCustomBlenderExe;
if (exeToTry == '') {
// Just erase any previously-found custom Blender executable.