Last active
August 29, 2015 14:16
-
-
Save thoys/9b4645fa7dcb83492a78 to your computer and use it in GitHub Desktop.
move-Judas-his-models-to-github.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var entities = Entities.findEntities(MyAvatar.position, 1000); | |
var oldURL = "https://dl.dropboxusercontent.com/u/10483952/"; | |
var newURL = "https://raw.githubusercontent.com/judasshuffle/JudasHIFI/master/"; | |
for (var i = 0; i < entities.length; i++) { | |
var entityID = Entities.identifyEntity(entities[i]); | |
var props = Entities.getEntityProperties(entityID); | |
if (props['modelURL'].substr(0, oldURL.length) === oldURL) { | |
var postpart = props['modelURL'].substr(oldURL.length - props['modelURL'].length); | |
Entities.editEntity(entityID, {modelURL: newURL + postpart}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment