I'm doing a mgWalk( db, PreWalkFunc, None, None, MWALK_MATRIXSTACK|MWALK_MASTERALL)
in PreWalkFunc i call mgWalkGetMatrix( data ) and it's returning MG_FALSE. I have some nodes under a MatrixTransform node am i getting false from mgWalkGetMatrix?
I couldn't atttach the file to this post because the forum don't let me to. mgWalkGetMatrix is returning false even though I have an xForm above each group containing the polygons.
This is a part of the script I'm using
#begining of the script
def PreWalkFunc(db, parent, record, data):
if mgGetCode (record) == fltPolygon:
ok, mat = mgWalkGetMatrix( data )
if ok == MG_FALSE:
# Due to issues in the OpenFlight API, the exceptions are not transmitted outside of the 'walk' functions
#in the main func
mgWalk( db, PreWalkFunc, None, None, MWALK_MATRIXSTACK|MWALK_MASTERALL)
Hmmm... can you tell me more about your environment? I tried this in OpenFlight API 14 and the soon to be released version 15 and don't see the problem.
I'll go back and try version 13 but can you tell us which version of OpenFlight API you are using?
And btw, mgWalkGetMatrix should work whether or not there are transforms present. In that case (and if called properly) the matrix returned would simply be identity.
Thank you for your response. I've ended up adding the mgWalkGetMatrix at the beginning of the preWalk function and somehow it worked. Thank you for the help
IÃ¢â¬â¢ve ended up adding the mgWalkGetMatrix at the beginning of the preWalk function and somehow it worked
Hmmm... that scares me more than your original problem ;-)