Comments (11)
I will send some final resolution about this during the day.
from nexrender.
Proposed solution:
function isNestedComp(comp, name, parentChain) {
if (
name &&
comp.name === name &&
parentChain &&
parentChain.length > 0 &&
comp.usedIn.length > 0
) {
for (var i = 0; i < comp.usedIn.length; i++) {
if (
comp.usedIn[i] instanceof CompItem &&
comp.usedIn[i].name === parentChain[parentChain.length - 1]
) {
var parentComp = comp.usedIn[i];
if (parentChain.length === 1) {
return true;
} else {
var chainCopy = [...parentChain];
var isNested = isNestedComp(
parentComp,
chainCopy.pop(),
chainCopy
);
if (isNested) {
return true;
}
}
}
}
}
return false;
}
from nexrender.
Have you had a chance to test the proposed solution @ivansenic ?
I might be wrong, but I feel like the [...] operator would not work in the older jsx scripting environment of AE
from nexrender.
Did not test it yet, will try tomorrow. Would .slice(..)
be better alternative?
from nexrender.
Actually yeah, there potentially could work:
var chainCopy = parentChain.slice()
// or
var chainCopy = [].concat(parentChain)
from nexrender.
Will test this today with slice()
and report back once I have resulsts..
from nexrender.
@inlife My solution does not work.. It still matches the first parent found so yea does now work.. I'll continue exploring the options..
from nexrender.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from nexrender.
Will be looking forward to that!
from nexrender.
I my comment I said that the fix is not working, but that's not really true. The fix proposed is definitely a good one, however, I would like to explain in what situations it helps and why I said it's not working in the test we did.
There are two situations to distinguish. When a same composition is used in two different parents, and when two completely different compositions have a same name.
Situation 1: Same comp in different parents
In this case we have a same composition included in two different parents. So we have following situation (made up IDs in brackets):
- First (1) -> Target comp (3)
- Second (2) -> Target comp (3)
Now without the fix above, following happens:
- If you target a layer
First->Target comp
, it will work and layer would be updated. Because it's the same comp, it will be updated in thatTarget comp
which influences bothFirst (1)
andSecond (2)
. - If you target a layer
Second->Target comp
, it will not work and nothing will be updated (proposed fix solves this issue).
Now important is to understand that in this situation there is no way to update the layer only in one concrete path. As composition is contained in two parents, any matched path would influence the comp and thus both parents. This is the reason I said fix is not working at the first place, as it's actually impossible to achieve once you have same comp in different parents.
Situation 2: Different comps with same name
In this case we have different compositions included in two different parents. So we have following situation (made up IDs in brackets):
- First (1) -> Target comp (3)
- Second (2) -> Target comp (4)
Now without the fix above, following happens:
- If you target a layer
First->Target comp
, it will work and layer would be updated. Because it's the different target comp, it will be updated on in the composition contained in theFirst (1)
. - If you target a layer
Second->Target comp
, it will not work and nothing will be updated (proposed fix solves this issue).
Conclusion
Fix is improving the path based selection for sure. It's deployed in our production for over a month now and we saw no other issues or any backward incompatibility.
from nexrender.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from nexrender.
Related Issues (20)
- Allow specifying s3ForcePathStyle for s3 provider. HOT 3
- nexrender-cli-macos failing to render for "an unknown reason" HOT 24
- After Effects Version Error HOT 7
- PNG sequence support HOT 2
- 0kb Image Sequence HOT 1
- AERender Options When Using --file Argument HOT 2
- Error in action-encode module (ffmpeg) Error: spawn UNKNOWN HOT 4
- 502 bad gateway HOT 5
- Windows process AfterFX.exe is not killed when no logging is reported for 60 seconds. HOT 8
- aerender error an existing connection was forced closed by the remote host. : unable to receive at line 502 HOT 3
- Audio replacement HOT 12
- How to just change image path only in comp layer of After effects? HOT 1
- Rendering Failure with aerender.exe on Windows Server on Google Comptue engine HOT 3
- RemoveJob is not working HOT 6
- Error: Couldn't find a result file: result.mp4 HOT 22
- Can we submit job to deadline using nexrender? HOT 3
- too slow rendering since update After Effect to 24 HOT 6
- mac 14.5 permission errors HOT 1
- 有办法提升渲染的速度吗? HOT 1
- Composition is not found when converting AE project HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nexrender.