cam: show animate even when disabled and alert when used that stock must be set
This commit is contained in:
parent
eccf655089
commit
690cd2dc0e
2 changed files with 9 additions and 3 deletions
|
|
@ -42,6 +42,9 @@
|
||||||
|
|
||||||
// wire up animate button in ui
|
// wire up animate button in ui
|
||||||
api.function.animate = () => {
|
api.function.animate = () => {
|
||||||
|
if (isCamMode && !camStock) {
|
||||||
|
return api.show.alert("animation requires stock to be enabled");
|
||||||
|
}
|
||||||
api.function.prepare(() => {
|
api.function.prepare(() => {
|
||||||
if (isCamMode && camStock) {
|
if (isCamMode && camStock) {
|
||||||
animate();
|
animate();
|
||||||
|
|
@ -54,10 +57,10 @@
|
||||||
$('set-tools').style.display = isCamMode ? '' : 'none';
|
$('set-tools').style.display = isCamMode ? '' : 'none';
|
||||||
kiri.space.platform.setColor(isCamMode ? 0xeeeeee : 0xcccccc);
|
kiri.space.platform.setColor(isCamMode ? 0xeeeeee : 0xcccccc);
|
||||||
updateStock(undefined, 'internal');
|
updateStock(undefined, 'internal');
|
||||||
|
UI.func.animate.style.display = isCamMode ? '' : 'none';
|
||||||
if (!isCamMode) {
|
if (!isCamMode) {
|
||||||
func.tabClear();
|
func.tabClear();
|
||||||
func.traceDone();
|
func.traceDone();
|
||||||
UI.func.animate.style.display = 'none';
|
|
||||||
UI.label.slice.innerText = 'slice';
|
UI.label.slice.innerText = 'slice';
|
||||||
UI.label.preview.innerText = 'preview';
|
UI.label.preview.innerText = 'preview';
|
||||||
UI.label.export.innerText = 'export';
|
UI.label.export.innerText = 'export';
|
||||||
|
|
@ -1076,11 +1079,11 @@
|
||||||
let stock = settings.stock = { };
|
let stock = settings.stock = { };
|
||||||
let compute = enabled && stockSet && widgets.length;
|
let compute = enabled && stockSet && widgets.length;
|
||||||
|
|
||||||
UI.func.animate.style.display = refresh ? '' : 'none';
|
UI.func.animate.classList.add('disabled');
|
||||||
|
|
||||||
// create/inject cam stock if stock size other than default
|
// create/inject cam stock if stock size other than default
|
||||||
if (compute) {
|
if (compute) {
|
||||||
UI.func.animate.style.display = '';
|
UI.func.animate.classList.remove('disabled');
|
||||||
let csx = proc.camStockX;
|
let csx = proc.camStockX;
|
||||||
let csy = proc.camStockY;
|
let csy = proc.camStockY;
|
||||||
let csz = proc.camStockZ;
|
let csz = proc.camStockZ;
|
||||||
|
|
|
||||||
|
|
@ -419,6 +419,9 @@ th, tr, td, label {
|
||||||
background-color: var(--bg-gray);
|
background-color: var(--bg-gray);
|
||||||
left: -5px;
|
left: -5px;
|
||||||
}
|
}
|
||||||
|
#act-animate.disabled {
|
||||||
|
color: #aaa !important;
|
||||||
|
}
|
||||||
|
|
||||||
.pop-lcol {
|
.pop-lcol {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue