The middleware texture name uses 'texture' variable and the 'name' refers to the filename. The following is an example of use.
In this example we have 2 sections S1 and S2.
In the formula for S2's Top face T2 texture, we evaluate to the string as shown arrowed, using this formula:
Section["S1"].face[Face].texture["T1"].Folder
where
Section["S1"].face[Face].texture["T1"] | is the context |
Folder | is the variable to evaluate in that context |
The context is hierarchically specified, this way (given that the current context is section "S2")
Section["S1"] | ask my parent VSection (main or extn) for a pointer to its section called "S1" |
face[Face] | within section["S1"] ask for a pointer to Face, where Face has to evaluate in my current context, i.e. gives Face["Top"] |
texture["T1"] | in the list of textures for that face and finds one called "T1" |
Then the result follows.
Summary
Generally, when there is a list of things (components, machinesteps, textures, etc) you need to refer to that list in this way. For example, if you are in a section and want to identify a face or a component, you have to say which one. There could be a component called "Top" and there is a face called "Top" - you need to say which list you want to look in. Even though at the moment there are no other lists to look in below face[xxx], only the list of textures, that may not be the case if we extend things in the future. Need to keep the formula language consistent.