Seems like there has been an update regarding output-alerts surrounding ‘skeleton nodes’ when it comes to rigged animation.
Regardless of how stable I want my application to be (will fix the rig later in process, as the animations execute right now), how can I avoid some (more specifically this) type of output in the console?
Note: Filter helps a little, but not enough (can I code it; metacode “console.log.filter(warnings)”?)
Nothing has changed regarding console warning for animation, as far as I know.
However, if you want to filter console messages, how about something like:
var FilterConsole = pc.createScript('filterConsole');
// initialize code called once per entity
FilterConsole.prototype.initialize = function() {
var oldWarn = console.warn;
console.warn = function (msg) {
if (!msg.includes('DEPRECATED')) {
oldWarn(msg);
}
};
};
// update code called every frame
FilterConsole.prototype.update = function(dt) {
if (this.app.keyboard.wasPressed(pc.KEY_SPACE)) {
// This function was deprecated long ago. Calling it prints a deprecation warning
var id = this.app.assets.getAssetById(0);
}
};
1 Like
Nice - I will try it out shortly … then get back
Hmm … a little odd - seems to lay within the FilterConsole-script?
- then again; not a big issue - if could be done: nice
not ‘needed’
Well, yeah, console.warn
is now being intercepted and called from the FilterConsole.js script. So the code file/line number will of course be that now.