THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/07/2007 at 03:06, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 10.1
Platform: Windows ;
Language(s) : C++ ;
---------
Hello, I am working on an exporter for C4D.
If I put a "figure", put a -1 for let's say S.Y in Attributes/Coord (negative scale on Y), C4D changes the matrix, but not the GetScale() result.
The problem is that in our export scheme, we track down axis scales/flips through GetScale().
If the "figure" is firstly made "editable" (c) and then the S.Y is set to -1, GetScale() returns -1 for the Y part, so we can flip the culling on our engine side.
Since the viewport behaviour is correct (with backface culling activated) in both cases, C4D must have a way to resolve axis flips.
The question is: where to get the axis flip information when it has been set before being "editable" ?
The dump I have, for exemple:
a) S.Y = -1 before "Make Editable"
Matrix: 1 0 0 0 -1 0 0 0 1 0 0 0
Scale: 1 1 1
b) S.Y = -1 after "Make Editable"
Matrix: 1 0 0 -0 -1 -0 0 0 1 0 0 0
Scale: 1 -1 1
c) S.Y = -1 then "Make Editable"
Matrix: 1 0 0 0 -1 0 0 0 1 0 0 0
Scale: 1 1 1
Notice the subtile "-0" on b)
The c) is same has a)
Since the culling flip is based on the sign of GetScale(), I have to correct the signs based on the analysis of the matrix.
Edit: I correct the post due to a wrong analysis of my own.