-
Notifications
You must be signed in to change notification settings - Fork 129
Harmony: Javascript refactoring and overall stability improvements #666
Conversation
pype/vendor/OpenHarmony/tools/OpenHarmony_basic/openHarmony_rigging_tools.js
Show resolved
Hide resolved
pype/vendor/OpenHarmony/tools/OpenHarmony_basic/openHarmony_rigging_tools.js
Show resolved
Hide resolved
pype/vendor/OpenHarmony/tools/OpenHarmony_basic/openHarmony_rigging_tools.js
Show resolved
Hide resolved
pype/vendor/OpenHarmony/tools/OpenHarmony_basic/openHarmony_rigging_tools.js
Show resolved
Hide resolved
pype/vendor/OpenHarmony/tools/OpenHarmony_basic/openHarmony_rigging_tools.js
Show resolved
Hide resolved
pype/vendor/OpenHarmony/tools/OpenHarmony_basic/openHarmony_rigging_tools.js
Show resolved
Hide resolved
pype/vendor/OpenHarmony/tools/OpenHarmony_basic/openHarmony_rigging_tools.js
Show resolved
Hide resolved
pype/vendor/OpenHarmony/tools/OpenHarmony_basic/openHarmony_rigging_tools.js
Show resolved
Hide resolved
pype/vendor/OpenHarmony/tools/OpenHarmony_basic/openHarmony_rigging_tools.js
Show resolved
Hide resolved
pype/vendor/OpenHarmony/tools/OpenHarmony_basic/openHarmony_rigging_tools.js
Show resolved
Hide resolved
pype/vendor/OpenHarmony/tools/OpenHarmony_basic/openHarmony_rigging_tools.js
Show resolved
Hide resolved
pype/vendor/OpenHarmony/tools/OpenHarmony_basic/openHarmony_rigging_tools.js
Show resolved
Hide resolved
pype/vendor/OpenHarmony/tools/OpenHarmony_basic/openHarmony_rigging_tools.js
Show resolved
Hide resolved
pype/vendor/OpenHarmony/tools/OpenHarmony_basic/openHarmony_rigging_tools.js
Show resolved
Hide resolved
pype/vendor/OpenHarmony/tools/OpenHarmony_basic/openHarmony_rigging_tools.js
Show resolved
Hide resolved
pype/vendor/OpenHarmony/tools/OpenHarmony_basic/openHarmony_anim_tools.js
Show resolved
Hide resolved
return; | ||
} | ||
|
||
var install_detail_script = oh_install + "/" + item["name"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
['name'] is better written in dot notation.
|
||
var item = m.getItem(); | ||
if( !item ){ | ||
$.debug( "Failed to install - no item seems to be selected.", $.DEBUG_LEVEL["ERROR"] ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
['ERROR'] is better written in dot notation.
this.basePath = ''; | ||
|
||
this.removeAction = function( ev ){ | ||
with( context.$.global ){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use 'with'.
$.debug( err + " ("+err.fileName+" "+err.lineNumber+")", $.DEBUG_LEVEL["ERROR"] ); | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
|
||
m.get_tools(); | ||
}catch(err){ | ||
$.debug( err + " ("+err.fileName+" "+err.lineNumber+")", $.DEBUG_LEVEL["ERROR"] ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'$' used out of scope.
['ERROR'] is better written in dot notation.
//---------------------------------------------- | ||
//-- FILES ARE DOWNLOADED | ||
this.downloadFiles = function( file_download_listing, overwrite ){ | ||
with( context.$.global ){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use 'with'.
} | ||
|
||
return true; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon.
var library_base = install_base + '/openHarmony'; | ||
|
||
var libdir = new Dir(library_base); | ||
var label = new Label; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing '()' invoking a constructor.
//-- STANDARD DIALO CONFIRMATION | ||
this.confirmDialog = function( d_title, d_str, ok_text, cancel_text ){ | ||
if (typeof ok_text === 'undefined') var ok_text = "Okay"; | ||
if (typeof cancel_text === 'undefined') var cancel_text = "Cancel"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'cancel_text' is already defined.
//---------------------------------------------- | ||
//-- STANDARD DIALO CONFIRMATION | ||
this.confirmDialog = function( d_title, d_str, ok_text, cancel_text ){ | ||
if (typeof ok_text === 'undefined') var ok_text = "Okay"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'ok_text' is already defined.
Changes
Apart of changes described in ynput/avalon-core#211 this builds on them. It is moving all javascript code from python files to their separate js files to ease development.
Those can by found under
pype/hosts/harmony/js
and are organized in similar way as plugins are. Main object isPypeHarmony
. As Pype is initialized inside Harmony, all js files are send to Harmony in one batch, evaluated there in global scope. DOM is then like this:it is up to plugin code to inject into proper attribute -
PypeHarmony.Loaders
for loaders,PypeHarmony.Creators
for creators andPypeHarmony.Publish
for all other (collectors, extractors, integrators, validators, ...)It incorporates many changes proposed by @karmakat.
Dependencies