Closed Speuta closed 6 years ago
Sure I can add! :) Are you using the V1 or the V2 of the Babylon.js Editor?
The preview of the V2 is available here: http://editor.babylonjs.com/v2
I don't have any constraints about versions, V2 is ok for me ;)
Many thanks !!
Hey, just added in the V2 here: https://github.com/BabylonJS/Editor/commit/bded1b722c8c4504c30473f66bc2dbb0de9058e1
I do not close the issue right now because I don't notify you for EVERY changes, will add more changes notifications in future :)
You can now type:
editor.core.onGlobalPropertyChange.add((result) => {
console.log(result.object); // The modified object
console.log(result.property); // The proeprty changed (as string)
console.log(result.value); // New value after change
console.log(result.initialValue); // Value before change
});
@devAxeon fixed, all modifications are plugged to undo-redo :) Closing the issue
Great !! Thank you a lot !!
Hi,
Is there a way we can listen for all modifications ? Something like:
BABYLON.Editor.on("change", (object, attribute, value) => { //DO STUFF HERE });
Where "object" can be the mesh or the material edited, "attribute" can be "diffuseColor", and "value" the hexa of the diffuse for example ?
Regards,