(November 12th, 2014, 17:28)Ruff_Hi Wrote: How do you know about these C++ functions? Are they in every map script?
From looking at the C++ code you can see exactly how it works.
There are quite a few C++ functions, these among them, that the map script can optionally override. The C++ versions check if there's a python version and try that first.
Quote:If I understand this correctly ... I think you are saying that I could do this ...
Code:def afterGeneration():
return mirrorizePlots()
def mirrorizePlots():
# MIRRORIZE PLOTS
map = CyMap()
etc for the balance of what was in 'def afterGeneration():'
... and then call mirrorizePlots again from normalizeAddExtras() ...
Code:def normalizeAddExtras():
return mirrorizePlots()
# return None
It is a bit redundant, but it should be fairly quick.
Basically yes. Although I will point out that none of the functions involved return anything meaningful. The important point is that mirrorizePlots directly changes the map. What you have written looks like it would work, but it falsely gives the impression that values are being returned.