Skip to content

Commit

Permalink
Null Pointer Exception on RenderableInstance.updateSkinning()
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Gorisse committed Mar 1, 2021
1 parent 886de9c commit 6b5ca08
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 16 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Maintained Sceneform SDK for Android
#### This repository is a fork of [Sceneform](https://github.com/google-ar/sceneform-android-sdk)
Copyright (c) 2018 Google Inc. All rights reserved.

[ ![jCenter](https://img.shields.io/badge/jCenter-1.18.4-blue) ](https://bintray.com/thomasgorisse/maven/com.gorisse.thomas.sceneform:sceneform/1.18.4/link)
[ ![jCenter](https://img.shields.io/badge/jCenter-1.18.5-blue) ](https://bintray.com/thomasgorisse/maven/com.gorisse.thomas.sceneform:sceneform/1.18.5/link)

Sceneform is a 3D framework with a physically based renderer that's optimized
for mobile devices and that makes it easy for you to build Augmented Reality (AR)
Expand All @@ -27,7 +27,7 @@ apps without requiring OpenGL or Unity.
*app/build.gradle*
```gradle
dependencies {
implementation("com.gorisse.thomas.sceneform:sceneform:1.18.4")
implementation("com.gorisse.thomas.sceneform:sceneform:1.18.5")
}
```

Expand Down
2 changes: 1 addition & 1 deletion bintray.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'com.jfrog.bintray'

project.ext {
mavenGroupId = 'com.gorisse.thomas.sceneform'
mavenVersion = '1.18.4'
mavenVersion = '1.18.5'
mavenDesc = 'Sceneform Core'
mavenWebsiteUrl = 'https://github.com/thomasgorisse/sceneform-android-sdk'
mavenIssueTrackerUrl = 'https://github.com/thomasgorisse/sceneform-android-sdk/issues'
Expand Down
2 changes: 1 addition & 1 deletion core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ android {
minSdkVersion 24
targetSdkVersion 30
versionCode 3
versionName "1.18.2"
versionName "1.18.5"
}
compileOptions {
// Sceneform libraries use language constructs from Java 8.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ void createFilamentAssetModelInstance() {

filamentAsset = createdAsset;

filamentAnimator = createdAsset.getAnimator();
filamentAnimator = createdAsset != null ? createdAsset.getAnimator() : null;
animations = new ArrayList<>();
for (int i = 0; i < filamentAnimator.getAnimationCount(); i++) {
animations.add(new ModelAnimation(this, filamentAnimator.getAnimationName(i), i,
Expand Down Expand Up @@ -388,10 +388,6 @@ public Matrix getRelativeTransformInverse() {
return cachedRelativeTransformInverse;
}

private void updateSkinning(boolean force) {
return;
}

/**
* Apply animations changes <code>if fore==true</code> or the animation has dirty values.
*
Expand All @@ -403,7 +399,9 @@ public boolean updateAnimations(boolean force) {
for (int i = 0; i < getAnimationCount(); i++) {
ModelAnimation animation = getAnimation(i);
if (force || animation.isDirty()) {
getFilamentAnimator().applyAnimation(i, animation.getTimePosition());
if (getFilamentAnimator() != null) {
getFilamentAnimator().applyAnimation(i, animation.getTimePosition());
}
hasUpdate = true;
}
}
Expand All @@ -418,7 +416,9 @@ public boolean updateAnimations(boolean force) {
* <p>NOTE: this operation is independent of <code>animation</code>.</p>
*/
private void updateSkinning() {
getFilamentAnimator().updateBoneMatrices();
if (getFilamentAnimator() != null) {
getFilamentAnimator().updateBoneMatrices();
}
}

void setBlendOrderAt(int index, int blendOrder) {
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Maintained Sceneform SDK for Android
#### This repository is a fork of [Sceneform](https://github.com/google-ar/sceneform-android-sdk)
Copyright (c) 2018 Google Inc. All rights reserved.

[ ![jCenter](https://img.shields.io/badge/jCenter-1.18.4-blue) ](https://bintray.com/thomasgorisse/maven/com.gorisse.thomas.sceneform:sceneform/1.18.4/link)
[ ![jCenter](https://img.shields.io/badge/jCenter-1.18.5-blue) ](https://bintray.com/thomasgorisse/maven/com.gorisse.thomas.sceneform:sceneform/1.18.5/link)

Sceneform is a 3D framework with a physically based renderer that's optimized
for mobile devices and that makes it easy for you to build Augmented Reality (AR)
Expand All @@ -27,7 +27,7 @@ apps without requiring OpenGL or Unity.
*app/build.gradle*
```gradle
dependencies {
implementation("com.gorisse.thomas.sceneform:sceneform:1.18.4")
implementation("com.gorisse.thomas.sceneform:sceneform:1.18.5")
}
```

Expand Down
3 changes: 2 additions & 1 deletion samples/gltf/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@ android {
dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'

implementation("com.gorisse.thomas.sceneform:sceneform:1.18.+")
// implementation("com.gorisse.thomas.sceneform:sceneform:1.18.+")
api project(":sceneform")
}
2 changes: 1 addition & 1 deletion sceneform/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ android {
minSdkVersion 24
targetSdkVersion 30
versionCode 3
versionName "1.18.2"
versionName "1.18.5"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down
2 changes: 1 addition & 1 deletion ux/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ android {
minSdkVersion 24
targetSdkVersion 30
versionCode 3
versionName "1.18.2"
versionName "1.18.5"
}
compileOptions {
// Sceneform libraries use language constructs from Java 8.
Expand Down

0 comments on commit 6b5ca08

Please sign in to comment.