Procházet zdrojové kódy

Max2Babylon: added "do not optimize animations"

ActionsBuilder: Removed bug on SetState and concatenation of conditions in graph
luaacro před 10 roky
rodič
revize
4500fab3ac

binární
Exporters/3ds Max/Max2Babylon-0.20.zip


+ 2 - 1
Tools/ActionsBuilder/Sources/actionsbuilder.list.js

@@ -226,7 +226,8 @@ var ActionsBuilder;
                         alert("Please add a trigger before.");
                         return;
                     }
-                    if (element.type === ActionsBuilder.Type.FLOW_CONTROL && (dragResult.action === _this._viewer.root || (dragResult.action.type === ActionsBuilder.Type.FLOW_CONTROL && dragResult.action.parent.hub === null))) {
+                    //if (element.type === Type.FLOW_CONTROL && (dragResult.action === this._viewer.root || (dragResult.action.type === Type.FLOW_CONTROL && dragResult.action.parent.hub === null))) {
+                    if (element.type === ActionsBuilder.Type.FLOW_CONTROL && dragResult.action === _this._viewer.root) {
                         return;
                     }
                     if (element.type === ActionsBuilder.Type.FLOW_CONTROL && dragResult.action.combineArray !== null) {

+ 2 - 0
Tools/ActionsBuilder/Sources/actionsbuilder.main.js

@@ -96,5 +96,7 @@ this.run = function () {
     list.setColorTheme("rgb(64, 64, 64)");
     list.createListsElements();
     list.onResize();
+    // 3ds Max fix
+    viewer.onResize();
 };
 //# sourceMappingURL=actionsbuilder.main.js.map

+ 6 - 3
Tools/ActionsBuilder/Sources/actionsbuilder.max.js

@@ -430,7 +430,8 @@ var ActionsBuilder;
                         alert("Please add a trigger before.");
                         return;
                     }
-                    if (element.type === ActionsBuilder.Type.FLOW_CONTROL && (dragResult.action === _this._viewer.root || (dragResult.action.type === ActionsBuilder.Type.FLOW_CONTROL && dragResult.action.parent.hub === null))) {
+                    //if (element.type === Type.FLOW_CONTROL && (dragResult.action === this._viewer.root || (dragResult.action.type === Type.FLOW_CONTROL && dragResult.action.parent.hub === null))) {
+                    if (element.type === ActionsBuilder.Type.FLOW_CONTROL && dragResult.action === _this._viewer.root) {
                         return;
                     }
                     if (element.type === ActionsBuilder.Type.FLOW_CONTROL && dragResult.action.combineArray !== null) {
@@ -554,6 +555,8 @@ this.run = function () {
     list.setColorTheme("rgb(64, 64, 64)");
     list.createListsElements();
     list.onResize();
+    // 3ds Max fix
+    viewer.onResize();
 };
 var ActionsBuilder;
 (function (ActionsBuilder) {
@@ -607,7 +610,7 @@ var ActionsBuilder;
             var propertyPathOptionalSelect = null;
             var booleanSelect = null;
             var propertyInput = null;
-            var propertyPathIndice = 0;
+            var propertyPathIndice = -1;
             if (properties.length === 0) {
                 return;
             }
@@ -718,7 +721,7 @@ var ActionsBuilder;
                     this.parametersContainer.appendChild(propertyInput);
                     // Configure event
                     propertyInput.onkeyup = this._propertyInputChanged(propertyInput, i);
-                    if (properties[i].text === "value") {
+                    if (propertyPathIndice !== -1 && properties[i].text === "value") {
                         propertyPathSelect.onchange = this._propertyPathSelectChanged(targetParameterSelect, propertyPathSelect, propertyPathOptionalSelect, booleanSelect, propertyInput, propertyPathIndice);
                     }
                     if (isBoolean) {

+ 2 - 2
Tools/ActionsBuilder/Sources/actionsbuilder.parameters.js

@@ -50,7 +50,7 @@ var ActionsBuilder;
             var propertyPathOptionalSelect = null;
             var booleanSelect = null;
             var propertyInput = null;
-            var propertyPathIndice = 0;
+            var propertyPathIndice = -1;
             if (properties.length === 0) {
                 return;
             }
@@ -161,7 +161,7 @@ var ActionsBuilder;
                     this.parametersContainer.appendChild(propertyInput);
                     // Configure event
                     propertyInput.onkeyup = this._propertyInputChanged(propertyInput, i);
-                    if (properties[i].text === "value") {
+                    if (propertyPathIndice !== -1 && properties[i].text === "value") {
                         propertyPathSelect.onchange = this._propertyPathSelectChanged(targetParameterSelect, propertyPathSelect, propertyPathOptionalSelect, booleanSelect, propertyInput, propertyPathIndice);
                     }
                     if (isBoolean) {

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1110 - 302
Tools/ActionsBuilder/Sources/babylon.max.js


+ 2 - 1
Tools/ActionsBuilder/actionsbuilder.list.ts

@@ -273,7 +273,8 @@
                         return;
                     }
 
-                    if (element.type === Type.FLOW_CONTROL && (dragResult.action === this._viewer.root || (dragResult.action.type === Type.FLOW_CONTROL && dragResult.action.parent.hub === null))) {
+                    //if (element.type === Type.FLOW_CONTROL && (dragResult.action === this._viewer.root || (dragResult.action.type === Type.FLOW_CONTROL && dragResult.action.parent.hub === null))) {
+                    if (element.type === Type.FLOW_CONTROL && dragResult.action === this._viewer.root) {
                         return;
                     }
 

+ 3 - 0
Tools/ActionsBuilder/actionsbuilder.main.ts

@@ -103,4 +103,7 @@ this.run = () => {
 
     list.createListsElements();
     list.onResize();
+
+    // 3ds Max fix
+    viewer.onResize();
 };

+ 2 - 2
Tools/ActionsBuilder/actionsbuilder.parameters.ts

@@ -65,7 +65,7 @@
             var booleanSelect: HTMLSelectElement = null;
             var propertyInput: HTMLInputElement = null;
 
-            var propertyPathIndice = 0;
+            var propertyPathIndice = -1;
 
             if (properties.length === 0) {
                 return;
@@ -199,7 +199,7 @@
                     // Configure event
                     propertyInput.onkeyup = this._propertyInputChanged(propertyInput, i);
 
-                    if (properties[i].text === "value") {
+                    if (propertyPathIndice !== -1 && properties[i].text === "value") {
                         propertyPathSelect.onchange = this._propertyPathSelectChanged(targetParameterSelect, propertyPathSelect, propertyPathOptionalSelect, booleanSelect, propertyInput, propertyPathIndice);
                     }