Rename the identifier of input proxy vector.

This commit is contained in:
2023-05-18 14:58:05 +08:00
parent bf53298706
commit 5d520609b5

View File

@@ -187,7 +187,7 @@ namespace Cryville.Crtr {
}
}
static readonly int _var_value = IdentifierManager.Shared.Request("value");
static readonly int _var_input_vec = IdentifierManager.Shared.Request("input_vec");
const int MAX_DEPTH = 15;
const int MAX_DIMENSION = 4;
readonly InputVectorSrc[] _vecsrcs = new InputVectorSrc[MAX_DEPTH + 1];
@@ -262,12 +262,12 @@ namespace Cryville.Crtr {
float ft, tt = (float)GetSyncedTime(frame.Time, id.Source.Handler);
if (!_vect.TryGetValue(id, out ft)) ft = tt;
if (frame.IsNull) {
_etor.ContextCascadeUpdate(_var_value, PropSrc.Null);
_etor.ContextCascadeUpdate(_var_input_vec, PropSrc.Null);
OnInput(id, proxy.Target, ft, tt, true);
}
else {
_vecsrcs[0].Set(new RVector4(frame.Vector.X, frame.Vector.Y, frame.Vector.Z, frame.Vector.W));
_etor.ContextCascadeUpdate(_var_value, _vecsrcs[0]);
_etor.ContextCascadeUpdate(_var_input_vec, _vecsrcs[0]);
OnInput(id, proxy.Target, ft, tt, false);
}
_vect[id] = tt;
@@ -291,8 +291,8 @@ namespace Cryville.Crtr {
if (!newNullFlag) {
_etor.Evaluate(_vecops[depth + 1], p.Value);
newNullFlag = _vecsrcs[depth + 1].IsNull;
if (newNullFlag) _etor.ContextCascadeUpdate(_var_value, PropSrc.Null);
else _etor.ContextCascadeUpdate(_var_value, _vecsrcs[depth + 1]);
if (newNullFlag) _etor.ContextCascadeUpdate(_var_input_vec, PropSrc.Null);
else _etor.ContextCascadeUpdate(_var_input_vec, _vecsrcs[depth + 1]);
}
OnInput(id, p.Key, ft, tt, newNullFlag, depth + 1);
_etor.ContextCascadeDiscard();
@@ -300,7 +300,7 @@ namespace Cryville.Crtr {
}
else {
var pid = new ProxiedInputIdentifier { Source = id, Target = target };
PropSrc fv, tv = _etor.ContextCascadeLookup(_var_value);
PropSrc fv, tv = _etor.ContextCascadeLookup(_var_input_vec);
if (!_vecs.TryGetValue(pid, out fv)) fv = PropSrc.Null;
if (fv.Type != PdtInternalType.Null || tv.Type != PdtInternalType.Null) {
if (fv.Type == PdtInternalType.Null) {