|
![](/i/fill.gif) |
> I understand that whenever a macro is called that is not in the main
> scene file, the .inc must be opened for every call, thus the speed
> improvement by copying often used macros to the scene file.
>
> However, how is it handled when a macro calls another macro?
>
> Example:
> scene.pov has no macros defined, includeA.inc has MacroA defined.
> Scene calls MacroA 100 times, so includeA.inc is opened and closed 100
> times.
>
> scene.pov has no macros defined, includeA.inc has MacroA and MacroB
> defined.
> Scene calls MacroA 100 times, and MacroA then calls MacroB 10 times
> within itself.
> My question: Is includeA.inc opened 100 times still, or is it then
> opened 1000 times?
No.
The source file is only opened and closed when you call it from another
file.
Also, if a macro from an include file calls a macro from the main file
or another include from whithc it was called, then NO file gets to be
open/red/closed.
Call a macro from the SAME file = no additional file transaction.
Call a macro from a file upper in the calling list = still no additional
file transaction.
Example 1: A macro from an include file use a macro from the main file.
Example 2: A macro from an include file, included by another include
file, that use a macro from the preceding include (the one that caused
it's inclusion).
Alain
Post a reply to this message
|
![](/i/fill.gif) |