Browse Source

layers template updating

eLandon 4 years ago
parent
commit
5fd57528c1
1 changed files with 7 additions and 2 deletions
  1. 7 2
      SequenceMgr.js

+ 7 - 2
SequenceMgr.js

@@ -329,10 +329,12 @@ function struct_buildValuesFromSeq(){
 				var newLayer = layers.addContainer("newLayer"+i);
 				// newLayer.addFloatParameter("time", "position in time", 0., 0.);
 				newLayer.setCollapsed(true);
+				local.getChild("values").newGroup.layers.addFloatParameter("newLayer"+i, "value for this layer at group creation", 0., 0., 1.);
 			}
 			else {
 				script.log(util.getObjectProperties(layers, true, false)[0]);
 				layers.removeContainer(util.getObjectProperties(layers, true, false)[0]);
+				local.getChild("values").newGroup.layers.removeContainer(util.getObjectProperties(layers, true, false)[0]);
 			}
 			// cuesList = ;
 			
@@ -342,12 +344,15 @@ function struct_buildValuesFromSeq(){
 	if(layersChanged){
 		layers = local.getChild("values").keys.layers ;
 		var layerList = util.getObjectProperties(layers, true, false);
+		var template = local.getChild("values").newGroup.layers;
+		var layerTemplate = util.getObjectProperties(template, true, false);
+
 		if(tl_layers.length){
 			for (var i=0; i<tl_layers.length; i++){
 				var currentLayer = layers.getChild(layerList[i]);
 				currentLayer.setName(tl_layers[i].name);
-				
-				//
+				var currentTemplate = template.getChild(layerTemplate[i]) ;
+				currentTemplate.setName(tl_layers[i].name);
 			}
 		}
 	}