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