ClearBlendShapesCommand.cpp dnacalib/commands/ClearBlendShapesCommand.h dnacalib/CommandImplBase.h dnacalib/dna/DNA.h dnacalib/dna/DNACalibDNAReaderImpl.h dnacalib/types/Aliases.h dnac::ClearBlendShapesCommand::Impl dnac //CopyrightEpicGames,Inc.AllRightsReserved. #include"dnacalib/commands/ClearBlendShapesCommand.h" #include"dnacalib/CommandImplBase.h" #include"dnacalib/dna/DNA.h" #include"dnacalib/dna/DNACalibDNAReaderImpl.h" #include"dnacalib/types/Aliases.h" namespacednac{ classClearBlendShapesCommand::Impl:publicCommandImplBase<Impl>{ private: usingSuper=CommandImplBase<Impl>; public: explicitImpl(MemoryResource*memRes_): Super{memRes_}{ } voidrun(DNACalibDNAReaderImpl*output){ output->clearBlendShapeChannelNames(); output->clearBlendShapeChannelIndices(); output->clearLODBlendShapeChannelMappings(); output->clearMeshBlendShapeChannelMappings(); for(std::uint16_ti=0;i<output->getMeshCount();++i){ output->clearBlendShapeTargets(i); } Vector<std::uint16_t>lods{output->getLODCount(),0u,getMemoryResource()}; output->setBlendShapeChannelLODs(lods.data(),static_cast<std::uint16_t>(lods.size())); output->setBlendShapeChannelInputIndices(nullptr,0); output->setBlendShapeChannelOutputIndices(nullptr,0); } }; ClearBlendShapesCommand::ClearBlendShapesCommand(MemoryResource*memRes):pImpl{makeScoped<Impl>(memRes)}{ } ClearBlendShapesCommand::~ClearBlendShapesCommand()=default; ClearBlendShapesCommand::ClearBlendShapesCommand(ClearBlendShapesCommand&&)=default; ClearBlendShapesCommand&ClearBlendShapesCommand::operator=(ClearBlendShapesCommand&&)=default; voidClearBlendShapesCommand::run(DNACalibDNAReader*output){ pImpl->run(static_cast<DNACalibDNAReaderImpl*>(output)); } }//namespacednac