Mark Allen
Forum Replies Created
-
Great tip on that tutorial. I’ve heard of these sliders and just been too lazy to figure out how to use them… which now seems silly.
I will be emailing you a link to a finished sample (and my thanks again) next week when this thing is finished!
Is there a great resource online for javascript “words” that can be used with AE? The indexOf was key here and I would have had no idea that this existed or how to find it unless you’d put it out there. I don’t know what I may come across in the future, but seems like I would have wanted to find “indexOf” listed under “things to do with .name” in a manual that actually made sense. 🙂
-
Colin!!! You’re my hero!
Yes, there were a couple bugs which were easy enough to fix and yes I made a slight error in my desciption – but that was also easy to fix and now I have some fantastic code. Seriously… You made my night thank you!
I will share the final code and then answer your questions….
//begin code
x = 0;
y = 270;
z = 0;
normalDistance = 200;
doorDistance = 100;prevName = thisComp.layer( index – 1 ).name;
currName = thisComp.layer( index ).name;
//–if (currName.indexOf( “wallThing” ) != -1)
x = thisComp.layer(index -1).width /2 + normalDistance/2 + thisComp.layer( index -1 ).position[0];
// make wall things ignore their own presenceelse if ( prevName.indexOf( “wallThing” ) != -1 )
x = thisComp.layer( index -2 ).width /2 + thisLayer.width /2 + normalDistance + thisComp.layer (index -2 ).position[0];
// make layer after a wallthing ignore the wall thing’s presenceelse if( prevName.indexOf (“door”) != -1|| currName.indexOf( “door” ) != -1 )
x = thisComp.layer(index -1).width / 2 + thisLayer.width / 2 + doorDistance + thisComp.layer( index -1 ).position[0];
// make door layers and layers after door layers have their own distanceelse
x = thisComp.layer( index – 1).width/2 + thisLayer.width / 2 + normalDistance + thisComp.layer( index -1).position[0];
// everything else gets set to the normal distance[x, y, z]
//end code
To answer your question – I’m building a hallway. A hallway that has over 500 photographs and we are tracking down this hallway for about 30 minutes. The photographs have the same height and different widths but the distance between them is meant to be the same. However – to make the hallway more interesting and seem like we made a hallway which is unique for about a mile long, we are adding certain touches… like fire alarms, conduits… we’re also adding doors – but the doors are special, the conduits and such are meant to be ignored, but the doors are mean to have a little space for them. And now… you’ve made it possible.
I will email you a link to it if you like when it’s done next week. (I would post it but it would be removed eventually and due to rights issues can’t be stored on the common video servers.)
Just curious – how long did it take you to write this?
ALSO – I realize that AE can’t use globals… so I made a cheat… hack… i made a null called “globalnull” and then set the x and y positions to numbers I wanted access to and then did…
normDistance = thisComp.layer(“globalnull”).position[0]
etc.
Is there a more elegant solution to this because while amazingly convenient, it feels like a hack…
Thanks again.
-
Colin!!! You’re my hero!
Yes, there were a couple bugs which were easy enough to fix and yes I made a slight error in my desciption – but that was also easy to fix and now I have some fantastic code. Seriously… You made my night thank you!
I will share the final code and then answer your questions….
//begin code
x = 0;
y = 270;
z = 0;
normalDistance = 200;
doorDistance = 100;prevName = thisComp.layer( index – 1 ).name;
currName = thisComp.layer( index ).name;
//–if (currName.indexOf( “wallThing” ) != -1)
x = thisComp.layer(index -1).width /2 + normalDistance/2 + thisComp.layer( index -1 ).position[0];
// make wall things ignore their own presenceelse if ( prevName.indexOf( “wallThing” ) != -1 )
x = thisComp.layer( index -2 ).width /2 + thisLayer.width /2 + normalDistance + thisComp.layer (index -2 ).position[0];
// make layer after a wallthing ignore the wall thing’s presenceelse if( prevName.indexOf (“door”) != -1|| currName.indexOf( “door” ) != -1 )
x = thisComp.layer(index -1).width / 2 + thisLayer.width / 2 + doorDistance + thisComp.layer( index -1 ).position[0];
// make door layers and layers after door layers have their own distanceelse
x = thisComp.layer( index – 1).width/2 + thisLayer.width / 2 + normalDistance + thisComp.layer( index -1).position[0];
// everything else gets set to the normal distance[x, y, z]
//end code
To answer your question – I’m building a hallway. A hallway that has over 500 photographs and we are tracking down this hallway for about 30 minutes. The photographs have the same height and different widths but the distance between them is meant to be the same. However – to make the hallway more interesting and seem like we made a hallway which is unique for about a mile long, we are adding certain touches… like fire alarms, conduits… we’re also adding doors – but the doors are special, the conduits and such are meant to be ignored, but the doors are mean to have a little space for them. And now… you’ve made it possible.
I will email you a link to it if you like when it’s done next week. (I would post it but it would be removed eventually and due to rights issues can’t be stored on the common video servers.)
Just curious – how long did it take you to write this?
ALSO – I realize that AE can’t use globals… so I made a cheat… hack… i made a null called “globalnull” and then set the x and y positions to numbers I wanted access to and then did…
normDistance = thisComp.layer(“globalnull”).position[0]
etc.
Is there a more elegant solution to this because while amazingly convenient, it feels like a hack…
Thanks again.