@@ -9,7 +9,7 @@ function neural_node_vector(node: ui_node_t, socket: ui_node_socket_t): string {
99 }
1010 let tex_name : string = parser_material_node_name ( node ) ;
1111 map_set ( data_cached_images , tex_name , result ) ;
12- let tex : bind_tex_t = parser_material_make_bind_tex ( tex_name , tex_name ) ;
12+ let tex : bind_tex_t = parser_material_make_bind_tex ( tex_name , tex_name ) ;
1313 let texstore : string = parser_material_texture_store ( node , tex , tex_name , color_space_t . AUTO ) ;
1414 return texstore + ".rgb" ;
1515}
@@ -21,13 +21,13 @@ function neural_node_value(node: ui_node_t, socket: ui_node_socket_t): string {
2121 }
2222 let tex_name : string = parser_material_node_name ( node ) ;
2323 map_set ( data_cached_images , tex_name , result ) ;
24- let tex : bind_tex_t = parser_material_make_bind_tex ( tex_name , tex_name ) ;
24+ let tex : bind_tex_t = parser_material_make_bind_tex ( tex_name , tex_name ) ;
2525 let texstore : string = parser_material_texture_store ( node , tex , tex_name , color_space_t . AUTO ) ;
2626 return texstore + ".r" ;
2727}
2828
2929function neural_from_node ( inp : ui_node_socket_t , socket : i32 ) : ui_node_t {
30- let result : ui_node_t = null ;
30+ let result : ui_node_t = null ;
3131 let canvas : ui_node_canvas_t = ui_nodes_get_canvas ( true ) ;
3232 for ( let i : i32 = 0 ; i < canvas . links . length ; ++ i ) {
3333 let l : ui_node_link_t = canvas . links [ i ] ;
@@ -40,9 +40,9 @@ function neural_from_node(inp: ui_node_socket_t, socket: i32): ui_node_t {
4040}
4141
4242function neural_node_button ( node : ui_node_t , model : string ) : bool {
43- let url : string = box_preferneces_model_url_from_name ( model ) ;
43+ let url : string = box_preferneces_model_url_from_name ( model ) ;
4444 let file_name : string = box_preferences_file_name_from_url ( url ) ;
45- let found : bool = box_preferences_model_exists ( file_name ) ;
45+ let found : bool = box_preferences_model_exists ( file_name ) ;
4646
4747 if ( iron_exec_async_done == 0 ) {
4848 if ( node != neural_node_current ) {
@@ -67,11 +67,14 @@ function neural_node_button(node: ui_node_t, model: string): bool {
6767
6868function neural_node_check_result ( node : ui_node_t ) {
6969 neural_node_current = node ;
70+ iron_delay_idle_sleep ( ) ;
7071 if ( iron_exec_async_done == 1 ) {
7172 let file : string = neural_node_dir ( ) + path_sep + "output.png" ;
7273 if ( iron_file_exists ( file ) ) {
7374 let result : gpu_texture_t = iron_load_texture ( file ) ;
7475 map_set ( neural_node_results , node . id , result ) ;
76+ ui_nodes_hwnd . redraws = 2 ;
77+ ui_view2d_hwnd . redraws = 2 ;
7578 }
7679 sys_remove_update ( neural_node_check_result ) ;
7780 }
@@ -111,13 +114,13 @@ let neural_node_downloading: i32 = 0;
111114function neural_node_download ( url : string ) {
112115 let file_name : string = substring ( url , string_last_index_of ( url , "/" ) + 1 , url . length ) ;
113116 let file_path : string = neural_node_dir ( ) + path_sep + file_name ;
114- let found : bool = iron_file_exists ( file_path ) ;
117+ let found : bool = iron_file_exists ( file_path ) ;
115118 if ( found ) {
116119 return ;
117120 }
118121
119122 neural_node_downloading ++ ;
120- file_download_to ( url , file_path , function ( url : string ) {
123+ file_download_to ( url , file_path , function ( url : string ) {
121124 neural_node_downloading -- ;
122125 console_log ( tr ( "Downloaded file from" ) + " " + url ) ;
123126
0 commit comments