Open scurest opened 3 years ago
Suppose I have two effects in the library_effects. The first has a \ with a texture and a \ of 0.4, and the second has neither \ nor \.
Then when I look at the second effect:
ie. it's reporting stale value from the first effect! If the first effect is modified so its \ is a color instead, the second effect will show the correct values.
This is caused by an early return in calculateOpacity
calculateOpacity
https://github.com/KhronosGroup/OpenCOLLADA/blob/6031fa956e1da4bbdd910af3a8f9e924ef0fca7a/COLLADASaxFrameworkLoader/src/COLLADASaxFWLLibraryEffectsLoader.cpp#L299-L301
The early return skips the rest of the function, including the code that resets values for the next effect
https://github.com/KhronosGroup/OpenCOLLADA/blob/6031fa956e1da4bbdd910af3a8f9e924ef0fca7a/COLLADASaxFrameworkLoader/src/COLLADASaxFWLLibraryEffectsLoader.cpp#L382-L385
so the next effect gets the stale values.
Suppose I have two effects in the library_effects. The first has a \ with a texture and a \ of 0.4, and the second has neither \ nor \.
Example library_effects
```xmlThen when I look at the second effect:
ie. it's reporting stale value from the first effect! If the first effect is modified so its \ is a color instead, the second effect will show the correct values.
This is caused by an early return in
calculateOpacity
https://github.com/KhronosGroup/OpenCOLLADA/blob/6031fa956e1da4bbdd910af3a8f9e924ef0fca7a/COLLADASaxFrameworkLoader/src/COLLADASaxFWLLibraryEffectsLoader.cpp#L299-L301
The early return skips the rest of the function, including the code that resets values for the next effect
https://github.com/KhronosGroup/OpenCOLLADA/blob/6031fa956e1da4bbdd910af3a8f9e924ef0fca7a/COLLADASaxFrameworkLoader/src/COLLADASaxFWLLibraryEffectsLoader.cpp#L382-L385
so the next effect gets the stale values.