Sfoglia il codice sorgente

Add Delimiter to regex for trackName (#9696)

Takahiro 9 anni fa
parent
commit
bc0696718d
1 ha cambiato i file con 3 aggiunte e 2 eliminazioni
  1. 3 2
      src/animation/PropertyBinding.js

+ 3 - 2
src/animation/PropertyBinding.js

@@ -540,10 +540,11 @@ PropertyBinding.parseTrackName = function( trackName ) {
 	//    uuid.objectName[objectIndex].propertyName[propertyIndex]
 	//    parentName/nodeName.property
 	//    parentName/parentName/nodeName.property[index]
-	//	  .bone[Armature.DEF_cog].position
+	//    .bone[Armature.DEF_cog].position
+	//    scene:helium_balloon_model:helium_balloon_model.position
 	// created and tested via https://regex101.com/#javascript
 
-	var re = /^((?:\w+\/)*)(\w+)?(?:\.(\w+)(?:\[(.+)\])?)?\.(\w+)(?:\[(.+)\])?$/;
+	var re = /^((?:\w+[\/:])*)(\w+)?(?:\.(\w+)(?:\[(.+)\])?)?\.(\w+)(?:\[(.+)\])?$/;
 	var matches = re.exec( trackName );
 
 	if ( ! matches ) {