Skip to content

Commit

Permalink
Merge pull request cocos#24 from sunnylanwanjun/v2.3.0-fix-skeleton-m…
Browse files Browse the repository at this point in the history
…aterial-bug

Dragonbones and Spine Material bug
  • Loading branch information
2youyou2 committed Jul 2, 2019
2 parents ee71903 + 1b9e8e0 commit 97a96fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion extensions/dragonbones/ArmatureDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ let ArmatureDisplay = cc.Class({
},

_updateBatch () {
let baseMaterial = this.sharedMaterials[0];
let baseMaterial = this.getMaterial(0);
if (baseMaterial) {
baseMaterial.define('CC_USE_MODEL', !this.enableBatch);
}
Expand Down
4 changes: 2 additions & 2 deletions extensions/spine/Skeleton.js
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ sp.Skeleton = cc.Class({
},

_updateUseTint () {
let baseMaterial = this.sharedMaterials[0];
let baseMaterial = this.getMaterial(0);
if (baseMaterial) {
baseMaterial.define('USE_TINT', this.useTint);
}
Expand All @@ -457,7 +457,7 @@ sp.Skeleton = cc.Class({
},

_updateBatch () {
let baseMaterial = this.sharedMaterials[0];
let baseMaterial = this.getMaterial(0);
if (baseMaterial) {
baseMaterial.define('CC_USE_MODEL', !this.enableBatch);
}
Expand Down

0 comments on commit 97a96fe

Please sign in to comment.