--------------------------
| 730 | |
| 731 | // -------------------------- |
| 732 | void EffectImporter::appendTextureInfo ( |
| 733 | const COLLADAFW::Effect* effect, |
| 734 | const COLLADAFW::Texture &texture, |
| 735 | const ShaderType& shaderType, |
| 736 | const ShaderAttribute& shaderAttribute, |
| 737 | MayaDM::Lambert* shaderNode ) |
| 738 | { |
| 739 | // Get the effect id. |
| 740 | const COLLADAFW::UniqueId& effectId = effect->getUniqueId (); |
| 741 | |
| 742 | // Get the current sampler id. |
| 743 | const COLLADAFW::SamplerID& samplerId = texture.getSamplerId (); |
| 744 | |
| 745 | // Get the id of the texture map, that should be used by this texture. It must be bounded |
| 746 | // to a set of texture coordinates, when the material is bounded to the geometry. |
| 747 | const COLLADAFW::TextureMapId& textureMapId = texture.getTextureMapId (); |
| 748 | |
| 749 | // Save the samplerId to this effect, so we can do the connection one time later. |
| 750 | TextureInfo textureInfo; |
| 751 | textureInfo.setEffectId ( effectId ); |
| 752 | textureInfo.setSamplerId ( samplerId ); |
| 753 | textureInfo.setShaderType ( shaderType ); |
| 754 | textureInfo.setShaderAttribute ( shaderAttribute ); |
| 755 | textureInfo.setShaderNode ( *shaderNode ); |
| 756 | textureInfo.setTextureMapId ( textureMapId ); |
| 757 | |
| 758 | // Push the shader node attribute data in the map to the effect. |
| 759 | mEffectTextureInfosMap [ effectId ].push_back ( textureInfo ); |
| 760 | |
| 761 | } |
| 762 | |
| 763 | // -------------------------- |
| 764 | void EffectImporter::createTexturePlacements ( |
nothing calls this directly
no test coverage detected