Cherry-pick of commit cde2dc2e to fix merge issue

This commit is contained in:
Simon Walton 2018-09-11 16:58:21 -07:00
parent 80b7e04bc6
commit 2a0ee1c532
6 changed files with 8 additions and 8 deletions

View file

@ -102,7 +102,7 @@ void CauterizedModel::createRenderItemSet() {
} }
} }
void CauterizedModel::updateClusterMatrices(bool triggerBlendshapes) { void CauterizedModel::updateClusterMatrices() {
PerformanceTimer perfTimer("CauterizedModel::updateClusterMatrices"); PerformanceTimer perfTimer("CauterizedModel::updateClusterMatrices");
if (!_needsUpdateClusterMatrices || !isLoaded()) { if (!_needsUpdateClusterMatrices || !isLoaded()) {

View file

@ -33,7 +33,7 @@ public:
void createRenderItemSet() override; void createRenderItemSet() override;
virtual void updateClusterMatrices(bool triggerBlendshapes = true) override; virtual void updateClusterMatrices() override;
void updateRenderItems() override; void updateRenderItems() override;
const Model::MeshState& getCauterizeMeshState(int index) const; const Model::MeshState& getCauterizeMeshState(int index) const;

View file

@ -976,7 +976,7 @@ bool Model::addToScene(const render::ScenePointer& scene,
render::Transaction& transaction, render::Transaction& transaction,
render::Item::Status::Getters& statusGetters) { render::Item::Status::Getters& statusGetters) {
if (!_addedToScene && isLoaded()) { if (!_addedToScene && isLoaded()) {
updateClusterMatrices(false); updateClusterMatrices();
if (_modelMeshRenderItems.empty()) { if (_modelMeshRenderItems.empty()) {
createRenderItemSet(); createRenderItemSet();
} }
@ -1487,7 +1487,7 @@ void Model::computeMeshPartLocalBounds() {
} }
// virtual // virtual
void Model::updateClusterMatrices(bool triggerBlendshapes) { void Model::updateClusterMatrices() {
DETAILED_PERFORMANCE_TIMER("Model::updateClusterMatrices"); DETAILED_PERFORMANCE_TIMER("Model::updateClusterMatrices");
if (!_needsUpdateClusterMatrices || !isLoaded()) { if (!_needsUpdateClusterMatrices || !isLoaded()) {

View file

@ -159,7 +159,7 @@ public:
bool getSnapModelToRegistrationPoint() { return _snapModelToRegistrationPoint; } bool getSnapModelToRegistrationPoint() { return _snapModelToRegistrationPoint; }
virtual void simulate(float deltaTime, bool fullUpdate = true); virtual void simulate(float deltaTime, bool fullUpdate = true);
virtual void updateClusterMatrices(bool triggerBlendshapes = true); virtual void updateClusterMatrices();
/// Returns a reference to the shared geometry. /// Returns a reference to the shared geometry.
const Geometry::Pointer& getGeometry() const { return _renderGeometry; } const Geometry::Pointer& getGeometry() const { return _renderGeometry; }

View file

@ -31,7 +31,7 @@ int SoftAttachmentModel::getJointIndexOverride(int i) const {
// virtual // virtual
// use the _rigOverride matrices instead of the Model::_rig // use the _rigOverride matrices instead of the Model::_rig
void SoftAttachmentModel::updateClusterMatrices(bool triggerBlendshapes) { void SoftAttachmentModel::updateClusterMatrices() {
if (!_needsUpdateClusterMatrices) { if (!_needsUpdateClusterMatrices) {
return; return;
} }
@ -78,7 +78,7 @@ void SoftAttachmentModel::updateClusterMatrices(bool triggerBlendshapes) {
// post the blender if we're not currently waiting for one to finish // post the blender if we're not currently waiting for one to finish
auto modelBlender = DependencyManager::get<ModelBlender>(); auto modelBlender = DependencyManager::get<ModelBlender>();
if (triggerBlendshapes && modelBlender->shouldComputeBlendshapes() && geometry.hasBlendedMeshes() && _blendshapeCoefficients != _blendedBlendshapeCoefficients) { if (_blendedVertexBuffersInitialized && modelBlender->shouldComputeBlendshapes() && geometry.hasBlendedMeshes() && _blendshapeCoefficients != _blendedBlendshapeCoefficients) {
_blendedBlendshapeCoefficients = _blendshapeCoefficients; _blendedBlendshapeCoefficients = _blendshapeCoefficients;
modelBlender->noteRequiresBlend(getThisPointer()); modelBlender->noteRequiresBlend(getThisPointer());
} }

View file

@ -27,7 +27,7 @@ public:
~SoftAttachmentModel(); ~SoftAttachmentModel();
void updateRig(float deltaTime, glm::mat4 parentTransform) override; void updateRig(float deltaTime, glm::mat4 parentTransform) override;
void updateClusterMatrices(bool triggerBlendshapes = true) override; void updateClusterMatrices() override;
protected: protected:
int getJointIndexOverride(int i) const; int getJointIndexOverride(int i) const;