Skip to content

Commit 2a436dc

Browse files
authored
Merge pull request #2 from CognitiveVR/develop
Develop to main for v0.1.4
2 parents 1d75486 + e522e42 commit 2a436dc

File tree

5 files changed

+18
-8
lines changed

5 files changed

+18
-8
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export C3D_DEVELOPER_API_KEY=<your-api-key>
156156

157157
### Uploading the object manifest
158158

159-
After uploading the dynamic object asset files (mesh, textures) you must upload the dynamic object manifest file to display the objects on the Cognitive3D dashboard for your project and scene.
159+
After uploading the dynamic object asset files (mesh, textures) the `upload-object` script automatically uploads the dynamic object manifest file to display the objects on the Cognitive3D dashboard for your project and scene. You may want to modify the manifest and re-upload it with new values, such as starting position.
160160

161161
### Dynamic object manifest uploader usage
162162

@@ -167,6 +167,7 @@ The dynamic object manifest for your scene and object is created automatically a
167167
--scene_id <scene-uuid> \
168168
[--env dev|prod] \
169169
[--verbose] \
170+
[--dry_run] # Use this to preview the `curl` command without executing it
170171
```
171172

172173
#### Dynamic object manifest uploader required parameters

scene-test/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"scale": 1,
3-
"sceneName": "Test scene 5",
4-
"sdkVersion": "0.1.3"
3+
"sceneName": "Test scene 8",
4+
"sdkVersion": "0.1.4"
55
}

sdk-version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.3
1+
0.1.4

upload-object.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ if [ $status -ne 0 ]; then
183183
fi
184184

185185
log_info "Upload complete."
186-
echo "$response"
186+
log_info "$response"
187187

188188
# -------------------------------
189189
# Create or Overwrite Manifest File
@@ -216,5 +216,9 @@ cat > "${scene_id}_object_manifest.json" <<EOF
216216
}
217217
EOF
218218

219-
log_info "Manifest file created: ${scene_id}_object_manifest.json"
220-
log_info "Upload complete. Object ID: $object_id"
219+
log_debug "Manifest file created: ${scene_id}_object_manifest.json"
220+
221+
log_info "Automatically uploading the manifest."
222+
./upload-object-manifest.sh --scene_id $scene_id --env $environment
223+
224+
log_info "Upload complete. Object ID: $object_id"

upload-scene.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ COLOR_DEBUG="\033[0;36m"
2424
log_info() { echo -e "${COLOR_INFO}[INFO] $1${COLOR_RESET}"; }
2525
log_warn() { echo -e "${COLOR_WARN}[WARN] $1${COLOR_RESET}"; }
2626
log_error() { echo -e "${COLOR_ERROR}[ERROR] $1${COLOR_RESET}"; }
27-
log_debug() { [ "$verbose" = true ] && echo -e "${COLOR_DEBUG}[DEBUG] $1${COLOR_RESET}"; }
27+
log_debug() { [ "$VERBOSE" = true ] && echo -e "${COLOR_DEBUG}[DEBUG] $1${COLOR_RESET}"; }
2828

2929
# --- Check Dependencies ---
3030
if ! command -v jq >/dev/null 2>&1; then
@@ -198,6 +198,11 @@ main() {
198198
fi
199199

200200
log_info "Script complete."
201+
202+
log_info "You can now upload your dynamic objects using the upload-object.sh script."
203+
log_info "You'll need the scene ID from the upload response."
204+
log_info "Example: ./upload-object.sh --scene_id <scene_id> --object_filename <object_filename> --object_dir <object_directory>"
205+
log_info "For more details, refer to the README file."
201206
}
202207

203208
# Run main

0 commit comments

Comments
 (0)