diff --git a/PixelComposer.resource_order b/PixelComposer.resource_order index eae98f85d..95e17c879 100644 --- a/PixelComposer.resource_order +++ b/PixelComposer.resource_order @@ -21,7 +21,6 @@ {"name":"widget","order":9,"path":"folders/dialog/widget.yy",}, {"name":"font","order":7,"path":"folders/font.yy",}, {"name":"functions","order":6,"path":"folders/functions.yy",}, - {"name":"misc","order":1,"path":"folders/functions/3d/misc.yy",}, {"name":"action","order":40,"path":"folders/functions/action.yy",}, {"name":"animation","order":19,"path":"folders/functions/animation.yy",}, {"name":"async","order":36,"path":"folders/functions/async.yy",}, @@ -187,6 +186,10 @@ {"name":"biterator","order":2,"path":"folders/VCT/biterator.yy",}, {"name":"widget","order":3,"path":"folders/VCT/widget.yy",}, {"name":"widgets","order":5,"path":"folders/widgets.yy",}, + {"name":"util","order":17,"path":"folders/functions/3d/util.yy",}, + {"name":"light","order":18,"path":"folders/functions/3d/light.yy",}, + {"name":"camera","order":19,"path":"folders/functions/3d/camera.yy",}, + {"name":"mesh","order":20,"path":"folders/functions/3d/mesh.yy",}, ], "ResourceOrderSettings": [ {"name":"s_node_corner","order":16,"path":"sprites/s_node_corner/s_node_corner.yy",}, @@ -197,7 +200,7 @@ {"name":"sh_normal_light","order":1,"path":"shaders/sh_normal_light/sh_normal_light.yy",}, {"name":"node_tool","order":9,"path":"scripts/node_tool/node_tool.yy",}, {"name":"sh_find_pixel","order":3,"path":"shaders/sh_find_pixel/sh_find_pixel.yy",}, - {"name":"d3d_light_point","order":16,"path":"scripts/d3d_light_point/d3d_light_point.yy",}, + {"name":"d3d_light_point","order":2,"path":"scripts/d3d_light_point/d3d_light_point.yy",}, {"name":"node_3d_camera","order":10,"path":"scripts/node_3d_camera/node_3d_camera.yy",}, {"name":"panel_preview_window","order":1,"path":"scripts/panel_preview_window/panel_preview_window.yy",}, {"name":"sh_scale3x","order":29,"path":"shaders/sh_scale3x/sh_scale3x.yy",}, @@ -209,6 +212,7 @@ {"name":"node_pixel_sort","order":12,"path":"scripts/node_pixel_sort/node_pixel_sort.yy",}, {"name":"sh_dither","order":28,"path":"shaders/sh_dither/sh_dither.yy",}, {"name":"node_region_fill","order":20,"path":"scripts/node_region_fill/node_region_fill.yy",}, + {"name":"sh_d3d_normal","order":18,"path":"shaders/sh_d3d_normal/sh_d3d_normal.yy",}, {"name":"s_node_text_file_read","order":13,"path":"sprites/s_node_text_file_read/s_node_text_file_read.yy",}, {"name":"s_node_text_trim","order":7,"path":"sprites/s_node_text_trim/s_node_text_trim.yy",}, {"name":"s_node_pb_fx_shading","order":3,"path":"sprites/s_node_pb_fx_shading/s_node_pb_fx_shading.yy",}, @@ -238,7 +242,6 @@ {"name":"s_node_tunnel_out","order":22,"path":"sprites/s_node_tunnel_out/s_node_tunnel_out.yy",}, {"name":"__background_set_element","order":3,"path":"scripts/__background_set_element/__background_set_element.yy",}, {"name":"s_node_3d_obj","order":3,"path":"sprites/s_node_3d_obj/s_node_3d_obj.yy",}, - {"name":"d3d_camera","order":13,"path":"scripts/d3d_camera/d3d_camera.yy",}, {"name":"ds_list_queue","order":6,"path":"scripts/ds_list_queue/ds_list_queue.yy",}, {"name":"s_node_scale","order":6,"path":"sprites/s_node_scale/s_node_scale.yy",}, {"name":"sh_color_picker_value","order":1,"path":"shaders/sh_color_picker_value/sh_color_picker_value.yy",}, @@ -356,7 +359,7 @@ {"name":"node_pb_fx_strip","order":11,"path":"scripts/node_pb_fx_strip/node_pb_fx_strip.yy",}, {"name":"node_stripe","order":4,"path":"scripts/node_stripe/node_stripe.yy",}, {"name":"sh_texture_atlas","order":39,"path":"shaders/sh_texture_atlas/sh_texture_atlas.yy",}, - {"name":"d3d_vec4","order":12,"path":"scripts/d3d_vec4/d3d_vec4.yy",}, + {"name":"d3d_vec4","order":5,"path":"scripts/d3d_vec4/d3d_vec4.yy",}, {"name":"s_node_fluidSim_domain","order":6,"path":"sprites/s_node_fluidSim_domain/s_node_fluidSim_domain.yy",}, {"name":"s_node_displace","order":20,"path":"sprites/s_node_displace/s_node_displace.yy",}, {"name":"sh_polar","order":1,"path":"shaders/sh_polar/sh_polar.yy",}, @@ -475,7 +478,7 @@ {"name":"sh_fd_calculate_pressure_jacobi_glsl","order":8,"path":"shaders/sh_fd_calculate_pressure_jacobi_glsl/sh_fd_calculate_pressure_jacobi_glsl.yy",}, {"name":"node_color_from_rgb","order":7,"path":"scripts/node_color_from_rgb/node_color_from_rgb.yy",}, {"name":"node_struct_get","order":1,"path":"scripts/node_struct_get/node_struct_get.yy",}, - {"name":"d3d_plane","order":14,"path":"scripts/d3d_plane/d3d_plane.yy",}, + {"name":"d3d_plane","order":2,"path":"scripts/d3d_plane/d3d_plane.yy",}, {"name":"curveBox","order":8,"path":"scripts/curveBox/curveBox.yy",}, {"name":"s_node_iterator_length","order":24,"path":"sprites/s_node_iterator_length/s_node_iterator_length.yy",}, {"name":"preview_overlay_vector","order":2,"path":"scripts/preview_overlay_vector/preview_overlay_vector.yy",}, @@ -568,7 +571,7 @@ {"name":"node_strand_gravity","order":4,"path":"scripts/node_strand_gravity/node_strand_gravity.yy",}, {"name":"load_palette","order":3,"path":"scripts/load_palette/load_palette.yy",}, {"name":"luaHighlight","order":1,"path":"scripts/luaHighlight/luaHighlight.yy",}, - {"name":"d3d_rot3","order":8,"path":"scripts/d3d_rot3/d3d_rot3.yy",}, + {"name":"d3d_rot3","order":3,"path":"scripts/d3d_rot3/d3d_rot3.yy",}, {"name":"sh_sample_points","order":26,"path":"shaders/sh_sample_points/sh_sample_points.yy",}, {"name":"node_combine_rgb","order":1,"path":"scripts/node_combine_rgb/node_combine_rgb.yy",}, {"name":"fd_rectangle_draw_part","order":10,"path":"scripts/fd_rectangle_draw_part/fd_rectangle_draw_part.yy",}, @@ -602,6 +605,7 @@ {"name":"s_node_surface_from_buffer","order":1,"path":"sprites/s_node_surface_from_buffer/s_node_surface_from_buffer.yy",}, {"name":"node_iterator_filter_output","order":2,"path":"scripts/node_iterator_filter_output/node_iterator_filter_output.yy",}, {"name":"color_function","order":9,"path":"scripts/color_function/color_function.yy",}, + {"name":"d3d_cube_faces","order":1,"path":"scripts/d3d_cube_faces/d3d_cube_faces.yy",}, {"name":"fd_rectangle_set_pressure_size","order":11,"path":"scripts/fd_rectangle_set_pressure_size/fd_rectangle_set_pressure_size.yy",}, {"name":"node_color_data","order":6,"path":"scripts/node_color_data/node_color_data.yy",}, {"name":"node_array_shift","order":24,"path":"scripts/node_array_shift/node_array_shift.yy",}, @@ -712,7 +716,7 @@ {"name":"s_node_lua_surface","order":18,"path":"sprites/s_node_lua_surface/s_node_lua_surface.yy",}, {"name":"node_data","order":1,"path":"scripts/node_data/node_data.yy",}, {"name":"node_wiggler","order":2,"path":"scripts/node_wiggler/node_wiggler.yy",}, - {"name":"d3d_matrix4","order":11,"path":"scripts/d3d_matrix4/d3d_matrix4.yy",}, + {"name":"d3d_matrix4","order":1,"path":"scripts/d3d_matrix4/d3d_matrix4.yy",}, {"name":"fd_GUIDE","order":5,"path":"scripts/fd_GUIDE/fd_GUIDE.yy",}, {"name":"node_fluid_update","order":3,"path":"scripts/node_fluid_update/node_fluid_update.yy",}, {"name":"s_node_grid_noise","order":5,"path":"sprites/s_node_grid_noise/s_node_grid_noise.yy",}, @@ -816,6 +820,7 @@ {"name":"__global_object_depths","order":7,"path":"scripts/__global_object_depths/__global_object_depths.yy",}, {"name":"s_node_filter_array","order":28,"path":"sprites/s_node_filter_array/s_node_filter_array.yy",}, {"name":"node_noise_grid_hex","order":5,"path":"scripts/node_noise_grid_hex/node_noise_grid_hex.yy",}, + {"name":"_3d_rotation","order":6,"path":"scripts/_3d_rotation/_3d_rotation.yy",}, {"name":"node_lua_global","order":1,"path":"scripts/node_lua_global/node_lua_global.yy",}, {"name":"o_dialog_preset","order":1,"path":"objects/o_dialog_preset/o_dialog_preset.yy",}, {"name":"s_node_mesh_transform","order":1,"path":"sprites/s_node_mesh_transform/s_node_mesh_transform.yy",}, @@ -920,7 +925,7 @@ {"name":"s_node_compare","order":1,"path":"sprites/s_node_compare/s_node_compare.yy",}, {"name":"s_node_fluidSim_domain_queue","order":9,"path":"sprites/s_node_fluidSim_domain_queue/s_node_fluidSim_domain_queue.yy",}, {"name":"s_node_vfx_spawn","order":2,"path":"sprites/s_node_vfx_spawn/s_node_vfx_spawn.yy",}, - {"name":"d3d_vec3","order":9,"path":"scripts/d3d_vec3/d3d_vec3.yy",}, + {"name":"d3d_vec3","order":4,"path":"scripts/d3d_vec3/d3d_vec3.yy",}, {"name":"texture_set_repeat","order":1,"path":"scripts/texture_set_repeat/texture_set_repeat.yy",}, {"name":"o_dialog_color_quick_pick","order":5,"path":"objects/o_dialog_color_quick_pick/o_dialog_color_quick_pick.yy",}, {"name":"fd_rectangle_update_velocity","order":22,"path":"scripts/fd_rectangle_update_velocity/fd_rectangle_update_velocity.yy",}, @@ -1116,7 +1121,7 @@ {"name":"s_node_atlas","order":5,"path":"sprites/s_node_atlas/s_node_atlas.yy",}, {"name":"node_fluid_add","order":4,"path":"scripts/node_fluid_add/node_fluid_add.yy",}, {"name":"BBMOD_Quaternion","order":3,"path":"scripts/BBMOD_Quaternion/BBMOD_Quaternion.yy",}, - {"name":"d3d_cube","order":7,"path":"scripts/d3d_cube/d3d_cube.yy",}, + {"name":"d3d_group","order":21,"path":"scripts/d3d_group/d3d_group.yy",}, {"name":"o_dialog_output_visibility","order":2,"path":"objects/o_dialog_output_visibility/o_dialog_output_visibility.yy",}, {"name":"node_normal","order":1,"path":"scripts/node_normal/node_normal.yy",}, {"name":"s_node_glow","order":24,"path":"sprites/s_node_glow/s_node_glow.yy",}, @@ -1133,7 +1138,7 @@ {"name":"vct_slider","order":1,"path":"scripts/vct_slider/vct_slider.yy",}, {"name":"panel_node_align","order":3,"path":"scripts/panel_node_align/panel_node_align.yy",}, {"name":"sh_blur_alpha","order":1,"path":"shaders/sh_blur_alpha/sh_blur_alpha.yy",}, - {"name":"d3d_light_directional","order":5,"path":"scripts/d3d_light_directional/d3d_light_directional.yy",}, + {"name":"d3d_light_directional","order":1,"path":"scripts/d3d_light_directional/d3d_light_directional.yy",}, {"name":"value_snap","order":10,"path":"scripts/value_snap/value_snap.yy",}, {"name":"file_dropper","order":1,"path":"extensions/file_dropper/file_dropper.yy",}, {"name":"s_biterator_b_shape_idle","order":3,"path":"sprites/s_biterator_b_shape_idle/s_biterator_b_shape_idle.yy",}, @@ -1152,7 +1157,7 @@ {"name":"node_blur_contrast","order":1,"path":"scripts/node_blur_contrast/node_blur_contrast.yy",}, {"name":"sh_trail_filler","order":50,"path":"shaders/sh_trail_filler/sh_trail_filler.yy",}, {"name":"s_node_border","order":12,"path":"sprites/s_node_border/s_node_border.yy",}, - {"name":"d3_vector","order":1,"path":"scripts/d3_vector/d3_vector.yy",}, + {"name":"d3_vector","order":7,"path":"scripts/d3_vector/d3_vector.yy",}, {"name":"s_node_pin","order":2,"path":"sprites/s_node_pin/s_node_pin.yy",}, {"name":"node_local_analyze","order":17,"path":"scripts/node_local_analyze/node_local_analyze.yy",}, {"name":"s_node_blur_contrast","order":10,"path":"sprites/s_node_blur_contrast/s_node_blur_contrast.yy",}, @@ -1262,7 +1267,7 @@ {"name":"s_node_array_reverse","order":8,"path":"sprites/s_node_array_reverse/s_node_array_reverse.yy",}, {"name":"o_process_handler","order":3,"path":"objects/o_process_handler/o_process_handler.yy",}, {"name":"sh_ani_noise","order":8,"path":"shaders/sh_ani_noise/sh_ani_noise.yy",}, - {"name":"d3d_camera_object","order":3,"path":"scripts/d3d_camera_object/d3d_camera_object.yy",}, + {"name":"d3d_camera_object","order":1,"path":"scripts/d3d_camera_object/d3d_camera_object.yy",}, {"name":"sh_level","order":14,"path":"shaders/sh_level/sh_level.yy",}, {"name":"sh_grid_tri","order":3,"path":"shaders/sh_grid_tri/sh_grid_tri.yy",}, {"name":"s_node_text","order":1,"path":"sprites/s_node_text/s_node_text.yy",}, @@ -1274,7 +1279,6 @@ {"name":"sh_blend_normal_dim","order":10,"path":"shaders/sh_blend_normal_dim/sh_blend_normal_dim.yy",}, {"name":"node_skew","order":11,"path":"scripts/node_skew/node_skew.yy",}, {"name":"s_node_dot_product","order":13,"path":"sprites/s_node_dot_product/s_node_dot_product.yy",}, - {"name":"d3d_light","order":10,"path":"scripts/d3d_light/d3d_light.yy",}, {"name":"sh_downsample","order":1,"path":"shaders/sh_downsample/sh_downsample.yy",}, {"name":"sh_remove_black","order":33,"path":"shaders/sh_remove_black/sh_remove_black.yy",}, {"name":"path_parser","order":3,"path":"scripts/path_parser/path_parser.yy",}, @@ -1389,7 +1393,6 @@ {"name":"__node_value_processor","order":6,"path":"scripts/__node_value_processor/__node_value_processor.yy",}, {"name":"s_node_group_input","order":16,"path":"sprites/s_node_group_input/s_node_group_input.yy",}, {"name":"sample_projects","order":6,"path":"scripts/sample_projects/sample_projects.yy",}, - {"name":"d3d_matrix3","order":6,"path":"scripts/d3d_matrix3/d3d_matrix3.yy",}, {"name":"draw_fit","order":12,"path":"scripts/draw_fit/draw_fit.yy",}, {"name":"node_armature_sample","order":5,"path":"scripts/node_armature_sample/node_armature_sample.yy",}, {"name":"sh_pb_shade","order":3,"path":"shaders/sh_pb_shade/sh_pb_shade.yy",}, diff --git a/PixelComposer.yyp b/PixelComposer.yyp index 43ee6572b..8c36836dd 100644 --- a/PixelComposer.yyp +++ b/PixelComposer.yyp @@ -42,7 +42,6 @@ {"resourceType":"GMFolder","resourceVersion":"1.0","name":"font","folderPath":"folders/font.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"functions","folderPath":"folders/functions.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"3d","folderPath":"folders/functions/3d.yy",}, - {"resourceType":"GMFolder","resourceVersion":"1.0","name":"misc","folderPath":"folders/functions/3d/misc.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"action","folderPath":"folders/functions/action.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"animation","folderPath":"folders/functions/animation.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"async","folderPath":"folders/functions/async.yy",}, @@ -225,6 +224,10 @@ {"resourceType":"GMFolder","resourceVersion":"1.0","name":"biterator","folderPath":"folders/VCT/biterator.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"widget","folderPath":"folders/VCT/widget.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"widgets","folderPath":"folders/widgets.yy",}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"util","folderPath":"folders/functions/3d/util.yy",}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"light","folderPath":"folders/functions/3d/light.yy",}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"camera","folderPath":"folders/functions/3d/camera.yy",}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"mesh","folderPath":"folders/functions/3d/mesh.yy",}, ], "IncludedFiles": [ {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"ApolloHelp.html","ConfigValues":{"Itch":{"CopyToMask":"0",},},"CopyToMask":-1,"filePath":"datafiles",}, @@ -721,6 +724,7 @@ {"id":{"name":"sh_dither","path":"shaders/sh_dither/sh_dither.yy",},}, {"id":{"name":"control_function","path":"scripts/control_function/control_function.yy",},}, {"id":{"name":"node_region_fill","path":"scripts/node_region_fill/node_region_fill.yy",},}, + {"id":{"name":"sh_d3d_normal","path":"shaders/sh_d3d_normal/sh_d3d_normal.yy",},}, {"id":{"name":"panel_data","path":"scripts/panel_data/panel_data.yy",},}, {"id":{"name":"s_node_text_file_read","path":"sprites/s_node_text_file_read/s_node_text_file_read.yy",},}, {"id":{"name":"s_node_text_trim","path":"sprites/s_node_text_trim/s_node_text_trim.yy",},}, @@ -1176,6 +1180,7 @@ {"id":{"name":"s_node_surface_from_buffer","path":"sprites/s_node_surface_from_buffer/s_node_surface_from_buffer.yy",},}, {"id":{"name":"node_iterator_filter_output","path":"scripts/node_iterator_filter_output/node_iterator_filter_output.yy",},}, {"id":{"name":"color_function","path":"scripts/color_function/color_function.yy",},}, + {"id":{"name":"d3d_cube_faces","path":"scripts/d3d_cube_faces/d3d_cube_faces.yy",},}, {"id":{"name":"fd_rectangle_set_pressure_size","path":"scripts/fd_rectangle_set_pressure_size/fd_rectangle_set_pressure_size.yy",},}, {"id":{"name":"node_color_data","path":"scripts/node_color_data/node_color_data.yy",},}, {"id":{"name":"node_array_shift","path":"scripts/node_array_shift/node_array_shift.yy",},}, @@ -1753,6 +1758,7 @@ {"id":{"name":"node_fluid_add","path":"scripts/node_fluid_add/node_fluid_add.yy",},}, {"id":{"name":"BBMOD_Quaternion","path":"scripts/BBMOD_Quaternion/BBMOD_Quaternion.yy",},}, {"id":{"name":"d3d_cube","path":"scripts/d3d_cube/d3d_cube.yy",},}, + {"id":{"name":"d3d_group","path":"scripts/d3d_group/d3d_group.yy",},}, {"id":{"name":"o_dialog_output_visibility","path":"objects/o_dialog_output_visibility/o_dialog_output_visibility.yy",},}, {"id":{"name":"node_normal","path":"scripts/node_normal/node_normal.yy",},}, {"id":{"name":"s_node_glow","path":"sprites/s_node_glow/s_node_glow.yy",},}, diff --git a/datafiles/data/themes/default.zip b/datafiles/data/themes/default.zip index 152688c16..bc8470e43 100644 Binary files a/datafiles/data/themes/default.zip and b/datafiles/data/themes/default.zip differ diff --git a/scripts/_3d_rotation/_3d_rotation.yy b/scripts/_3d_rotation/_3d_rotation.yy index 2ac247a7e..d48a83bda 100644 --- a/scripts/_3d_rotation/_3d_rotation.yy +++ b/scripts/_3d_rotation/_3d_rotation.yy @@ -5,7 +5,7 @@ "isCompatibility": false, "isDnD": false, "parent": { - "name": "misc", - "path": "folders/functions/3d/misc.yy", + "name": "util", + "path": "folders/functions/3d/util.yy", }, } \ No newline at end of file diff --git a/scripts/__node_3d/__node_3d.gml b/scripts/__node_3d/__node_3d.gml index fce1fc994..72ebdcd26 100644 --- a/scripts/__node_3d/__node_3d.gml +++ b/scripts/__node_3d/__node_3d.gml @@ -1,18 +1,29 @@ -function Node_3D(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { - name = "3D"; - +function Node_3D(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { + name = "3D"; is_3D = true; - //inputs[| 0] = nodeValue("Array in", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, []) - // .setVisible(true, true); - - //outputs[| 0] = nodeValue("Shuffled array", self, JUNCTION_CONNECT.output, VALUE_TYPE.any, []); - static drawOverlay3D = function(active, params, _mx, _my, _snx, _sny, _panel) {} - static submit = function(params = {}, shader = noone) {} - static submitUI = function(params = {}, shader = noone) {} + static processData = function(_outSurf, _data, _output_index, _array_index) {} + static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {} - static update = function(frame = PROJECT.animator.current_frame) {} - static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {} + static getPreviewObject = function() { + if(ds_list_empty(outputs)) return []; + switch(outputs[| preview_channel].type) { + case VALUE_TYPE.d3Mesh : + case VALUE_TYPE.d3Light : + case VALUE_TYPE.d3Camera : + case VALUE_TYPE.d3Scene : break; + + default : return []; + } + + var _obj = outputs[| 0].getValue(); + if(is_array(_obj)) + _obj = array_safe_get(_obj, preview_index, noone); + + return [ _obj ]; + } + + static getPreviewObjectOutline = function() { return getPreviewObject() } } \ No newline at end of file diff --git a/scripts/__node_3d_light/__node_3d_light.gml b/scripts/__node_3d_light/__node_3d_light.gml index 9d2f96873..697733fc3 100644 --- a/scripts/__node_3d_light/__node_3d_light.gml +++ b/scripts/__node_3d_light/__node_3d_light.gml @@ -1,10 +1,8 @@ function Node_3D_Light(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) constructor { name = "3D Light"; - object = new __3dLight(); - if(!LOADING && !APPENDING) { + if(!LOADING && !APPENDING) inputs[| 0].setValue([ 0, 0, 1 ]); - } inputs[| input_d3d_index + 0] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); @@ -13,23 +11,27 @@ function Node_3D_Light(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) input_light_index = ds_list_size(inputs); - outputs[| 0] = nodeValue("Light", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3Light, object); + outputs[| 0] = nodeValue("Light", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3Light, noone); #macro __d3d_input_list_light ["Light", false], input_d3d_index + 0, input_d3d_index + 1 - static setLight = function() { - var _col = inputs[| input_d3d_index + 0].getValue(); - var _int = inputs[| input_d3d_index + 1].getValue(); + static setLight = function(light, _data) { + var _col = _data[input_d3d_index + 0]; + var _int = _data[input_d3d_index + 1]; - object.color = _col; - object.intensity = _int; + light.color = _col; + light.intensity = _int; - outputs[| 0].setValue(object); + return light; } - static update = function(frame = PROJECT.animator.current_frame) { - setTransform(); - setLight(); + static processData = function(_output, _data, _output_index, _array_index = 0) { + var object = new __3dLight(); + + setTransform(object, _data); + setLight(object, _data); + + return object; } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/__node_3d_mesh/__node_3d_mesh.gml b/scripts/__node_3d_mesh/__node_3d_mesh.gml index c3c1b0852..3fc2fce3d 100644 --- a/scripts/__node_3d_mesh/__node_3d_mesh.gml +++ b/scripts/__node_3d_mesh/__node_3d_mesh.gml @@ -7,9 +7,7 @@ function Node_3D_Mesh(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) c #macro __d3d_input_list_mesh ["Mesh", false] - static update = function(frame = PROJECT.animator.current_frame) { - setTransform(); - } + static processData = function(_output, _data, _output_index, _array_index = 0) {} static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/__node_3d_mesh_modifier/__node_3d_mesh_modifier.gml b/scripts/__node_3d_mesh_modifier/__node_3d_mesh_modifier.gml index 9db67539a..043a3c15e 100644 --- a/scripts/__node_3d_mesh_modifier/__node_3d_mesh_modifier.gml +++ b/scripts/__node_3d_mesh_modifier/__node_3d_mesh_modifier.gml @@ -1,7 +1,7 @@ function Node_3D_Mesh_Modifier(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constructor { name = "3D Mesh Modifier"; - static update = function(frame = PROJECT.animator.current_frame) { + static processData = function(_output, _data, _output_index, _array_index = 0) { } diff --git a/scripts/__node_3d_object/__node_3d_object.gml b/scripts/__node_3d_object/__node_3d_object.gml index 0faa410e5..b804c0d29 100644 --- a/scripts/__node_3d_object/__node_3d_object.gml +++ b/scripts/__node_3d_object/__node_3d_object.gml @@ -3,7 +3,7 @@ function Node_3D_Object(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constr h = 64; min_h = h; - object = new __3dObject(); + preview_channel = 0; inputs[| 0] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -460,21 +460,14 @@ function Node_3D_Object(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constr } } #endregion - static setTransform = function() { - var _pos = inputs[| 0].getValue(); - var _rot = inputs[| 1].getValue(); - var _sca = inputs[| 2].getValue(); + static setTransform = function(object, _data) { #region + var _pos = _data[0]; + var _rot = _data[1]; + var _sca = _data[2]; object.position.set(_pos[0], _pos[1], _pos[2]); object.rotation.set(_rot[0], _rot[1], _rot[2], _rot[3]); object.scale.set(_sca[0], _sca[1], _sca[2]); - - outputs[| 0].setValue(object); - } - - static submitShader = function(params = {}, shader = noone) { object.submitShader(params, shader); } - - static submitUI = function(params = {}, shader = noone) { object.submitUI(params, shader); } - static submit = function(params = {}, shader = noone) { object.submit(params, shader); } - static submitSel = function(params = {}, shader = noone) { object.submitSel(params, shader); } + return object; + } #endregion } \ No newline at end of file diff --git a/scripts/__node_value_processor/__node_value_processor.gml b/scripts/__node_value_processor/__node_value_processor.gml index ccc16d2e5..efad2660b 100644 --- a/scripts/__node_value_processor/__node_value_processor.gml +++ b/scripts/__node_value_processor/__node_value_processor.gml @@ -4,13 +4,13 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct process_amount = 0; inputs_data = []; - static process_data = function(_output, _data, _index) { return noone; } + static processData = function(_output, _data, _index) { return noone; } function preProcess(_outindex) { var _out = outputs[| _outindex].getValue(); if(process_amount == 0) //render single data - return process_data(_out, inputs_data, _outindex); + return processData(_out, inputs_data, _outindex); if(!is_array(_out)) _out = array_create(process_amount); @@ -39,7 +39,7 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct _data[i] = _in[_index]; } - _out[l] = process_data(_out[l], _data, _outindex); + _out[l] = processData(_out[l], _data, _outindex); } return _out; diff --git a/scripts/d3_vector/d3_vector.yy b/scripts/d3_vector/d3_vector.yy index fb2654298..c225297d6 100644 --- a/scripts/d3_vector/d3_vector.yy +++ b/scripts/d3_vector/d3_vector.yy @@ -5,7 +5,7 @@ "isCompatibility": false, "isDnD": false, "parent": { - "name": "misc", - "path": "folders/functions/3d/misc.yy", + "name": "util", + "path": "folders/functions/3d/util.yy", }, } \ No newline at end of file diff --git a/scripts/d3d_camera/d3d_camera.yy b/scripts/d3d_camera/d3d_camera.yy index b4ecfe6e5..4ee637c8a 100644 --- a/scripts/d3d_camera/d3d_camera.yy +++ b/scripts/d3d_camera/d3d_camera.yy @@ -5,7 +5,7 @@ "isCompatibility": false, "isDnD": false, "parent": { - "name": "3d", - "path": "folders/functions/3d.yy", + "name": "camera", + "path": "folders/functions/3d/camera.yy", }, } \ No newline at end of file diff --git a/scripts/d3d_camera_object/d3d_camera_object.yy b/scripts/d3d_camera_object/d3d_camera_object.yy index 3af9766d3..380387f0f 100644 --- a/scripts/d3d_camera_object/d3d_camera_object.yy +++ b/scripts/d3d_camera_object/d3d_camera_object.yy @@ -5,7 +5,7 @@ "isCompatibility": false, "isDnD": false, "parent": { - "name": "3d", - "path": "folders/functions/3d.yy", + "name": "camera", + "path": "folders/functions/3d/camera.yy", }, } \ No newline at end of file diff --git a/scripts/d3d_cube/d3d_cube.gml b/scripts/d3d_cube/d3d_cube.gml index 7752ec09f..babe38d7b 100644 --- a/scripts/d3d_cube/d3d_cube.gml +++ b/scripts/d3d_cube/d3d_cube.gml @@ -44,6 +44,26 @@ function __3dCube() : __3dObject() constructor { [0, -1, 0], [0, -1, 0], [0, -1, 0], [0, -1, 0], [0, -1, 0], [0, -1, 0] ]; + + uv = [ + [0, 0], [1, 0], [1, 1], + [0, 0], [1, 1], [0, 1], + + [0, 0], [1, 0], [1, 1], + [0, 0], [1, 1], [0, 1], + + [0, 0], [1, 0], [1, 1], + [0, 0], [1, 1], [0, 1], + + [0, 0], [1, 0], [1, 1], + [0, 0], [1, 1], [0, 1], + + [0, 0], [1, 0], [1, 1], + [0, 0], [1, 1], [0, 1], + + [0, 0], [1, 0], [1, 1], + [0, 0], [1, 1], [0, 1] + ]; VB = build(); } initModel(1); diff --git a/scripts/d3d_cube_faces/d3d_cube_faces.gml b/scripts/d3d_cube_faces/d3d_cube_faces.gml new file mode 100644 index 000000000..81cface95 --- /dev/null +++ b/scripts/d3d_cube_faces/d3d_cube_faces.gml @@ -0,0 +1,91 @@ +function __3dCubeFaces() : __3dObject() constructor { + VF = global.VF_POS_NORM_TEX_COL; + render_type = pr_trianglelist; + + static initModel = function(size) { + size /= 2; + + vertex = [ + [ + [-size, -size, size], [size, -size, size], [size, size, size], + [-size, -size, size], [size, size, size], [-size, size, size], + ], + [ + [-size, -size, -size], [size, -size, -size], [size, size, -size], + [-size, -size, -size], [size, size, -size], [-size, size, -size], + ], + [ + [-size, -size, size], [-size, size, size], [-size, size, -size], + [-size, -size, size], [-size, size, -size], [-size, -size, -size], + ], + [ + [size, -size, size], [size, size, size], [size, size, -size], + [size, -size, size], [size, size, -size], [size, -size, -size], + ], + [ + [-size, size, size], [size, size, size], [size, size, -size], + [-size, size, size], [size, size, -size], [-size, size, -size], + ], + [ + [-size, -size, size], [size, -size, size], [size, -size, -size], + [-size, -size, size], [size, -size, -size], [-size, -size, -size] + ] + ]; + + normals = [ + [ + [0, 0, 1], [0, 0, 1], [0, 0, 1], + [0, 0, 1], [0, 0, 1], [0, 0, 1], + ], + [ + [0, 0, -1], [0, 0, -1], [0, 0, -1], + [0, 0, -1], [0, 0, -1], [0, 0, -1], + ], + [ + [-1, 0, 0], [-1, 0, 0], [-1, 0, 0], + [-1, 0, 0], [-1, 0, 0], [-1, 0, 0], + ], + [ + [1, 0, 0], [1, 0, 0], [1, 0, 0], + [1, 0, 0], [1, 0, 0], [1, 0, 0], + ], + [ + [0, 1, 0], [0, 1, 0], [0, 1, 0], + [0, 1, 0], [0, 1, 0], [0, 1, 0], + ], + [ + [0, -1, 0], [0, -1, 0], [0, -1, 0], + [0, -1, 0], [0, -1, 0], [0, -1, 0] + ] + ]; + + uv = [ + [ + [0, 0], [1, 0], [1, 1], + [0, 0], [1, 1], [0, 1], + ], + [ + [0, 0], [1, 0], [1, 1], + [0, 0], [1, 1], [0, 1], + ], + [ + [0, 0], [1, 0], [1, 1], + [0, 0], [1, 1], [0, 1], + ], + [ + [0, 0], [1, 0], [1, 1], + [0, 0], [1, 1], [0, 1], + ], + [ + [0, 0], [1, 0], [1, 1], + [0, 0], [1, 1], [0, 1], + ], + [ + [0, 0], [1, 0], [1, 1], + [0, 0], [1, 1], [0, 1] + ] + ]; + + VB = build(); + } initModel(1); +} \ No newline at end of file diff --git a/scripts/d3d_cube_faces/d3d_cube_faces.yy b/scripts/d3d_cube_faces/d3d_cube_faces.yy new file mode 100644 index 000000000..7a0ec518c --- /dev/null +++ b/scripts/d3d_cube_faces/d3d_cube_faces.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "d3d_cube_faces", + "isCompatibility": false, + "isDnD": false, + "parent": { + "name": "mesh", + "path": "folders/functions/3d/mesh.yy", + }, +} \ No newline at end of file diff --git a/scripts/d3d_group/d3d_group.gml b/scripts/d3d_group/d3d_group.gml new file mode 100644 index 000000000..af72d488e --- /dev/null +++ b/scripts/d3d_group/d3d_group.gml @@ -0,0 +1,13 @@ +function __3dGroup() constructor { + objects = []; + + static _submit = function(callback, params = {}, shader = noone) { + for( var i = 0, n = array_length(objects); i < n; i++ ) + callback(objects[i], params, shader); + } + + static submitShader = function(params = {}) { _submit(function(_obj, params) { _obj.submitShader(params); }, params); } + static submitSel = function(params = {}) { _submit(function(_obj, params) { _obj.submitSel(params); }, params); } + static submitUI = function(params = {}, shader = noone) { _submit(function(_obj, params, shader) { _obj.submitUI(params, shader); }, params); } + static submit = function(params = {}, shader = noone) { _submit(function(_obj, params, shader) { _obj.submit(params, shader); }, params); } +} \ No newline at end of file diff --git a/scripts/d3d_group/d3d_group.yy b/scripts/d3d_group/d3d_group.yy new file mode 100644 index 000000000..19e2afd95 --- /dev/null +++ b/scripts/d3d_group/d3d_group.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "d3d_group", + "isCompatibility": false, + "isDnD": false, + "parent": { + "name": "3d", + "path": "folders/functions/3d.yy", + }, +} \ No newline at end of file diff --git a/scripts/d3d_light/d3d_light.yy b/scripts/d3d_light/d3d_light.yy index dc67ea0fd..296ea1be1 100644 --- a/scripts/d3d_light/d3d_light.yy +++ b/scripts/d3d_light/d3d_light.yy @@ -5,7 +5,7 @@ "isCompatibility": false, "isDnD": false, "parent": { - "name": "3d", - "path": "folders/functions/3d.yy", + "name": "light", + "path": "folders/functions/3d/light.yy", }, } \ No newline at end of file diff --git a/scripts/d3d_light_directional/d3d_light_directional.yy b/scripts/d3d_light_directional/d3d_light_directional.yy index f8e234ae3..4a3a4a100 100644 --- a/scripts/d3d_light_directional/d3d_light_directional.yy +++ b/scripts/d3d_light_directional/d3d_light_directional.yy @@ -5,7 +5,7 @@ "isCompatibility": false, "isDnD": false, "parent": { - "name": "3d", - "path": "folders/functions/3d.yy", + "name": "light", + "path": "folders/functions/3d/light.yy", }, } \ No newline at end of file diff --git a/scripts/d3d_light_point/d3d_light_point.yy b/scripts/d3d_light_point/d3d_light_point.yy index f2e76ee07..5d6740ba3 100644 --- a/scripts/d3d_light_point/d3d_light_point.yy +++ b/scripts/d3d_light_point/d3d_light_point.yy @@ -5,7 +5,7 @@ "isCompatibility": false, "isDnD": false, "parent": { - "name": "3d", - "path": "folders/functions/3d.yy", + "name": "light", + "path": "folders/functions/3d/light.yy", }, } \ No newline at end of file diff --git a/scripts/d3d_matrix3/d3d_matrix3.yy b/scripts/d3d_matrix3/d3d_matrix3.yy index 222c62580..a417eec8a 100644 --- a/scripts/d3d_matrix3/d3d_matrix3.yy +++ b/scripts/d3d_matrix3/d3d_matrix3.yy @@ -5,7 +5,7 @@ "isCompatibility": false, "isDnD": false, "parent": { - "name": "3d", - "path": "folders/functions/3d.yy", + "name": "util", + "path": "folders/functions/3d/util.yy", }, } \ No newline at end of file diff --git a/scripts/d3d_matrix4/d3d_matrix4.yy b/scripts/d3d_matrix4/d3d_matrix4.yy index 37733e5ea..0266cfee2 100644 --- a/scripts/d3d_matrix4/d3d_matrix4.yy +++ b/scripts/d3d_matrix4/d3d_matrix4.yy @@ -5,7 +5,7 @@ "isCompatibility": false, "isDnD": false, "parent": { - "name": "3d", - "path": "folders/functions/3d.yy", + "name": "util", + "path": "folders/functions/3d/util.yy", }, } \ No newline at end of file diff --git a/scripts/d3d_object/d3d_object.gml b/scripts/d3d_object/d3d_object.gml index 2ec09f9ce..910d1de5e 100644 --- a/scripts/d3d_object/d3d_object.gml +++ b/scripts/d3d_object/d3d_object.gml @@ -26,10 +26,10 @@ function __3dObject() constructor { rotation = new BBMOD_Quaternion(); scale = new __vec3(1, 1, 1); - static build = function(_buffer = VB, _vertex = vertex, _normal = normals) { #region - if(_buffer != noone) vertex_delete_buffer(_buffer); - - _buffer = vertex_create_buffer(); + texture = -1; + + static buildVertex = function(_vertex, _normal, _uv) { + var _buffer = vertex_create_buffer(); vertex_begin(_buffer, VF); for( var i = 0, n = array_length(_vertex); i < n; i++ ) { var v = _vertex[i]; @@ -44,12 +44,13 @@ function __3dObject() constructor { break; case global.VF_POS_NORM_TEX_COL : var nor = _normal[i]; - var cc = array_length(v) > 3? v[3] : c_white; - var aa = array_length(v) > 4? v[4] : 1; + var uuv = array_safe_get(_uv, i, [ 0, 0 ]); + var cc = array_length(v) > 3? v[3] : c_white; + var aa = array_length(v) > 4? v[4] : 1; vertex_position_3d(_buffer, v[0], v[1], v[2]); vertex_normal(_buffer, nor[0], nor[1], nor[2]); - vertex_texcoord(_buffer, 0, 0); + vertex_texcoord(_buffer, uuv[0], uuv[1]); vertex_color(_buffer, cc, aa); break; } @@ -57,6 +58,24 @@ function __3dObject() constructor { vertex_end(_buffer); return _buffer; + } + + static build = function(_buffer = VB, _vertex = vertex, _normal = normals, _uv = uv) { #region + if(is_array(_buffer)) { + for( var i = 0, n = array_length(_buffer); i < n; i++ ) + vertex_delete_buffer(_buffer[i]) + } else if(_buffer != noone) vertex_delete_buffer(_buffer); + + if(array_empty(_vertex)) return noone; + var _buffer_count = is_array(_vertex[0][0])? array_length(_vertex) : 0; + + if(_buffer_count == 0) return buildVertex(_vertex, _normal, _uv); + + var _res = array_create(_buffer_count); + for( var i = 0; i < _buffer_count; i++ ) + _res[i] = buildVertex(_vertex[i], _normal[i], _uv[i]); + + return _res; } #endregion static preSubmitVertex = function(params = {}) {} @@ -96,9 +115,13 @@ function __3dObject() constructor { matrix_stack_push(rot); matrix_stack_push(sca); matrix_set(matrix_world, matrix_stack_top()); - - vertex_submit(VB, render_type, -1); - + + if(is_array(VB)) { + for( var i = 0, n = array_length(VB); i < n; i++ ) + vertex_submit(VB[i], render_type, array_safe_get(texture, i, -1)); + } else + vertex_submit(VB, render_type, texture); + matrix_stack_clear(); matrix_set(matrix_world, matrix_build_identity()); } diff --git a/scripts/d3d_plane/d3d_plane.yy b/scripts/d3d_plane/d3d_plane.yy index ab589dee7..f3a77a55f 100644 --- a/scripts/d3d_plane/d3d_plane.yy +++ b/scripts/d3d_plane/d3d_plane.yy @@ -5,7 +5,7 @@ "isCompatibility": false, "isDnD": false, "parent": { - "name": "3d", - "path": "folders/functions/3d.yy", + "name": "util", + "path": "folders/functions/3d/util.yy", }, } \ No newline at end of file diff --git a/scripts/d3d_rot3/d3d_rot3.yy b/scripts/d3d_rot3/d3d_rot3.yy index 490b11c54..d3cf7114b 100644 --- a/scripts/d3d_rot3/d3d_rot3.yy +++ b/scripts/d3d_rot3/d3d_rot3.yy @@ -5,7 +5,7 @@ "isCompatibility": false, "isDnD": false, "parent": { - "name": "3d", - "path": "folders/functions/3d.yy", + "name": "util", + "path": "folders/functions/3d/util.yy", }, } \ No newline at end of file diff --git a/scripts/d3d_vec3/d3d_vec3.gml b/scripts/d3d_vec3/d3d_vec3.gml index 2ee77a760..c48c64218 100644 --- a/scripts/d3d_vec3/d3d_vec3.gml +++ b/scripts/d3d_vec3/d3d_vec3.gml @@ -157,6 +157,13 @@ function __vec3(_x = 0, _y = 0, _z = 0) constructor { z = lerp(z, to.z, speed); } + static _lerp_float = function(to, speed = 5, pre = 0.01) { + gml_pragma("forceinline"); + x = lerp_float(x, to.x, speed, pre); + y = lerp_float(y, to.y, speed, pre); + z = lerp_float(z, to.z, speed, pre); + } + static equal = function(to) { gml_pragma("forceinline"); return x == to.x && y == to.y && z == to.z; diff --git a/scripts/d3d_vec3/d3d_vec3.yy b/scripts/d3d_vec3/d3d_vec3.yy index f47270815..ef49e3dd8 100644 --- a/scripts/d3d_vec3/d3d_vec3.yy +++ b/scripts/d3d_vec3/d3d_vec3.yy @@ -5,7 +5,7 @@ "isCompatibility": false, "isDnD": false, "parent": { - "name": "3d", - "path": "folders/functions/3d.yy", + "name": "util", + "path": "folders/functions/3d/util.yy", }, } \ No newline at end of file diff --git a/scripts/d3d_vec4/d3d_vec4.gml b/scripts/d3d_vec4/d3d_vec4.gml index c59fe8504..764329774 100644 --- a/scripts/d3d_vec4/d3d_vec4.gml +++ b/scripts/d3d_vec4/d3d_vec4.gml @@ -153,6 +153,14 @@ function __vec4(_x = 0, _y = 0, _z = 0, _w = 0) constructor { w = lerp(w, to.w, speed); } + static _lerp_float = function(to, speed = 5, pre = 0.01) { + gml_pragma("forceinline"); + x = lerp_float(x, to.x, speed, pre); + y = lerp_float(y, to.y, speed, pre); + z = lerp_float(z, to.z, speed, pre); + w = lerp_float(w, to.w, speed, pre); + } + static equal = function(to) { gml_pragma("forceinline"); return x == to.x && y == to.y && z == to.z && w == to.w; diff --git a/scripts/d3d_vec4/d3d_vec4.yy b/scripts/d3d_vec4/d3d_vec4.yy index 6eba5534c..848b3df24 100644 --- a/scripts/d3d_vec4/d3d_vec4.yy +++ b/scripts/d3d_vec4/d3d_vec4.yy @@ -5,7 +5,7 @@ "isCompatibility": false, "isDnD": false, "parent": { - "name": "3d", - "path": "folders/functions/3d.yy", + "name": "util", + "path": "folders/functions/3d/util.yy", }, } \ No newline at end of file diff --git a/scripts/lerp_float/lerp_float.gml b/scripts/lerp_float/lerp_float.gml index 3be202e38..a9dff7604 100644 --- a/scripts/lerp_float/lerp_float.gml +++ b/scripts/lerp_float/lerp_float.gml @@ -1,23 +1,13 @@ -/// @description lerp_float -/// @param from -/// @param to -/// @param speed -/// @param *precision -function lerp_float(from, to, speed) { +function lerp_float(from, to, speed, pre = 0.01) { if(fps < 15) return to; - var pre = argument_count > 3? argument[3] : 0.01; - if(abs(from - to) < pre) - return to; - else - return from + (to - from) * (1 - power(1 - 1 / speed, delta_time / 1000000 * game_get_speed(gamespeed_fps))); + if(abs(from - to) < pre) return to; + return from + (to - from) * (1 - power(1 - 1 / speed, delta_time / 1000000 * game_get_speed(gamespeed_fps))); } function lerp_linear(from, to, speed) { - if(abs(from - to) < speed) - return to; - else - return from + sign(to - from) * speed; + if(abs(from - to) < speed) return to; + return from + sign(to - from) * speed; } function lerp_angle_direct(from, to, speed) { @@ -37,4 +27,9 @@ function lerp_angle_linear(from, to, speed) { function lerp_float_angle(from, to, ratio) { return from + angle_difference(to, from) * ratio; +} + +function lerp_color(from, to, ratio) { + if(abs(from - to) < 1) return to; + return merge_color(from, to, ratio); } \ No newline at end of file diff --git a/scripts/node_2d_light/node_2d_light.gml b/scripts/node_2d_light/node_2d_light.gml index 490278558..ce2de3126 100644 --- a/scripts/node_2d_light/node_2d_light.gml +++ b/scripts/node_2d_light/node_2d_light.gml @@ -92,7 +92,7 @@ function Node_2D_light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) } } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _shape = _data[1]; switch(_shape) { diff --git a/scripts/node_3d_camera/node_3d_camera.gml b/scripts/node_3d_camera/node_3d_camera.gml index bc1991088..7859ec258 100644 --- a/scripts/node_3d_camera/node_3d_camera.gml +++ b/scripts/node_3d_camera/node_3d_camera.gml @@ -44,25 +44,25 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) static step = function() { var _proj = inputs[| input_d3d_index + 3].getValue(); + inputs[| input_d3d_index + 0].setVisible(_proj == 0); inputs[| input_d3d_index + 8].setVisible(_proj == 1); } - static update = function(frame = PROJECT.animator.current_frame) { - setTransform(); + static processData = function(_output, _data, _output_index, _array_index = 0) { #region + var _pos = _data[0]; + var _rot = _data[1]; - var _pos = inputs[| 0].getValue(); - var _rot = inputs[| 1].getValue(); - - var _fov = inputs[| input_d3d_index + 0].getValue(); - var _clip = inputs[| input_d3d_index + 1].getValue(); - var _dim = inputs[| input_d3d_index + 2].getValue(); - var _proj = inputs[| input_d3d_index + 3].getValue(); - var _scne = inputs[| input_d3d_index + 4].getValue(); - var _ambt = inputs[| input_d3d_index + 5].getValue(); - var _dbg = inputs[| input_d3d_index + 6].getValue(); - var _back = inputs[| input_d3d_index + 7].getValue(); - var _orts = inputs[| input_d3d_index + 8].getValue(); + var _fov = _data[input_d3d_index + 0]; + var _clip = _data[input_d3d_index + 1]; + var _dim = _data[input_d3d_index + 2]; + var _proj = _data[input_d3d_index + 3]; + var _scne = _data[input_d3d_index + 4]; + var _ambt = _data[input_d3d_index + 5]; + var _dbg = _data[input_d3d_index + 6]; + var _back = _data[input_d3d_index + 7]; + var _orts = _data[input_d3d_index + 8]; + setTransform(object, _data); if(_scne == noone) return; camera.position.set(_pos[0], _pos[1], _pos[2]); @@ -71,17 +71,15 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) camera.setViewFov(_fov, _clip[0], _clip[1]); if(_proj == 0) camera.setViewSize(_dim[0], _dim[1]); - else if(_proj == 1) camera.setViewSize(_dim[0] / _orts, _dim[1] / _orts); + else if(_proj == 1) camera.setViewSize(1 / _orts, _dim[0] / _dim[1] / _orts); scene.lightAmbient = _ambt; - var _outSurf = outputs[| 0].getValue(); - _outSurf = surface_verify(_outSurf, _dim[0], _dim[1]); - outputs[| 0].setValue(_outSurf); + _output = surface_verify(_output, _dim[0], _dim[1]); camera.setMatrix(); - surface_set_target(_outSurf); + surface_set_target(_output); if(_dbg) draw_clear(_ambt); else DRAW_CLEAR @@ -99,40 +97,21 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) _scne.submit(scene); //////////////// SUBMIT //////////////// surface_reset_target(); - gpu_set_cullmode(cull_noculling); - } + + return _output; + } #endregion static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { } - static submitShader = function(params = {}, shader = noone) { - object.submitShader(params, shader); + static getPreviewObject = function() { + var _scene = array_safe_get(all_inputs, input_d3d_index + 4, []); + _scene = array_safe_get(_scene, preview_index); - var _scne = inputs[| input_d3d_index + 4].getValue(); - if(_scne == noone) return; - _scne.submitShader(params, shader); + return [ object, _scene ]; } - static submitUI = function(params = {}, shader = noone) { - object.submitUI(params, shader); - - var _scne = inputs[| input_d3d_index + 4].getValue(); - if(_scne == noone) return; - _scne.submitUI(params, shader); - } - - static submit = function(params = {}, shader = noone) { - object.submit(params, shader); - - var _scne = inputs[| input_d3d_index + 4].getValue(); - if(_scne == noone) return; - _scne.submit(params, shader); - } - - static submitSel = function(params = {}, shader = noone) { - object.submitSel(params, shader); - } - + static getPreviewObjectOutline = function() { return [ object ]; } } \ No newline at end of file diff --git a/scripts/node_3d_depth/node_3d_depth.gml b/scripts/node_3d_depth/node_3d_depth.gml index a06d3ce7f..a334fabcb 100644 --- a/scripts/node_3d_depth/node_3d_depth.gml +++ b/scripts/node_3d_depth/node_3d_depth.gml @@ -18,7 +18,7 @@ function Node_3D_Depth(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); attribute_interpolation(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _tex = _data[0]; var _dep = _data[1]; var _rot = _data[2]; diff --git a/scripts/node_3d_displace/node_3d_displace.gml b/scripts/node_3d_displace/node_3d_displace.gml index f7ebacfc7..c901d3536 100644 --- a/scripts/node_3d_displace/node_3d_displace.gml +++ b/scripts/node_3d_displace/node_3d_displace.gml @@ -102,7 +102,7 @@ function Node_3D_Displace(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 13].setVisible(_proj); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { if(_output_index == 1) return undefined; if(_output_index == 3) return vertexObjects; diff --git a/scripts/node_3d_extrude/node_3d_extrude.gml b/scripts/node_3d_extrude/node_3d_extrude.gml index 94b4caef7..567f92390 100644 --- a/scripts/node_3d_extrude/node_3d_extrude.gml +++ b/scripts/node_3d_extrude/node_3d_extrude.gml @@ -434,7 +434,7 @@ function Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _group textures = []; - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { if(mesh_generating) return; if(_output_index == 3) return vertexObjects; diff --git a/scripts/node_3d_light_directional/node_3d_light_directional.gml b/scripts/node_3d_light_directional/node_3d_light_directional.gml index 778238b6f..12be4e07e 100644 --- a/scripts/node_3d_light_directional/node_3d_light_directional.gml +++ b/scripts/node_3d_light_directional/node_3d_light_directional.gml @@ -1,17 +1,20 @@ function Node_3D_Light_Directional(_x, _y, _group = noone) : Node_3D_Light(_x, _y, _group) constructor { name = "Directional Light"; - object = new __3dLightDirectional(); input_display_list = [ ["Transform", false], 0, __d3d_input_list_light, ] - static update = function(frame = PROJECT.animator.current_frame) { - setTransform(); - setLight(); + static processData = function(_output, _data, _output_index, _array_index = 0) { + var object = new __3dLightDirectional(); + + setTransform(object, _data); + setLight(object, _data); var _rot = new __rot3().lookAt(object.position, new __vec3()); object.rotation.FromEuler(_rot.x, _rot.y, _rot.z); + + return object; } } \ No newline at end of file diff --git a/scripts/node_3d_light_point/node_3d_light_point.gml b/scripts/node_3d_light_point/node_3d_light_point.gml index 1c77c422b..b4673e5cc 100644 --- a/scripts/node_3d_light_point/node_3d_light_point.gml +++ b/scripts/node_3d_light_point/node_3d_light_point.gml @@ -1,6 +1,5 @@ function Node_3D_Light_Point(_x, _y, _group = noone) : Node_3D_Light(_x, _y, _group) constructor { name = "Point Light"; - object = new __3dLightPoint(); inputs[| input_light_index + 0] = nodeValue("Radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4) @@ -9,11 +8,15 @@ function Node_3D_Light_Point(_x, _y, _group = noone) : Node_3D_Light(_x, _y, _gr __d3d_input_list_light, input_light_index, ] - static update = function(frame = PROJECT.animator.current_frame) { - setTransform(); - setLight(); + static processData = function(_output, _data, _output_index, _array_index = 0) { + var object = new __3dLightPoint(); + + setTransform(object, _data); + setLight(object, _data); var _rad = inputs[| input_light_index + 0].getValue(); object.radius = _rad; + + return object; } } \ No newline at end of file diff --git a/scripts/node_3d_mesh_cube/node_3d_mesh_cube.gml b/scripts/node_3d_mesh_cube/node_3d_mesh_cube.gml index 9c2b50ed1..8fc39dcbe 100644 --- a/scripts/node_3d_mesh_cube/node_3d_mesh_cube.gml +++ b/scripts/node_3d_mesh_cube/node_3d_mesh_cube.gml @@ -1,9 +1,63 @@ function Node_3D_Mesh_Cube(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _group) constructor { - name = "3D Cube"; - object = new __3dCube(); + name = "3D Cube"; + + inputs[| input_mesh_index + 0] = nodeValue("Texture per side", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false ); + + inputs[| input_mesh_index + 1] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); + + inputs[| input_mesh_index + 2] = nodeValue("Texture 2", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); + + inputs[| input_mesh_index + 3] = nodeValue("Texture 3", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); + + inputs[| input_mesh_index + 4] = nodeValue("Texture 4", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); + + inputs[| input_mesh_index + 5] = nodeValue("Texture 5", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); + + inputs[| input_mesh_index + 6] = nodeValue("Texture 6", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ); input_display_list = [ __d3d_input_list_mesh, __d3d_input_list_transform, + ["Texture", false], input_mesh_index + 0, input_mesh_index + 1, input_mesh_index + 2, input_mesh_index + 3, + input_mesh_index + 4, input_mesh_index + 5, input_mesh_index + 6, ] + + static step = function() { #region + var _tex_side = inputs[| input_mesh_index + 0].getValue(); + + inputs[| input_mesh_index + 1].name = _tex_side? "Texture 1" : "Texture"; + inputs[| input_mesh_index + 1].setVisible(true, true); + inputs[| input_mesh_index + 2].setVisible(_tex_side, _tex_side); + inputs[| input_mesh_index + 3].setVisible(_tex_side, _tex_side); + inputs[| input_mesh_index + 4].setVisible(_tex_side, _tex_side); + inputs[| input_mesh_index + 5].setVisible(_tex_side, _tex_side); + inputs[| input_mesh_index + 6].setVisible(_tex_side, _tex_side); + } #endregion + + static processData = function(_output, _data, _output_index, _array_index = 0) { #region + var _tex_side = _data[input_mesh_index + 0]; + var _tex_1 = _data[input_mesh_index + 1]; + var _tex_2 = _data[input_mesh_index + 2]; + var _tex_3 = _data[input_mesh_index + 3]; + var _tex_4 = _data[input_mesh_index + 4]; + var _tex_5 = _data[input_mesh_index + 5]; + var _tex_6 = _data[input_mesh_index + 6]; + + var object; + if(_tex_side) { + object = new __3dCubeFaces(); + object.texture = [ surface_texture(_tex_1), surface_texture(_tex_2), + surface_texture(_tex_3), surface_texture(_tex_4), + surface_texture(_tex_5), surface_texture(_tex_6) ]; + } else { + object = new __3dCube(); + object.texture = surface_texture(_tex_1); + } + + setTransform(object, _data); + + return object; + } #endregion + + static getPreviewValues = function() { return array_safe_get(all_inputs, input_mesh_index + 1, noone); } } \ No newline at end of file diff --git a/scripts/node_3d_plane/node_3d_plane.gml b/scripts/node_3d_plane/node_3d_plane.gml index a4fea0cc1..752f2d780 100644 --- a/scripts/node_3d_plane/node_3d_plane.gml +++ b/scripts/node_3d_plane/node_3d_plane.gml @@ -140,7 +140,7 @@ function Node_3D_Plane(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) _3d_clear_local_transform(); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { if(_output_index == 2) return vertexObjects; if(!is_surface(_data[0])) return _outSurf; diff --git a/scripts/node_3d_prim_cone/node_3d_prim_cone.gml b/scripts/node_3d_prim_cone/node_3d_prim_cone.gml index 70fe5ec27..7a0db6177 100644 --- a/scripts/node_3d_prim_cone/node_3d_prim_cone.gml +++ b/scripts/node_3d_prim_cone/node_3d_prim_cone.gml @@ -145,7 +145,7 @@ function Node_3D_Cone(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c _3d_clear_local_transform(); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { if(_output_index == 3) return vertexObjects; var _sides = _data[14]; diff --git a/scripts/node_3d_prim_cube/node_3d_prim_cube.gml b/scripts/node_3d_prim_cube/node_3d_prim_cube.gml index 6e16ac4a3..10dd99871 100644 --- a/scripts/node_3d_prim_cube/node_3d_prim_cube.gml +++ b/scripts/node_3d_prim_cube/node_3d_prim_cube.gml @@ -102,7 +102,7 @@ function Node_3D_Cube(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c _3d_clear_local_transform(); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { if(_output_index == 1) return undefined; if(_output_index == 3) return vertexObjects; diff --git a/scripts/node_3d_prim_cylinder/node_3d_prim_cylinder.gml b/scripts/node_3d_prim_cylinder/node_3d_prim_cylinder.gml index c7fe02425..a4317bad0 100644 --- a/scripts/node_3d_prim_cylinder/node_3d_prim_cylinder.gml +++ b/scripts/node_3d_prim_cylinder/node_3d_prim_cylinder.gml @@ -166,7 +166,7 @@ function Node_3D_Cylinder(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou _3d_clear_local_transform(); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { if(_output_index == 3) return vertexObjects; var _sides = _data[0]; diff --git a/scripts/node_3d_prim_sphere/node_3d_prim_sphere.gml b/scripts/node_3d_prim_sphere/node_3d_prim_sphere.gml index 4a5f31267..6844f3de2 100644 --- a/scripts/node_3d_prim_sphere/node_3d_prim_sphere.gml +++ b/scripts/node_3d_prim_sphere/node_3d_prim_sphere.gml @@ -157,7 +157,7 @@ function Node_3D_Sphere(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) _3d_clear_local_transform(); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { if(_output_index == 3) return vertexObjects; var _subd = _data[0]; diff --git a/scripts/node_3d_scene/node_3d_scene.gml b/scripts/node_3d_scene/node_3d_scene.gml index 0f1dd9af4..49e443ab8 100644 --- a/scripts/node_3d_scene/node_3d_scene.gml +++ b/scripts/node_3d_scene/node_3d_scene.gml @@ -1,10 +1,7 @@ function Node_3D_Scene(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constructor { name = "3D Scene"; - //inputs[| 0] = nodeValue("Array in", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, []) - // .setVisible(true, true); - - outputs[| 0] = nodeValue("Scene", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3Scene, self); + outputs[| 0] = nodeValue("Scene", self, JUNCTION_CONNECT.output, VALUE_TYPE.d3Scene, noone); setIsDynamicInput(1); @@ -42,26 +39,18 @@ function Node_3D_Scene(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constru refreshDynamicInput(); } - static update = function(frame = PROJECT.animator.current_frame) { - object_lists = []; + static processData = function(_output, _data, _output_index, _array_index = 0) { + var _scene = new __3dGroup(); for( var i = input_fix_len, n = ds_list_size(inputs); i < n; i += data_length ) { - var _obj = inputs[| i].getValue(); + var _obj = _data[i]; if(_obj == noone) continue; - array_push(object_lists, _obj); + array_push(_scene.objects, _obj); } + + return _scene; } - static _submit = function(callback, params = {}, shader = noone) { - for( var i = 0, n = array_length(object_lists); i < n; i++ ) - callback(object_lists[i], params, shader); - } - - static submitShader = function(params = {}) { _submit(function(_obj, params) { _obj.submitShader(params); }, params); } - static submitSel = function(params = {}) { _submit(function(_obj, params) { _obj.submitSel(params); }, params); } - static submitUI = function(params = {}, shader = noone) { _submit(function(_obj, params, shader) { _obj.submitUI(params, shader); }, params); } - static submit = function(params = {}, shader = noone) { _submit(function(_obj, params, shader) { _obj.submit(params, shader); }, params); } - static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {} } \ No newline at end of file diff --git a/scripts/node_3d_transform/node_3d_transform.gml b/scripts/node_3d_transform/node_3d_transform.gml index 969cef3c8..4309c0b00 100644 --- a/scripts/node_3d_transform/node_3d_transform.gml +++ b/scripts/node_3d_transform/node_3d_transform.gml @@ -90,7 +90,7 @@ function Node_3D_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[| 13].setVisible(_proj); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { if(_output_index == 1) return undefined; var _dim = _data[0]; diff --git a/scripts/node_9slice/node_9slice.gml b/scripts/node_9slice/node_9slice.gml index a9dc98362..36d0d632f 100644 --- a/scripts/node_9slice/node_9slice.gml +++ b/scripts/node_9slice/node_9slice.gml @@ -110,7 +110,7 @@ function Node_9Slice(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co } } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _inSurf = _data[0]; var _dim = _data[1]; var _splice = _data[2]; diff --git a/scripts/node_FFT/node_FFT.gml b/scripts/node_FFT/node_FFT.gml index 0c3280f8b..bad40d362 100644 --- a/scripts/node_FFT/node_FFT.gml +++ b/scripts/node_FFT/node_FFT.gml @@ -16,7 +16,7 @@ function Node_FFT(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) const outputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, []) .setArrayDepth(1); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _dat = _data[0]; var _pre = _data[1]; var _cmp = []; diff --git a/scripts/node_FXAA/node_FXAA.gml b/scripts/node_FXAA/node_FXAA.gml index 763436836..29c277295 100644 --- a/scripts/node_FXAA/node_FXAA.gml +++ b/scripts/node_FXAA/node_FXAA.gml @@ -15,7 +15,7 @@ function Node_FXAA(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { surface_set_shader(_outSurf, sh_FXAA); gpu_set_tex_filter(true); shader_set_f("dimension", surface_get_width(_data[0]), surface_get_height(_data[0])); diff --git a/scripts/node_VCT/node_VCT.gml b/scripts/node_VCT/node_VCT.gml index 9364d65cc..2dc3c49cf 100644 --- a/scripts/node_VCT/node_VCT.gml +++ b/scripts/node_VCT/node_VCT.gml @@ -31,7 +31,7 @@ function Node_VCT(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) const array_append(input_display_list, [ index ]); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { for( var i = 1; i < array_length(_data); i++ ) vct[$ inputs[| i].extra_data.key].setDirect(_data[i]); diff --git a/scripts/node_alpha_cutoff/node_alpha_cutoff.gml b/scripts/node_alpha_cutoff/node_alpha_cutoff.gml index b1bd2f2a7..3ef521214 100644 --- a/scripts/node_alpha_cutoff/node_alpha_cutoff.gml +++ b/scripts/node_alpha_cutoff/node_alpha_cutoff.gml @@ -23,7 +23,7 @@ function Node_Alpha_Cutoff(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { surface_set_target(_outSurf); DRAW_CLEAR BLEND_OVERRIDE; diff --git a/scripts/node_alpha_hash/node_alpha_hash.gml b/scripts/node_alpha_hash/node_alpha_hash.gml index aa016e28e..58fbe63d6 100644 --- a/scripts/node_alpha_hash/node_alpha_hash.gml +++ b/scripts/node_alpha_hash/node_alpha_hash.gml @@ -20,7 +20,7 @@ function Node_Alpha_Hash(_x, _y, _group = noone) : Node_Processor(_x, _y, _group attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { surface_set_target(_outSurf); DRAW_CLEAR BLEND_OVERRIDE; diff --git a/scripts/node_alpha_to_grey/node_alpha_to_grey.gml b/scripts/node_alpha_to_grey/node_alpha_to_grey.gml index 55776fbe1..9ac49a1af 100644 --- a/scripts/node_alpha_to_grey/node_alpha_to_grey.gml +++ b/scripts/node_alpha_to_grey/node_alpha_to_grey.gml @@ -14,7 +14,7 @@ function Node_Alpha_Grey(_x, _y, _group = noone) : Node_Processor(_x, _y, _group attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { surface_set_target(_outSurf); DRAW_CLEAR BLEND_OVERRIDE; diff --git a/scripts/node_animate_curve/node_animate_curve.gml b/scripts/node_animate_curve/node_animate_curve.gml index 63a9f4527..90f8e3983 100644 --- a/scripts/node_animate_curve/node_animate_curve.gml +++ b/scripts/node_animate_curve/node_animate_curve.gml @@ -14,7 +14,7 @@ function Node_Anim_Curve(_x, _y, _group = noone) : Node_Processor(_x, _y, _group outputs[| 0] = nodeValue("Curve", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, []); - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { var curve = _data[0]; var time = _data[1]; var _min = _data[2]; diff --git a/scripts/node_area/node_area.gml b/scripts/node_area/node_area.gml index f642fc6df..083bfda76 100644 --- a/scripts/node_area/node_area.gml +++ b/scripts/node_area/node_area.gml @@ -42,7 +42,7 @@ function Node_Area(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 1].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny); } - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { return [_data[0][0], _data[0][1], _data[1][0], _data[1][1], _data[2]]; } diff --git a/scripts/node_armature_bind/node_armature_bind.gml b/scripts/node_armature_bind/node_armature_bind.gml index ac60315eb..eca90de7b 100644 --- a/scripts/node_armature_bind/node_armature_bind.gml +++ b/scripts/node_armature_bind/node_armature_bind.gml @@ -770,7 +770,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr } } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { if(_output_index == 1) return atlas_data; if(_output_index == 2) return bind_data; if(_output_index == 0 && _array_index == 0) { diff --git a/scripts/node_atlas/node_atlas.gml b/scripts/node_atlas/node_atlas.gml index 8309eaa21..5dd50bb2d 100644 --- a/scripts/node_atlas/node_atlas.gml +++ b/scripts/node_atlas/node_atlas.gml @@ -14,7 +14,7 @@ function Node_Atlas(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { surface_set_target(_outSurf); DRAW_CLEAR BLEND_OVERRIDE; diff --git a/scripts/node_average/node_average.gml b/scripts/node_average/node_average.gml index a6e5b9080..e1b7c71f7 100644 --- a/scripts/node_average/node_average.gml +++ b/scripts/node_average/node_average.gml @@ -26,7 +26,7 @@ function Node_Average(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c colors = []; - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var inSurf = _data[0]; if(!is_surface(inSurf)) return _outSurf; diff --git a/scripts/node_base_convert/node_base_convert.gml b/scripts/node_base_convert/node_base_convert.gml index 070c6c958..e6925a86e 100644 --- a/scripts/node_base_convert/node_base_convert.gml +++ b/scripts/node_base_convert/node_base_convert.gml @@ -14,7 +14,7 @@ function Node_Base_Convert(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro outputs[| 0] = nodeValue("Result", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, ""); - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { var val = _data[0]; var bFrom = max(2, _data[1]); var bTo = max(2, _data[2]); diff --git a/scripts/node_bevel/node_bevel.gml b/scripts/node_bevel/node_bevel.gml index 55d3756bd..df687b8d3 100644 --- a/scripts/node_bevel/node_bevel.gml +++ b/scripts/node_bevel/node_bevel.gml @@ -55,7 +55,7 @@ function Node_Bevel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 2].drawOverlay(active, _x + _pw, _y + _ph, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _hei = _data[1]; var _shf = _data[2]; var _sca = _data[3]; diff --git a/scripts/node_blend/node_blend.gml b/scripts/node_blend/node_blend.gml index c3a19d5b2..9cafb61b0 100644 --- a/scripts/node_blend/node_blend.gml +++ b/scripts/node_blend/node_blend.gml @@ -50,7 +50,7 @@ function Node_Blend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con temp_surface = [ surface_create(1, 1) ]; - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _back = _data[0]; var _fore = _data[1]; var _type = _data[2]; diff --git a/scripts/node_blinker/node_blinker.gml b/scripts/node_blinker/node_blinker.gml index 26b078b9a..cd91f7e68 100644 --- a/scripts/node_blinker/node_blinker.gml +++ b/scripts/node_blinker/node_blinker.gml @@ -28,7 +28,7 @@ function Node_Blinker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c temp_surface = [ surface_create( 1, 1 ) ]; - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { //var _surf = _data[0]; //var _mask = _data[1]; //var _seed = _data[2]; diff --git a/scripts/node_bloom/node_bloom.gml b/scripts/node_bloom/node_bloom.gml index c528c5cd3..4cdc62eb4 100644 --- a/scripts/node_bloom/node_bloom.gml +++ b/scripts/node_bloom/node_bloom.gml @@ -39,7 +39,7 @@ function Node_Bloom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con surface_blur_init(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _size = _data[1]; var _tole = _data[2]; var _stre = _data[3]; diff --git a/scripts/node_blur/node_blur.gml b/scripts/node_blur/node_blur.gml index cb067194b..57969f1d0 100644 --- a/scripts/node_blur/node_blur.gml +++ b/scripts/node_blur/node_blur.gml @@ -31,7 +31,7 @@ function Node_Blur(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons attribute_oversample(); surface_blur_init(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _size = _data[1]; var _clamp = struct_try_get(attributes, "oversample"); var _isovr = _data[3]; diff --git a/scripts/node_blur_bokeh/node_blur_bokeh.gml b/scripts/node_blur_bokeh/node_blur_bokeh.gml index faaa5be1e..9d51b4a4b 100644 --- a/scripts/node_blur_bokeh/node_blur_bokeh.gml +++ b/scripts/node_blur_bokeh/node_blur_bokeh.gml @@ -27,7 +27,7 @@ function Node_Blur_Bokeh(_x, _y, _group = noone) : Node_Processor(_x, _y, _group attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _str = _data[1]; var _mask = _data[2]; var _mix = _data[3]; diff --git a/scripts/node_blur_contrast/node_blur_contrast.gml b/scripts/node_blur_contrast/node_blur_contrast.gml index 624c2b059..6a0cfb2d9 100644 --- a/scripts/node_blur_contrast/node_blur_contrast.gml +++ b/scripts/node_blur_contrast/node_blur_contrast.gml @@ -34,7 +34,7 @@ function Node_Blur_Contrast(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _surf = _data[0]; var _size = _data[1]; var _tres = _data[2]; diff --git a/scripts/node_blur_directional/node_blur_directional.gml b/scripts/node_blur_directional/node_blur_directional.gml index 9f2d45f82..b88c23fdb 100644 --- a/scripts/node_blur_directional/node_blur_directional.gml +++ b/scripts/node_blur_directional/node_blur_directional.gml @@ -40,7 +40,7 @@ function Node_Blur_Directional(_x, _y, _group = noone) : Node_Processor(_x, _y, inputs[| 2].drawOverlay(active, _x + ww / 2 * _s, _y + hh / 2 * _s, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _str = _data[1]; var _dir = _data[2]; var _mask = _data[3]; diff --git a/scripts/node_blur_radial/node_blur_radial.gml b/scripts/node_blur_radial/node_blur_radial.gml index d18eed8c9..302521e33 100644 --- a/scripts/node_blur_radial/node_blur_radial.gml +++ b/scripts/node_blur_radial/node_blur_radial.gml @@ -41,7 +41,7 @@ function Node_Blur_Radial(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _str = _data[1]; var _cen = _data[2]; var _mask = _data[4]; diff --git a/scripts/node_blur_simple/node_blur_simple.gml b/scripts/node_blur_simple/node_blur_simple.gml index 6e938feaa..5bad324f8 100644 --- a/scripts/node_blur_simple/node_blur_simple.gml +++ b/scripts/node_blur_simple/node_blur_simple.gml @@ -42,7 +42,7 @@ function Node_Blur_Simple(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou attribute_surface_depth(); attribute_oversample(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { if(!is_surface(_data[0])) return _outSurf; var _size = _data[1]; var _samp = struct_try_get(attributes, "oversample"); diff --git a/scripts/node_blur_zoom/node_blur_zoom.gml b/scripts/node_blur_zoom/node_blur_zoom.gml index 9192ce37a..6626bac86 100644 --- a/scripts/node_blur_zoom/node_blur_zoom.gml +++ b/scripts/node_blur_zoom/node_blur_zoom.gml @@ -44,7 +44,7 @@ function Node_Blur_Zoom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _str = _data[1]; var _cen = _data[2]; var _sam = struct_try_get(attributes, "oversample"); diff --git a/scripts/node_boolean/node_boolean.gml b/scripts/node_boolean/node_boolean.gml index 9965334a8..067b29f6c 100644 --- a/scripts/node_boolean/node_boolean.gml +++ b/scripts/node_boolean/node_boolean.gml @@ -25,7 +25,7 @@ function Node_Boolean(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c ["Display", false], 1, 2, ] - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { return _data[0]; } diff --git a/scripts/node_bw/node_bw.gml b/scripts/node_bw/node_bw.gml index 2cf2e9496..a2195b43d 100644 --- a/scripts/node_bw/node_bw.gml +++ b/scripts/node_bw/node_bw.gml @@ -30,7 +30,7 @@ function Node_BW(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constr attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _exp = _data[1]; var _con = _data[2]; surface_set_target(_outSurf); diff --git a/scripts/node_camera/node_camera.gml b/scripts/node_camera/node_camera.gml index 9e9eaa46c..b3a6367d9 100644 --- a/scripts/node_camera/node_camera.gml +++ b/scripts/node_camera/node_camera.gml @@ -93,7 +93,7 @@ function Node_Camera(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co refreshDynamicInput(); } - static getPreviewValue = function() { return inputs[| 0]; } + static getPreviewValues = function() { return inputs[| 0].getValue(); } static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { if(array_length(current_data) == 0) return; @@ -117,7 +117,7 @@ function Node_Camera(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co draw_rectangle_dashed(x0, y0, x1, y1); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { if(!is_surface(_data[0])) return; var _area = _data[1]; var _zoom = _data[2]; diff --git a/scripts/node_canvas/node_canvas.gml b/scripts/node_canvas/node_canvas.gml index a46bdaa39..f278e9af9 100644 --- a/scripts/node_canvas/node_canvas.gml +++ b/scripts/node_canvas/node_canvas.gml @@ -408,8 +408,6 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor mouse_holding = false; - //static getPreviewValue = function() { return key_mod_press(ALT)? outputs[| 0] : noone; } - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { mouse_cur_x = round((_mx - _x) / _s - 0.5); mouse_cur_y = round((_my - _y) / _s - 0.5); diff --git a/scripts/node_channels/node_channels.gml b/scripts/node_channels/node_channels.gml index 587fdcfb9..d2b9876b3 100644 --- a/scripts/node_channels/node_channels.gml +++ b/scripts/node_channels/node_channels.gml @@ -15,7 +15,7 @@ function Node_RGB_Channel(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou attribute_surface_depth(); - static process_data = function(_outSurf, _data, output_index) { + static processData = function(_outSurf, _data, output_index) { var _out = _data[1]; var _alp = _data[2]; diff --git a/scripts/node_channels_hsv/node_channels_hsv.gml b/scripts/node_channels_hsv/node_channels_hsv.gml index f821b8822..53a53d5bc 100644 --- a/scripts/node_channels_hsv/node_channels_hsv.gml +++ b/scripts/node_channels_hsv/node_channels_hsv.gml @@ -13,7 +13,7 @@ function Node_HSV_Channel(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou attribute_surface_depth(); - static process_data = function(_outSurf, _data, output_index) { + static processData = function(_outSurf, _data, output_index) { surface_set_target(_outSurf); DRAW_CLEAR BLEND_OVERRIDE; diff --git a/scripts/node_checkerboard/node_checkerboard.gml b/scripts/node_checkerboard/node_checkerboard.gml index c8c1e3216..c277aff54 100644 --- a/scripts/node_checkerboard/node_checkerboard.gml +++ b/scripts/node_checkerboard/node_checkerboard.gml @@ -45,7 +45,7 @@ function Node_Checker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[| 2].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _dim = _data[0]; var _amo = _data[1]; var _ang = _data[2]; diff --git a/scripts/node_chromatic_aberration/node_chromatic_aberration.gml b/scripts/node_chromatic_aberration/node_chromatic_aberration.gml index 5e4407326..bab452bb7 100644 --- a/scripts/node_chromatic_aberration/node_chromatic_aberration.gml +++ b/scripts/node_chromatic_aberration/node_chromatic_aberration.gml @@ -31,7 +31,7 @@ function Node_Chromatic_Aberration(_x, _y, _group = noone) : Node_Processor(_x, inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var center = _data[1]; var stren = _data[2]; diff --git a/scripts/node_color/node_color.gml b/scripts/node_color/node_color.gml index 65a07f43e..1c834288a 100644 --- a/scripts/node_color/node_color.gml +++ b/scripts/node_color/node_color.gml @@ -7,7 +7,7 @@ function Node_Color(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con outputs[| 0] = nodeValue("Color", self, JUNCTION_CONNECT.output, VALUE_TYPE.color, c_white); - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { return _data[0]; } diff --git a/scripts/node_color_adjustment/node_color_adjustment.gml b/scripts/node_color_adjustment/node_color_adjustment.gml index e3747e4ed..60f3b9537 100644 --- a/scripts/node_color_adjustment/node_color_adjustment.gml +++ b/scripts/node_color_adjustment/node_color_adjustment.gml @@ -82,7 +82,7 @@ function Node_Color_adjust(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro outputs[| 1].setVisible(type == 1, type == 1); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _bri = _data[1]; var _con = _data[2]; var _hue = _data[3]; diff --git a/scripts/node_color_data/node_color_data.gml b/scripts/node_color_data/node_color_data.gml index 683f62de3..1e0aadcdf 100644 --- a/scripts/node_color_data/node_color_data.gml +++ b/scripts/node_color_data/node_color_data.gml @@ -19,7 +19,7 @@ function Node_Color_Data(_x, _y, _group = noone) : Node_Processor(_x, _y, _group outputs[| 6] = nodeValue("Brightness", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0); - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { var _c = _data[0]; var _n = _data[1]; diff --git a/scripts/node_color_from_hsv/node_color_from_hsv.gml b/scripts/node_color_from_hsv/node_color_from_hsv.gml index 3c7a46645..f087bd55c 100644 --- a/scripts/node_color_from_hsv/node_color_from_hsv.gml +++ b/scripts/node_color_from_hsv/node_color_from_hsv.gml @@ -22,7 +22,7 @@ function Node_Color_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) input_display_list = [ 3, 0, 1, 2 ]; - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var nor = _data[3]; return make_color_hsv( diff --git a/scripts/node_color_from_rgb/node_color_from_rgb.gml b/scripts/node_color_from_rgb/node_color_from_rgb.gml index 9616fd5ee..ca012f5b9 100644 --- a/scripts/node_color_from_rgb/node_color_from_rgb.gml +++ b/scripts/node_color_from_rgb/node_color_from_rgb.gml @@ -48,7 +48,7 @@ function Node_Color_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) } } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var nor = _data[3]; if(!is_real(_data[0])) return 0; if(!is_real(_data[1])) return 0; diff --git a/scripts/node_color_mix/node_color_mix.gml b/scripts/node_color_mix/node_color_mix.gml index 518b10bbe..c73e9e338 100644 --- a/scripts/node_color_mix/node_color_mix.gml +++ b/scripts/node_color_mix/node_color_mix.gml @@ -18,7 +18,7 @@ function Node_Color_Mix(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) input_display_list = [ 3, 0, 1, 2 ]; - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { switch(_data[3]) { case 0 : return merge_color(_data[0], _data[1], _data[2]); case 1 : diff --git a/scripts/node_color_palette_replacement/node_color_palette_replacement.gml b/scripts/node_color_palette_replacement/node_color_palette_replacement.gml index a56681813..b9a37b40d 100644 --- a/scripts/node_color_palette_replacement/node_color_palette_replacement.gml +++ b/scripts/node_color_palette_replacement/node_color_palette_replacement.gml @@ -48,7 +48,7 @@ function Node_Color_replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var fr = _data[1]; var to = _data[2]; var tr = _data[3]; diff --git a/scripts/node_color_remove/node_color_remove.gml b/scripts/node_color_remove/node_color_remove.gml index c9a0aaf0b..c2ee34e52 100644 --- a/scripts/node_color_remove/node_color_remove.gml +++ b/scripts/node_color_remove/node_color_remove.gml @@ -35,7 +35,7 @@ function Node_Color_Remove(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var frm = _data[1]; var thr = _data[2]; var inv = _data[6]; diff --git a/scripts/node_color_replacement/node_color_replacement.gml b/scripts/node_color_replacement/node_color_replacement.gml index bf711909c..567865253 100644 --- a/scripts/node_color_replacement/node_color_replacement.gml +++ b/scripts/node_color_replacement/node_color_replacement.gml @@ -166,7 +166,7 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g inputs[| 2].setValue(palette); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var fr = _data[1]; var to = _data[2]; var tr = _data[3]; diff --git a/scripts/node_color_sampler/node_color_sampler.gml b/scripts/node_color_sampler/node_color_sampler.gml index 821da65b4..154ee0bbd 100644 --- a/scripts/node_color_sampler/node_color_sampler.gml +++ b/scripts/node_color_sampler/node_color_sampler.gml @@ -13,7 +13,7 @@ function Node_Sampler(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c outputs[| 0] = nodeValue("Color", self, JUNCTION_CONNECT.output, VALUE_TYPE.color, c_white); - static getPreviewValue = function() { return inputs[| 0]; } + static getPreviewValues = function() { return inputs[| 0].getValue(); } static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); @@ -45,7 +45,7 @@ function Node_Sampler(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c draw_rectangle(x0, y0, x1, y1, true); } - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { var _surf = _data[0]; var _pos = _data[1]; var _sam = _data[2]; diff --git a/scripts/node_colorize/node_colorize.gml b/scripts/node_colorize/node_colorize.gml index 872af8077..d45ce6c29 100644 --- a/scripts/node_colorize/node_colorize.gml +++ b/scripts/node_colorize/node_colorize.gml @@ -35,7 +35,7 @@ function Node_Colorize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _gra = _data[1]; var _gra_shift = _data[2]; var _alpha = _data[6]; diff --git a/scripts/node_combine_hsv/node_combine_hsv.gml b/scripts/node_combine_hsv/node_combine_hsv.gml index 0d549c5e7..ccab9a659 100644 --- a/scripts/node_combine_hsv/node_combine_hsv.gml +++ b/scripts/node_combine_hsv/node_combine_hsv.gml @@ -14,7 +14,7 @@ function Node_Combine_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _h = _data[0]; var _s = _data[1]; var _v = _data[2]; diff --git a/scripts/node_combine_rgb/node_combine_rgb.gml b/scripts/node_combine_rgb/node_combine_rgb.gml index fa5445d7c..2ddba2598 100644 --- a/scripts/node_combine_rgb/node_combine_rgb.gml +++ b/scripts/node_combine_rgb/node_combine_rgb.gml @@ -27,7 +27,7 @@ function Node_Combine_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _r = _data[0]; var _g = _data[1]; var _b = _data[2]; diff --git a/scripts/node_composite/node_composite.gml b/scripts/node_composite/node_composite.gml index c275dfe7a..ad4894988 100644 --- a/scripts/node_composite/node_composite.gml +++ b/scripts/node_composite/node_composite.gml @@ -743,7 +743,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 2].setVisible(_dim_type == COMPOSE_OUTPUT_SCALING.constant); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { if(_output_index == 1) return atlas_data; if(_output_index == 0 && _array_index == 0) atlas_data = []; diff --git a/scripts/node_convolution/node_convolution.gml b/scripts/node_convolution/node_convolution.gml index cc8b4a114..e9921da20 100644 --- a/scripts/node_convolution/node_convolution.gml +++ b/scripts/node_convolution/node_convolution.gml @@ -32,7 +32,7 @@ function Node_Convolution(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou attribute_surface_depth(); attribute_oversample(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _ker = _data[1]; var _sam = struct_try_get(attributes, "oversample"); diff --git a/scripts/node_corner/node_corner.gml b/scripts/node_corner/node_corner.gml index 005599e96..4dc2ac64b 100644 --- a/scripts/node_corner/node_corner.gml +++ b/scripts/node_corner/node_corner.gml @@ -29,7 +29,7 @@ function Node_Corner(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var wd = _data[1]; var temp = surface_create_valid(surface_get_width(_data[0]), surface_get_height(_data[0]), attrDepth()); diff --git a/scripts/node_counter/node_counter.gml b/scripts/node_counter/node_counter.gml index 4dabe2e91..049819189 100644 --- a/scripts/node_counter/node_counter.gml +++ b/scripts/node_counter/node_counter.gml @@ -26,7 +26,7 @@ function Node_Counter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[| 0].setVisible(mode == 0); } - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { var time = PROJECT.animator.current_frame; var mode = _data[2]; var val = 0; diff --git a/scripts/node_crop/node_crop.gml b/scripts/node_crop/node_crop.gml index 238e94a73..ce8e161da 100644 --- a/scripts/node_crop/node_crop.gml +++ b/scripts/node_crop/node_crop.gml @@ -24,7 +24,7 @@ function Node_Crop(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons drag_my = 0; drag_sv = 0; - static getPreviewValue = function() { return inputs[| 0]; } + static getPreviewValues = function() { return inputs[| 0].getValue(); } static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { if(array_length(current_data) < 2) return; @@ -107,7 +107,7 @@ function Node_Crop(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons } } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _inSurf = _data[0]; var _crop = _data[1]; var _dim = [ surface_get_width(_inSurf) - _crop[0] - _crop[2], surface_get_height(_inSurf) - _crop[1] - _crop[3] ]; diff --git a/scripts/node_curve/node_curve.gml b/scripts/node_curve/node_curve.gml index 42adea7f1..d7315a814 100644 --- a/scripts/node_curve/node_curve.gml +++ b/scripts/node_curve/node_curve.gml @@ -41,7 +41,7 @@ function Node_Curve(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _wcur = _data[1]; var _rcur = _data[2]; var _gcur = _data[3]; diff --git a/scripts/node_data/node_data.gml b/scripts/node_data/node_data.gml index 1da1a94e6..c883fdb94 100644 --- a/scripts/node_data/node_data.gml +++ b/scripts/node_data/node_data.gml @@ -1261,17 +1261,13 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x } } #endregion - static getPreviewValue = function() { #region + static getPreviewValues = function() { #region if(preview_channel > ds_list_size(outputs)) return noone; - return outputs[| preview_channel]; + return outputs[| preview_channel].getValue(); } #endregion static getPreviewBoundingBox = function() { #region - var _node = getPreviewValue(); - if(_node == undefined) return noone; - if(_node.type != VALUE_TYPE.surface) return noone; - - var _surf = _node.getValue(); + var _surf = getPreviewValues(); if(is_array(_surf)) _surf = array_safe_get(_surf, preview_index, noone); if(!is_surface(_surf)) return noone; diff --git a/scripts/node_de_corner/node_de_corner.gml b/scripts/node_de_corner/node_de_corner.gml index 257c40146..2a3c61399 100644 --- a/scripts/node_de_corner/node_de_corner.gml +++ b/scripts/node_de_corner/node_de_corner.gml @@ -17,7 +17,7 @@ function Node_De_Corner(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { surface_set_shader(_outSurf, sh_de_corner); shader_set_f("dimension", [ surface_get_width(_data[0]), surface_get_height(_data[0]) ]); shader_set_f("tolerance", _data[2]); diff --git a/scripts/node_de_stray/node_de_stray.gml b/scripts/node_de_stray/node_de_stray.gml index 765c28546..954b344da 100644 --- a/scripts/node_de_stray/node_de_stray.gml +++ b/scripts/node_de_stray/node_de_stray.gml @@ -17,7 +17,7 @@ function Node_De_Stray(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { surface_set_shader(_outSurf, sh_de_stray); shader_set_dim("dimension", _data[0]); shader_set_f("tolerance", _data[1]); diff --git a/scripts/node_dilate/node_dilate.gml b/scripts/node_dilate/node_dilate.gml index df0b285d1..2d83a6d58 100644 --- a/scripts/node_dilate/node_dilate.gml +++ b/scripts/node_dilate/node_dilate.gml @@ -50,7 +50,7 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| 3].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny, 0, 1, THEME.anchor_scale_hori); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var center = _data[1]; var stren = _data[2]; diff --git a/scripts/node_displacement/node_displacement.gml b/scripts/node_displacement/node_displacement.gml index 9439ff019..627d19f3e 100644 --- a/scripts/node_displacement/node_displacement.gml +++ b/scripts/node_displacement/node_displacement.gml @@ -58,7 +58,7 @@ If set, then strength value control how many times the effect applies on itself. attribute_oversample(); attribute_interpolation(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { switch(_data[5]) { case 0 : inputs[| 2].setVisible(true); diff --git a/scripts/node_dither/node_dither.gml b/scripts/node_dither/node_dither.gml index 10eed8ba4..b8ed85ca8 100644 --- a/scripts/node_dither/node_dither.gml +++ b/scripts/node_dither/node_dither.gml @@ -52,7 +52,7 @@ function Node_Dither(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _pal = _data[1]; var _typ = _data[2]; var _map = _data[3]; diff --git a/scripts/node_edge_detect/node_edge_detect.gml b/scripts/node_edge_detect/node_edge_detect.gml index 2e3d2138a..64c630dc8 100644 --- a/scripts/node_edge_detect/node_edge_detect.gml +++ b/scripts/node_edge_detect/node_edge_detect.gml @@ -32,7 +32,7 @@ function Node_Edge_Detect(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou attribute_surface_depth(); attribute_oversample(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var ft = _data[1]; var ov = struct_try_get(attributes, "oversample"); diff --git a/scripts/node_equation/node_equation.gml b/scripts/node_equation/node_equation.gml index 66d650422..88ceca008 100644 --- a/scripts/node_equation/node_equation.gml +++ b/scripts/node_equation/node_equation.gml @@ -138,7 +138,7 @@ function Node_Equation(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) refreshDynamicInput(); } - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { var eq = _data[0]; var params = {}; diff --git a/scripts/node_erode/node_erode.gml b/scripts/node_erode/node_erode.gml index bf1805017..a2e0b5f54 100644 --- a/scripts/node_erode/node_erode.gml +++ b/scripts/node_erode/node_erode.gml @@ -32,7 +32,7 @@ function Node_Erode(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var wd = _data[1]; surface_set_target(_outSurf); diff --git a/scripts/node_find_pixel/node_find_pixel.gml b/scripts/node_find_pixel/node_find_pixel.gml index a65db5b86..e094f13de 100644 --- a/scripts/node_find_pixel/node_find_pixel.gml +++ b/scripts/node_find_pixel/node_find_pixel.gml @@ -13,11 +13,11 @@ function Node_Find_Pixel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group outputs[| 0] = nodeValue("Position", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.vector); - static getPreviewValue = function() { return inputs[| 0]; } + static getPreviewValues = function() { return inputs[| 0].getValue(); } temp_surface = [ surface_create(1, 1) ]; - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { var _surf = _data[0]; var _col = _data[1]; diff --git a/scripts/node_flip/node_flip.gml b/scripts/node_flip/node_flip.gml index f938f89fb..974f69465 100644 --- a/scripts/node_flip/node_flip.gml +++ b/scripts/node_flip/node_flip.gml @@ -21,7 +21,7 @@ function Node_Flip(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _axis = _data[1]; surface_set_target(_outSurf); DRAW_CLEAR diff --git a/scripts/node_flood_fill/node_flood_fill.gml b/scripts/node_flood_fill/node_flood_fill.gml index e2658ddea..42174c202 100644 --- a/scripts/node_flood_fill/node_flood_fill.gml +++ b/scripts/node_flood_fill/node_flood_fill.gml @@ -45,7 +45,7 @@ function Node_Flood_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[| 4].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var inSurf = _data[0]; if(!is_surface(inSurf)) return _outSurf; diff --git a/scripts/node_glow/node_glow.gml b/scripts/node_glow/node_glow.gml index 637200a35..7744cc123 100644 --- a/scripts/node_glow/node_glow.gml +++ b/scripts/node_glow/node_glow.gml @@ -37,7 +37,7 @@ function Node_Glow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons surface_blur_init(); attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _border = _data[1]; var _size = _data[2]; var _stre = _data[3]; diff --git a/scripts/node_gradient/node_gradient.gml b/scripts/node_gradient/node_gradient.gml index 5b4702693..2f9118f66 100644 --- a/scripts/node_gradient/node_gradient.gml +++ b/scripts/node_gradient/node_gradient.gml @@ -56,7 +56,7 @@ function Node_Gradient(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 6].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _dim = _data[0]; _outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth()); diff --git a/scripts/node_gradient_extract/node_gradient_extract.gml b/scripts/node_gradient_extract/node_gradient_extract.gml index 3cbae5d8d..88fd81707 100644 --- a/scripts/node_gradient_extract/node_gradient_extract.gml +++ b/scripts/node_gradient_extract/node_gradient_extract.gml @@ -15,7 +15,7 @@ function Node_Gradient_Extract(_x, _y, _group = noone) : Node_Processor(_x, _y, outputs[| 2] = nodeValue("Type", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, 0 ); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var gra = _data[0]; switch(_output_index) { diff --git a/scripts/node_gradient_output/node_gradient_output.gml b/scripts/node_gradient_output/node_gradient_output.gml index c810a5e37..12c0f96c0 100644 --- a/scripts/node_gradient_output/node_gradient_output.gml +++ b/scripts/node_gradient_output/node_gradient_output.gml @@ -16,7 +16,7 @@ function Node_Gradient_Out(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro _pal = -1; - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var pal = _data[0]; var pos = _data[1]; diff --git a/scripts/node_gradient_palette/node_gradient_palette.gml b/scripts/node_gradient_palette/node_gradient_palette.gml index 0161d2c76..17c8254e5 100644 --- a/scripts/node_gradient_palette/node_gradient_palette.gml +++ b/scripts/node_gradient_palette/node_gradient_palette.gml @@ -26,7 +26,7 @@ function Node_Gradient_Palette(_x, _y, _group = noone) : Node_Processor(_x, _y, inputs[| 2].setVisible(usePos, usePos); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var pal = _data[0]; var pos_use = _data[1]; var _pos = _data[2]; diff --git a/scripts/node_gradient_points/node_gradient_points.gml b/scripts/node_gradient_points/node_gradient_points.gml index 1674ff2f8..06b9d3cea 100644 --- a/scripts/node_gradient_points/node_gradient_points.gml +++ b/scripts/node_gradient_points/node_gradient_points.gml @@ -70,7 +70,7 @@ function Node_Gradient_Points(_x, _y, _group = noone) : Node_Processor(_x, _y, _ inputs[| 8].setVisible(!_usePal, !_usePal); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _dim = _data[0]; _outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth()); diff --git a/scripts/node_gradient_replace/node_gradient_replace.gml b/scripts/node_gradient_replace/node_gradient_replace.gml index 3e1ecfbfd..8887fa546 100644 --- a/scripts/node_gradient_replace/node_gradient_replace.gml +++ b/scripts/node_gradient_replace/node_gradient_replace.gml @@ -18,7 +18,7 @@ function Node_Gradient_Replace_Color(_x, _y, _group = noone) : Node_Processor(_x outputs[| 0] = nodeValue("Gradient", self, JUNCTION_CONNECT.output, VALUE_TYPE.gradient, new gradientObject(c_white) ); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var gra = _data[0]; var pfr = _data[1]; var pto = _data[2]; diff --git a/scripts/node_gradient_shift/node_gradient_shift.gml b/scripts/node_gradient_shift/node_gradient_shift.gml index 749a46487..078608184 100644 --- a/scripts/node_gradient_shift/node_gradient_shift.gml +++ b/scripts/node_gradient_shift/node_gradient_shift.gml @@ -19,7 +19,7 @@ function Node_Gradient_Shift(_x, _y, _group = noone) : Node_Processor(_x, _y, _g _pal = -1; - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var pal = _data[0]; var sft = _data[1]; var lop = _data[2]; diff --git a/scripts/node_grey_to_alpha/node_grey_to_alpha.gml b/scripts/node_grey_to_alpha/node_grey_to_alpha.gml index 39cd4a02b..b24034638 100644 --- a/scripts/node_grey_to_alpha/node_grey_to_alpha.gml +++ b/scripts/node_grey_to_alpha/node_grey_to_alpha.gml @@ -27,7 +27,7 @@ function Node_Grey_Alpha(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[| 2].setVisible(_replace); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _replace = inputs[| 1].getValue(); var _color = inputs[| 2].getValue(); diff --git a/scripts/node_greyscale/node_greyscale.gml b/scripts/node_greyscale/node_greyscale.gml index f6b0c8683..5981f2da9 100644 --- a/scripts/node_greyscale/node_greyscale.gml +++ b/scripts/node_greyscale/node_greyscale.gml @@ -30,7 +30,7 @@ function Node_Greyscale(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _exp = _data[1]; var _con = _data[2]; surface_set_target(_outSurf); diff --git a/scripts/node_grid/node_grid.gml b/scripts/node_grid/node_grid.gml index e9677de6e..401a76b0c 100644 --- a/scripts/node_grid/node_grid.gml +++ b/scripts/node_grid/node_grid.gml @@ -65,7 +65,7 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _dim = _data[0]; var _pos = _data[1]; var _sca = _data[2]; diff --git a/scripts/node_grid_hex/node_grid_hex.gml b/scripts/node_grid_hex/node_grid_hex.gml index d42326004..af088e3d9 100644 --- a/scripts/node_grid_hex/node_grid_hex.gml +++ b/scripts/node_grid_hex/node_grid_hex.gml @@ -57,7 +57,7 @@ function Node_Grid_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _dim = _data[0]; var _pos = _data[1]; var _sca = _data[2]; diff --git a/scripts/node_grid_tri/node_grid_tri.gml b/scripts/node_grid_tri/node_grid_tri.gml index 6804add30..910250fd9 100644 --- a/scripts/node_grid_tri/node_grid_tri.gml +++ b/scripts/node_grid_tri/node_grid_tri.gml @@ -57,7 +57,7 @@ function Node_Grid_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _dim = _data[0]; var _pos = _data[1]; var _sca = _data[2]; diff --git a/scripts/node_image_splice_sheet/node_image_splice_sheet.gml b/scripts/node_image_splice_sheet/node_image_splice_sheet.gml index 1917c0e69..74177ca81 100644 --- a/scripts/node_image_splice_sheet/node_image_splice_sheet.gml +++ b/scripts/node_image_splice_sheet/node_image_splice_sheet.gml @@ -93,7 +93,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru sprite_valid = []; - static getPreviewValue = function() { return inputs[| 0]; } + static getPreviewValues = function() { return inputs[| 0].getValue(); } function getSpritePosition(index) { var _dim = curr_dim; diff --git a/scripts/node_invert/node_invert.gml b/scripts/node_invert/node_invert.gml index be093d23d..1de52e30f 100644 --- a/scripts/node_invert/node_invert.gml +++ b/scripts/node_invert/node_invert.gml @@ -19,7 +19,7 @@ function Node_Invert(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { surface_set_target(_outSurf); DRAW_CLEAR BLEND_OVERRIDE; diff --git a/scripts/node_lerp/node_lerp.gml b/scripts/node_lerp/node_lerp.gml index f3a907349..eb36737b7 100644 --- a/scripts/node_lerp/node_lerp.gml +++ b/scripts/node_lerp/node_lerp.gml @@ -12,7 +12,7 @@ function Node_Lerp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons outputs[| 0] = nodeValue("Result", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0); - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { return lerp(_data[0], _data[1], _data[2]); } diff --git a/scripts/node_level/node_level.gml b/scripts/node_level/node_level.gml index 85df5d8a1..df33229ef 100644 --- a/scripts/node_level/node_level.gml +++ b/scripts/node_level/node_level.gml @@ -96,7 +96,7 @@ function Node_Level(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con } } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _wmin = min(_data[1][0], _data[1][1]); var _wmax = max(_data[1][0], _data[1][1]); var _rmin = min(_data[2][0], _data[2][1]); diff --git a/scripts/node_level_selector/node_level_selector.gml b/scripts/node_level_selector/node_level_selector.gml index 9d5835b0c..e4db54c5a 100644 --- a/scripts/node_level_selector/node_level_selector.gml +++ b/scripts/node_level_selector/node_level_selector.gml @@ -80,7 +80,7 @@ function Node_Level_Selector(_x, _y, _group = noone) : Node_Processor(_x, _y, _g } } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _middle = _data[1]; var _range = _data[2]; diff --git a/scripts/node_line/node_line.gml b/scripts/node_line/node_line.gml index 2d4b60ef2..bafbd8bc3 100644 --- a/scripts/node_line/node_line.gml +++ b/scripts/node_line/node_line.gml @@ -119,7 +119,7 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 20].setVisible( _flen); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _dim = _data[0]; var _bg = _data[1]; var _seg = _data[2]; diff --git a/scripts/node_local_analyze/node_local_analyze.gml b/scripts/node_local_analyze/node_local_analyze.gml index ada1acb70..2de855966 100644 --- a/scripts/node_local_analyze/node_local_analyze.gml +++ b/scripts/node_local_analyze/node_local_analyze.gml @@ -40,7 +40,7 @@ function Node_Local_Analyze(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr attribute_surface_depth(); attribute_oversample(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _alg = _data[1]; var _siz = _data[2]; var _sam = struct_try_get(attributes, "oversample"); diff --git a/scripts/node_mirror/node_mirror.gml b/scripts/node_mirror/node_mirror.gml index 575ded6f8..31d921946 100644 --- a/scripts/node_mirror/node_mirror.gml +++ b/scripts/node_mirror/node_mirror.gml @@ -42,7 +42,7 @@ function Node_Mirror(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| 2].drawOverlay(active, _posx, _posy, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _dim = [ surface_get_width(_data[0]), surface_get_height(_data[0]) ]; var _pos = _data[1]; var _ang = _data[2]; diff --git a/scripts/node_morph_surface/node_morph_surface.gml b/scripts/node_morph_surface/node_morph_surface.gml index f19ba671e..0836a2b18 100644 --- a/scripts/node_morph_surface/node_morph_surface.gml +++ b/scripts/node_morph_surface/node_morph_surface.gml @@ -21,7 +21,7 @@ function Node_Morph_Surface(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr attribute_surface_depth(); attribute_interpolation(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var sFrom = _data[0]; var sTo = _data[1]; var amo = _data[2]; diff --git a/scripts/node_noise/node_noise.gml b/scripts/node_noise/node_noise.gml index 9fd306471..b49d00577 100644 --- a/scripts/node_noise/node_noise.gml +++ b/scripts/node_noise/node_noise.gml @@ -40,7 +40,7 @@ function Node_Noise(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 5].name = _col == 1? "Color B range" : "Color V range"; } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _dim = _data[0]; var _sed = _data[1]; diff --git a/scripts/node_noise_ani/node_noise_ani.gml b/scripts/node_noise_ani/node_noise_ani.gml index 6cdc1577d..29716087a 100644 --- a/scripts/node_noise_ani/node_noise_ani.gml +++ b/scripts/node_noise_ani/node_noise_ani.gml @@ -35,7 +35,7 @@ function Node_Noise_Aniso(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 3].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _dim = _data[0]; var _amo = _data[1]; var _sed = _data[2]; diff --git a/scripts/node_noise_cell/node_noise_cell.gml b/scripts/node_noise_cell/node_noise_cell.gml index a8826f439..15069b2ae 100644 --- a/scripts/node_noise_cell/node_noise_cell.gml +++ b/scripts/node_noise_cell/node_noise_cell.gml @@ -47,7 +47,7 @@ function Node_Cellular(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _dim = _data[0]; var _pos = _data[1]; var _sca = _data[2]; diff --git a/scripts/node_noise_fbm/node_noise_fbm.gml b/scripts/node_noise_fbm/node_noise_fbm.gml index b8d456412..9ffb0132e 100644 --- a/scripts/node_noise_fbm/node_noise_fbm.gml +++ b/scripts/node_noise_fbm/node_noise_fbm.gml @@ -48,7 +48,7 @@ function Node_Noise_FBM(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 8].name = _col == 1? "Color B range" : "Color V range"; } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _dim = _data[0]; var _sed = _data[1]; var _pos = _data[2]; diff --git a/scripts/node_noise_grid/node_noise_grid.gml b/scripts/node_noise_grid/node_noise_grid.gml index a6399d9d6..abb7d57c1 100644 --- a/scripts/node_noise_grid/node_noise_grid.gml +++ b/scripts/node_noise_grid/node_noise_grid.gml @@ -47,7 +47,7 @@ function Node_Grid_Noise(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _dim = _data[0]; var _pos = _data[1]; var _sca = _data[2]; diff --git a/scripts/node_noise_grid_hex/node_noise_grid_hex.gml b/scripts/node_noise_grid_hex/node_noise_grid_hex.gml index 51f248b65..68c0d934b 100644 --- a/scripts/node_noise_grid_hex/node_noise_grid_hex.gml +++ b/scripts/node_noise_grid_hex/node_noise_grid_hex.gml @@ -42,7 +42,7 @@ function Node_Noise_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _dim = _data[0]; var _sed = _data[1]; var _pos = _data[2]; diff --git a/scripts/node_noise_grid_tri/node_noise_grid_tri.gml b/scripts/node_noise_grid_tri/node_noise_grid_tri.gml index 69f1ef6ae..7366414bb 100644 --- a/scripts/node_noise_grid_tri/node_noise_grid_tri.gml +++ b/scripts/node_noise_grid_tri/node_noise_grid_tri.gml @@ -42,7 +42,7 @@ function Node_Noise_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _dim = _data[0]; var _sed = _data[1]; var _pos = _data[2]; diff --git a/scripts/node_noise_simplex/node_noise_simplex.gml b/scripts/node_noise_simplex/node_noise_simplex.gml index 129e79613..e707f5eac 100644 --- a/scripts/node_noise_simplex/node_noise_simplex.gml +++ b/scripts/node_noise_simplex/node_noise_simplex.gml @@ -47,7 +47,7 @@ function Node_Noise_Simplex(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[| 7].name = _col == 1? "Color B range" : "Color V range"; } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _dim = _data[0]; var _pos = _data[1]; var _sca = _data[2]; diff --git a/scripts/node_normal/node_normal.gml b/scripts/node_normal/node_normal.gml index 8912666be..e958008a6 100644 --- a/scripts/node_normal/node_normal.gml +++ b/scripts/node_normal/node_normal.gml @@ -23,7 +23,7 @@ function Node_Normal(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _hei = _data[1]; var _smt = _data[2]; diff --git a/scripts/node_normal_light/node_normal_light.gml b/scripts/node_normal_light/node_normal_light.gml index 452657a35..6fa12cad3 100644 --- a/scripts/node_normal_light/node_normal_light.gml +++ b/scripts/node_normal_light/node_normal_light.gml @@ -54,7 +54,7 @@ function Node_Normal_Light(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[| 5].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _map = _data[1]; var _hei = _data[2]; var _amb = _data[3]; diff --git a/scripts/node_number/node_number.gml b/scripts/node_number/node_number.gml index 26db5e02e..0dbfd6611 100644 --- a/scripts/node_number/node_number.gml +++ b/scripts/node_number/node_number.gml @@ -74,7 +74,7 @@ function Node_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co outputs[| 0].type = int? VALUE_TYPE.integer : VALUE_TYPE.float; } - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { var _res = _data[1]? round(_data[0]) : _data[0]; display_output = _res; return _res; @@ -248,7 +248,7 @@ function Node_Vector2(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c } } - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { var vec = [ _data[0], _data[1] ]; for( var i = 0, n = array_length(vec); i < n; i++ ) vec[i] = _data[2]? round(vec[i]) : vec[i]; @@ -421,7 +421,7 @@ function Node_Vector3(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c outputs[| 0].type = int? VALUE_TYPE.integer : VALUE_TYPE.float; } - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { var vec = [ _data[0], _data[1], _data[2] ]; for( var i = 0, n = array_length(vec); i < n; i++ ) vec[i] = _data[3]? round(vec[i]) : vec[i]; @@ -476,7 +476,7 @@ function Node_Vector4(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c outputs[| 0].type = int? VALUE_TYPE.integer : VALUE_TYPE.float; } - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { var vec = [ _data[0], _data[1], _data[2], _data[3] ]; for( var i = 0, n = array_length(vec); i < n; i++ ) vec[i] = _data[4]? round(vec[i]) : vec[i]; @@ -524,7 +524,7 @@ function Node_Vector_Split(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro outputs[| i].type = type; } - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { return array_safe_get(_data[0], _output_index); } diff --git a/scripts/node_outline/node_outline.gml b/scripts/node_outline/node_outline.gml index 832b76507..e95fa5b70 100644 --- a/scripts/node_outline/node_outline.gml +++ b/scripts/node_outline/node_outline.gml @@ -56,7 +56,7 @@ function Node_Outline(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c attribute_surface_depth(); attribute_oversample(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var ww = surface_get_width(_data[0]); var hh = surface_get_height(_data[0]); var wd = _data[1]; diff --git a/scripts/node_padding/node_padding.gml b/scripts/node_padding/node_padding.gml index 121757bfc..49172ddd1 100644 --- a/scripts/node_padding/node_padding.gml +++ b/scripts/node_padding/node_padding.gml @@ -48,7 +48,7 @@ function Node_Padding(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[| 8].setVisible(mode == 1); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var mode = _data[5]; var padding = _data[1]; diff --git a/scripts/node_palette/node_palette.gml b/scripts/node_palette/node_palette.gml index a2a356827..79f0dd28c 100644 --- a/scripts/node_palette/node_palette.gml +++ b/scripts/node_palette/node_palette.gml @@ -17,7 +17,7 @@ function Node_Palette(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c ["Trim", true], 1 ]; - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var pal = _data[0]; var ran = _data[1]; diff --git a/scripts/node_palette_extract/node_palette_extract.gml b/scripts/node_palette_extract/node_palette_extract.gml index 4a5f9b1c9..8870c6de4 100644 --- a/scripts/node_palette_extract/node_palette_extract.gml +++ b/scripts/node_palette_extract/node_palette_extract.gml @@ -17,7 +17,7 @@ function Node_Palette_Extract(_x, _y, _group = noone) : Node(_x, _y, _group) con outputs[| 0] = nodeValue("Palette", self, JUNCTION_CONNECT.output, VALUE_TYPE.color, [ ]) .setDisplay(VALUE_DISPLAY.palette); - static getPreviewValue = function() { return inputs[| 0]; } + static getPreviewValues = function() { return inputs[| 0].getValue(); } input_display_list = [ ["Output", true], 0, diff --git a/scripts/node_palette_replacement/node_palette_replacement.gml b/scripts/node_palette_replacement/node_palette_replacement.gml index c2bb2b619..66441b2aa 100644 --- a/scripts/node_palette_replacement/node_palette_replacement.gml +++ b/scripts/node_palette_replacement/node_palette_replacement.gml @@ -23,7 +23,7 @@ function Node_Palette_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _ outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.color, [ ] ) .setDisplay(VALUE_DISPLAY.palette); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var pal = _data[0]; var pfr = _data[1]; var pto = _data[2]; diff --git a/scripts/node_palette_shift/node_palette_shift.gml b/scripts/node_palette_shift/node_palette_shift.gml index 5fed13fb8..fd787f544 100644 --- a/scripts/node_palette_shift/node_palette_shift.gml +++ b/scripts/node_palette_shift/node_palette_shift.gml @@ -26,7 +26,7 @@ function Node_Palette_Shift(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _pal = _data[1]; var _shf = _data[2]; diff --git a/scripts/node_path_anchor/node_path_anchor.gml b/scripts/node_path_anchor/node_path_anchor.gml index 9e32387dd..6d1e71c56 100644 --- a/scripts/node_path_anchor/node_path_anchor.gml +++ b/scripts/node_path_anchor/node_path_anchor.gml @@ -50,7 +50,7 @@ function Node_Path_Anchor(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou draw_circle_prec(c2x, c2y, 4, false); } - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { var _mir = _data[3]; if(_mir) diff --git a/scripts/node_path_eval/node_path_eval.gml b/scripts/node_path_eval/node_path_eval.gml index 9070f3489..0cc5f9341 100644 --- a/scripts/node_path_eval/node_path_eval.gml +++ b/scripts/node_path_eval/node_path_eval.gml @@ -17,7 +17,7 @@ function Node_Path_Sample(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou outputs[| 1] = nodeValue("Direction", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0); - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { var _path = _data[0]; var _rat = _data[1]; var _mod = _data[2]; diff --git a/scripts/node_pb/node_pb.gml b/scripts/node_pb/node_pb.gml index 53a4b5636..cfdc1f90a 100644 --- a/scripts/node_pb/node_pb.gml +++ b/scripts/node_pb/node_pb.gml @@ -42,7 +42,5 @@ function Node_PB(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constr return group.checkComplete(); } - static getPreviewValue = function() { - return group.outputs[| 0]; - } + static getPreviewValues = function() { return group.outputs[| 0].getValue(); } } \ No newline at end of file diff --git a/scripts/node_pb_box_contract/node_pb_box_contract.gml b/scripts/node_pb_box_contract/node_pb_box_contract.gml index e5f2d9105..4e0749127 100644 --- a/scripts/node_pb_box_contract/node_pb_box_contract.gml +++ b/scripts/node_pb_box_contract/node_pb_box_contract.gml @@ -34,7 +34,7 @@ function Node_PB_Box_Contract(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _gro else inputs[| 4].name = "Fix Height"; } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _layr = _data[0]; var _pbox = _data[1]; var _type = _data[2]; diff --git a/scripts/node_pb_box_divide/node_pb_box_divide.gml b/scripts/node_pb_box_divide/node_pb_box_divide.gml index 021262160..b57a8a068 100644 --- a/scripts/node_pb_box_divide/node_pb_box_divide.gml +++ b/scripts/node_pb_box_divide/node_pb_box_divide.gml @@ -24,7 +24,7 @@ function Node_PB_Box_Divide(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group ["Divide", false], 4, 2, 3, 6, 5, ] - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _layr = _data[0]; var _pbox = _data[1]; var _amou = _data[2]; diff --git a/scripts/node_pb_box_divide_grid/node_pb_box_divide_grid.gml b/scripts/node_pb_box_divide_grid/node_pb_box_divide_grid.gml index c7096ecf3..b64cc7f25 100644 --- a/scripts/node_pb_box_divide_grid/node_pb_box_divide_grid.gml +++ b/scripts/node_pb_box_divide_grid/node_pb_box_divide_grid.gml @@ -17,7 +17,7 @@ function Node_PB_Box_Divide_Grid(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _ ["Divide", false], 2, 3, 4, ] - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _layr = _data[0]; var _pbox = _data[1]; var _amou = _data[2]; diff --git a/scripts/node_pb_box_inset/node_pb_box_inset.gml b/scripts/node_pb_box_inset/node_pb_box_inset.gml index 032f08da9..85d574aa1 100644 --- a/scripts/node_pb_box_inset/node_pb_box_inset.gml +++ b/scripts/node_pb_box_inset/node_pb_box_inset.gml @@ -40,7 +40,7 @@ function Node_PB_Box_Inset(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group) inputs[| 7].setVisible(_type == 1); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _layr = _data[0]; var _pbox = _data[1]; var _inst = _data[2]; diff --git a/scripts/node_pb_box_mirror/node_pb_box_mirror.gml b/scripts/node_pb_box_mirror/node_pb_box_mirror.gml index 471a85681..36117e7e7 100644 --- a/scripts/node_pb_box_mirror/node_pb_box_mirror.gml +++ b/scripts/node_pb_box_mirror/node_pb_box_mirror.gml @@ -14,7 +14,7 @@ function Node_PB_Box_Mirror(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group ["Mirror", false], 2, 3, ] - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _layr = _data[0]; var _pbox = _data[1]; var _hori = _data[2]; diff --git a/scripts/node_pb_box_split/node_pb_box_split.gml b/scripts/node_pb_box_split/node_pb_box_split.gml index 93b674571..53556c4e3 100644 --- a/scripts/node_pb_box_split/node_pb_box_split.gml +++ b/scripts/node_pb_box_split/node_pb_box_split.gml @@ -41,7 +41,7 @@ function Node_PB_Box_Split(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group) } } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _layr = _data[0]; var _pbox = _data[1]; var _type = _data[2]; diff --git a/scripts/node_pb_box_transform/node_pb_box_transform.gml b/scripts/node_pb_box_transform/node_pb_box_transform.gml index 9925437f6..41cada8d4 100644 --- a/scripts/node_pb_box_transform/node_pb_box_transform.gml +++ b/scripts/node_pb_box_transform/node_pb_box_transform.gml @@ -17,7 +17,7 @@ function Node_PB_Box_Transform(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _gr inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _layr = _data[0]; var _pbox = _data[1]; var _tran = _data[2]; diff --git a/scripts/node_pb_draw_angle/node_pb_draw_angle.gml b/scripts/node_pb_draw_angle/node_pb_draw_angle.gml index 2fe38a0f8..fb5cb0b48 100644 --- a/scripts/node_pb_draw_angle/node_pb_draw_angle.gml +++ b/scripts/node_pb_draw_angle/node_pb_draw_angle.gml @@ -11,7 +11,7 @@ function Node_PB_Draw_Angle(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _grou ["Shape", false], 3, 4, ]; - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _pbox = _data[0]; var _fcol = _data[1]; var _mask = _data[2]; diff --git a/scripts/node_pb_draw_blob/node_pb_draw_blob.gml b/scripts/node_pb_draw_blob/node_pb_draw_blob.gml index 24e4a2eec..d53e86cd6 100644 --- a/scripts/node_pb_draw_blob/node_pb_draw_blob.gml +++ b/scripts/node_pb_draw_blob/node_pb_draw_blob.gml @@ -33,7 +33,7 @@ function Node_PB_Draw_Blob(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group //inputs[| 3].drawOverlay(active, x0, y0, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _pbox = _data[0]; var _fcol = _data[1]; var _mask = _data[2]; diff --git a/scripts/node_pb_draw_diamond/node_pb_draw_diamond.gml b/scripts/node_pb_draw_diamond/node_pb_draw_diamond.gml index c72e8dd5a..ec7cec9b1 100644 --- a/scripts/node_pb_draw_diamond/node_pb_draw_diamond.gml +++ b/scripts/node_pb_draw_diamond/node_pb_draw_diamond.gml @@ -5,7 +5,7 @@ function Node_PB_Draw_Diamond(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _gr ["Draw", false], 0, 1, 2, ]; - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _pbox = _data[0]; var _fcol = _data[1]; var _mask = _data[2]; diff --git a/scripts/node_pb_draw_ellipse/node_pb_draw_ellipse.gml b/scripts/node_pb_draw_ellipse/node_pb_draw_ellipse.gml index 779836dba..fb308d11c 100644 --- a/scripts/node_pb_draw_ellipse/node_pb_draw_ellipse.gml +++ b/scripts/node_pb_draw_ellipse/node_pb_draw_ellipse.gml @@ -5,7 +5,7 @@ function Node_PB_Draw_Ellipse(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _gr ["Draw", false], 0, 1, 2, ]; - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _pbox = _data[0]; var _fcol = _data[1]; var _mask = _data[2]; diff --git a/scripts/node_pb_draw_fill/node_pb_draw_fill.gml b/scripts/node_pb_draw_fill/node_pb_draw_fill.gml index 5d2c208bd..98b4f6cd4 100644 --- a/scripts/node_pb_draw_fill/node_pb_draw_fill.gml +++ b/scripts/node_pb_draw_fill/node_pb_draw_fill.gml @@ -5,7 +5,7 @@ function Node_PB_Draw_Fill(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group ["Draw", false], 0, 1, 2, ]; - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _pbox = _data[0]; var _fcol = _data[1]; var _mask = _data[2]; diff --git a/scripts/node_pb_draw_line/node_pb_draw_line.gml b/scripts/node_pb_draw_line/node_pb_draw_line.gml index 1fbfa40e8..42ce90de4 100644 --- a/scripts/node_pb_draw_line/node_pb_draw_line.gml +++ b/scripts/node_pb_draw_line/node_pb_draw_line.gml @@ -11,7 +11,7 @@ function Node_PB_Draw_Line(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _group ["Shape", false], 3, 4, ]; - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _pbox = _data[0]; var _fcol = _data[1]; var _mask = _data[2]; diff --git a/scripts/node_pb_draw_rectangle/node_pb_draw_rectangle.gml b/scripts/node_pb_draw_rectangle/node_pb_draw_rectangle.gml index 74f2e7a31..70ef44b65 100644 --- a/scripts/node_pb_draw_rectangle/node_pb_draw_rectangle.gml +++ b/scripts/node_pb_draw_rectangle/node_pb_draw_rectangle.gml @@ -5,7 +5,7 @@ function Node_PB_Draw_Rectangle(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _ ["Draw", false], 0, 1, 2, ]; - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _pbox = _data[0]; var _fcol = _data[1]; var _mask = _data[2]; diff --git a/scripts/node_pb_draw_roundrectangle/node_pb_draw_roundrectangle.gml b/scripts/node_pb_draw_roundrectangle/node_pb_draw_roundrectangle.gml index df3707384..0be3e78e7 100644 --- a/scripts/node_pb_draw_roundrectangle/node_pb_draw_roundrectangle.gml +++ b/scripts/node_pb_draw_roundrectangle/node_pb_draw_roundrectangle.gml @@ -58,7 +58,7 @@ function Node_PB_Draw_Round_Rectangle(_x, _y, _group = noone) : Node_PB_Draw(_x, } } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _pbox = _data[0]; var _fcol = _data[1]; var _mask = _data[2]; diff --git a/scripts/node_pb_draw_semi_ellipse/node_pb_draw_semi_ellipse.gml b/scripts/node_pb_draw_semi_ellipse/node_pb_draw_semi_ellipse.gml index f19171c4c..e0fc637c0 100644 --- a/scripts/node_pb_draw_semi_ellipse/node_pb_draw_semi_ellipse.gml +++ b/scripts/node_pb_draw_semi_ellipse/node_pb_draw_semi_ellipse.gml @@ -9,7 +9,7 @@ function Node_PB_Draw_Semi_Ellipse(_x, _y, _group = noone) : Node_PB_Draw(_x, _y ["Shape", false], 3, ]; - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _pbox = _data[0]; var _fcol = _data[1]; var _mask = _data[2]; diff --git a/scripts/node_pb_draw_trapezoid/node_pb_draw_trapezoid.gml b/scripts/node_pb_draw_trapezoid/node_pb_draw_trapezoid.gml index 7106dbf34..40b92df0a 100644 --- a/scripts/node_pb_draw_trapezoid/node_pb_draw_trapezoid.gml +++ b/scripts/node_pb_draw_trapezoid/node_pb_draw_trapezoid.gml @@ -31,7 +31,7 @@ function Node_PB_Draw_Trapezoid(_x, _y, _group = noone) : Node_PB_Draw(_x, _y, _ inputs[| 7].setVisible(_type == 1); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _pbox = _data[0]; var _fcol = _data[1]; var _mask = _data[2]; diff --git a/scripts/node_pb_fx_add/node_pb_fx_add.gml b/scripts/node_pb_fx_add/node_pb_fx_add.gml index cee4d4bef..e7206fa02 100644 --- a/scripts/node_pb_fx_add/node_pb_fx_add.gml +++ b/scripts/node_pb_fx_add/node_pb_fx_add.gml @@ -8,7 +8,7 @@ function Node_PB_Fx_Add(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) con ["Effect", false], 1, ]; - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _box1 = _data[0]; var _box2 = _data[1]; diff --git a/scripts/node_pb_fx_brick/node_pb_fx_brick.gml b/scripts/node_pb_fx_brick/node_pb_fx_brick.gml index 0413f2ba5..591282c3d 100644 --- a/scripts/node_pb_fx_brick/node_pb_fx_brick.gml +++ b/scripts/node_pb_fx_brick/node_pb_fx_brick.gml @@ -24,7 +24,7 @@ function Node_PB_Fx_Brick(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) c ["Dissolve", false], 5, 7, 6, ]; - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _pbox = _data[0]; if(_pbox == noone) return _pbox; diff --git a/scripts/node_pb_fx_hash/node_pb_fx_hash.gml b/scripts/node_pb_fx_hash/node_pb_fx_hash.gml index 865d16202..8f8b14dd9 100644 --- a/scripts/node_pb_fx_hash/node_pb_fx_hash.gml +++ b/scripts/node_pb_fx_hash/node_pb_fx_hash.gml @@ -20,7 +20,7 @@ function Node_PB_Fx_Hash(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) co ["Dissolve", false], 4, 6, 5, ]; - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _pbox = _data[0]; if(_pbox == noone) return _pbox; diff --git a/scripts/node_pb_fx_highlight/node_pb_fx_highlight.gml b/scripts/node_pb_fx_highlight/node_pb_fx_highlight.gml index 88fa22908..94f5c7737 100644 --- a/scripts/node_pb_fx_highlight/node_pb_fx_highlight.gml +++ b/scripts/node_pb_fx_highlight/node_pb_fx_highlight.gml @@ -79,7 +79,7 @@ function Node_PB_Fx_Highlight(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _grou ["Roughness", false], 4, 5, 6, ]; - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _pbox = _data[0]; if(_pbox == noone) return _pbox; diff --git a/scripts/node_pb_fx_intersect/node_pb_fx_intersect.gml b/scripts/node_pb_fx_intersect/node_pb_fx_intersect.gml index 5e590f046..3162d7f53 100644 --- a/scripts/node_pb_fx_intersect/node_pb_fx_intersect.gml +++ b/scripts/node_pb_fx_intersect/node_pb_fx_intersect.gml @@ -8,7 +8,7 @@ function Node_PB_Fx_Intersect(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _grou ["Effect", false], 1, ]; - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _box1 = _data[0]; var _box2 = _data[1]; diff --git a/scripts/node_pb_fx_outline/node_pb_fx_outline.gml b/scripts/node_pb_fx_outline/node_pb_fx_outline.gml index a7ce77dd2..541b2e1f3 100644 --- a/scripts/node_pb_fx_outline/node_pb_fx_outline.gml +++ b/scripts/node_pb_fx_outline/node_pb_fx_outline.gml @@ -12,7 +12,7 @@ function Node_PB_Fx_Outline(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) ["Effect", false], 3, 1, 2, ]; - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _pbox = _data[0]; if(_pbox == noone) return _pbox; diff --git a/scripts/node_pb_fx_radial/node_pb_fx_radial.gml b/scripts/node_pb_fx_radial/node_pb_fx_radial.gml index 4f1a04c0d..077bb2944 100644 --- a/scripts/node_pb_fx_radial/node_pb_fx_radial.gml +++ b/scripts/node_pb_fx_radial/node_pb_fx_radial.gml @@ -8,7 +8,7 @@ function Node_PB_Fx_Radial(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) ["Effect", false], 1, ]; - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _pbox = _data[0]; if(_pbox == noone) return _pbox; diff --git a/scripts/node_pb_fx_shading/node_pb_fx_shading.gml b/scripts/node_pb_fx_shading/node_pb_fx_shading.gml index 5935b92e6..fc39caa09 100644 --- a/scripts/node_pb_fx_shading/node_pb_fx_shading.gml +++ b/scripts/node_pb_fx_shading/node_pb_fx_shading.gml @@ -10,7 +10,7 @@ function Node_PB_Fx_Shading(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) ["Effect", false], 1, 2, ]; - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _pbox = _data[0]; if(_pbox == noone) return _pbox; diff --git a/scripts/node_pb_fx_stack/node_pb_fx_stack.gml b/scripts/node_pb_fx_stack/node_pb_fx_stack.gml index 401f42dd3..f18f51627 100644 --- a/scripts/node_pb_fx_stack/node_pb_fx_stack.gml +++ b/scripts/node_pb_fx_stack/node_pb_fx_stack.gml @@ -24,7 +24,7 @@ function Node_PB_Fx_Stack(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) c inputs[| 5].setVisible(_high); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _pbox = _data[0]; if(_pbox == noone) return _pbox; diff --git a/scripts/node_pb_fx_strip/node_pb_fx_strip.gml b/scripts/node_pb_fx_strip/node_pb_fx_strip.gml index 04eee7f08..a25514760 100644 --- a/scripts/node_pb_fx_strip/node_pb_fx_strip.gml +++ b/scripts/node_pb_fx_strip/node_pb_fx_strip.gml @@ -14,7 +14,7 @@ function Node_PB_Fx_Strip(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) c ["Effect", false], 1, 4, 2, 3, ]; - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _pbox = _data[0]; if(_pbox == noone) return _pbox; diff --git a/scripts/node_pb_fx_substract/node_pb_fx_substract.gml b/scripts/node_pb_fx_substract/node_pb_fx_substract.gml index 6e3cf2156..7a60c8087 100644 --- a/scripts/node_pb_fx_substract/node_pb_fx_substract.gml +++ b/scripts/node_pb_fx_substract/node_pb_fx_substract.gml @@ -8,7 +8,7 @@ function Node_PB_Fx_Subtract(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group ["Effect", false], 1, ]; - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _box1 = _data[0]; var _box2 = _data[1]; diff --git a/scripts/node_pb_layer/node_pb_layer.gml b/scripts/node_pb_layer/node_pb_layer.gml index 3f8bcc6e3..36a5ce8f4 100644 --- a/scripts/node_pb_layer/node_pb_layer.gml +++ b/scripts/node_pb_layer/node_pb_layer.gml @@ -12,9 +12,7 @@ function Node_PB_Layer(_x, _y, _group = noone) : Node(_x, _y, _group) constructo static update = function() {} - static getPreviewValue = function() { - return group.outputs[| 0]; - } + static getPreviewValues = function() { return group.outputs[| 0].getValue(); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { var bbox = drawGetBbox(xx, yy, _s) diff --git a/scripts/node_perlin/node_perlin.gml b/scripts/node_perlin/node_perlin.gml index 4af971672..175f2ff96 100644 --- a/scripts/node_perlin/node_perlin.gml +++ b/scripts/node_perlin/node_perlin.gml @@ -51,7 +51,7 @@ function Node_Perlin(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| 9].name = _col == 1? "Color B range" : "Color V range"; } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _dim = _data[0]; var _pos = _data[1]; var _sca = _data[2]; diff --git a/scripts/node_perlin_smear/node_perlin_smear.gml b/scripts/node_perlin_smear/node_perlin_smear.gml index ac471c901..c3db3f2d8 100644 --- a/scripts/node_perlin_smear/node_perlin_smear.gml +++ b/scripts/node_perlin_smear/node_perlin_smear.gml @@ -27,7 +27,7 @@ function Node_Perlin_Smear(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _dim = _data[0]; var _pos = _data[1]; var _sca = _data[2]; diff --git a/scripts/node_pixel_cloud/node_pixel_cloud.gml b/scripts/node_pixel_cloud/node_pixel_cloud.gml index 7149ea196..8bdb81b8b 100644 --- a/scripts/node_pixel_cloud/node_pixel_cloud.gml +++ b/scripts/node_pixel_cloud/node_pixel_cloud.gml @@ -49,7 +49,7 @@ function Node_Pixel_Cloud(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _sed = _data[1]; var _str = _data[2]; var _map = _data[3]; diff --git a/scripts/node_pixel_sort/node_pixel_sort.gml b/scripts/node_pixel_sort/node_pixel_sort.gml index 8536eb9a5..ae1d538f2 100644 --- a/scripts/node_pixel_sort/node_pixel_sort.gml +++ b/scripts/node_pixel_sort/node_pixel_sort.gml @@ -34,7 +34,7 @@ function Node_Pixel_Sort(_x, _y, _group = noone) : Node_Processor(_x, _y, _group attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _in = _data[0]; var _it = _data[1]; diff --git a/scripts/node_plot_linear/node_plot_linear.gml b/scripts/node_plot_linear/node_plot_linear.gml index aff6d4be2..b5c8e5b2e 100644 --- a/scripts/node_plot_linear/node_plot_linear.gml +++ b/scripts/node_plot_linear/node_plot_linear.gml @@ -98,7 +98,7 @@ function Node_Plot_Linear(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 4].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _dim = _data[ 0]; var _dat = _data[ 1]; var _ran = _data[ 2]; diff --git a/scripts/node_point_move/node_point_move.gml b/scripts/node_point_move/node_point_move.gml index 5ae76ef96..ca2f2488f 100644 --- a/scripts/node_point_move/node_point_move.gml +++ b/scripts/node_point_move/node_point_move.gml @@ -31,7 +31,7 @@ function Node_Move_Point(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[| 4].setVisible(_mode == 1); } - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { var _pnt = _data[0]; var _mode = _data[1]; var _shf = _data[2]; diff --git a/scripts/node_polar/node_polar.gml b/scripts/node_polar/node_polar.gml index a6af489dd..6b30e553a 100644 --- a/scripts/node_polar/node_polar.gml +++ b/scripts/node_polar/node_polar.gml @@ -20,7 +20,7 @@ function Node_Polar(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con attribute_surface_depth(); attribute_interpolation(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { surface_set_shader(_outSurf, sh_polar); shader_set_interpolation(_data[0]); draw_surface_safe(_data[0], 0, 0); diff --git a/scripts/node_polygonal_shape/node_polygonal_shape.gml b/scripts/node_polygonal_shape/node_polygonal_shape.gml index 8274038e6..e7beb4608 100644 --- a/scripts/node_polygonal_shape/node_polygonal_shape.gml +++ b/scripts/node_polygonal_shape/node_polygonal_shape.gml @@ -89,7 +89,7 @@ function Node_Shape_Polygon(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr mesh = new Mesh(); path = new PathSegment(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { if(_output_index == 1) return mesh; if(_output_index == 2) diff --git a/scripts/node_posterize/node_posterize.gml b/scripts/node_posterize/node_posterize.gml index 987302f02..cef5a58ce 100644 --- a/scripts/node_posterize/node_posterize.gml +++ b/scripts/node_posterize/node_posterize.gml @@ -36,7 +36,7 @@ function Node_Posterize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 4].setVisible(!_use_pal); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _gra = _data[1]; var _use_gra = _data[2]; var _alp = _data[6]; diff --git a/scripts/node_processor/node_processor.gml b/scripts/node_processor/node_processor.gml index bd1a89314..2b2100a03 100644 --- a/scripts/node_processor/node_processor.gml +++ b/scripts/node_processor/node_processor.gml @@ -11,6 +11,7 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct attributes.array_process = ARRAY_PROCESS.loop; current_data = []; inputs_data = []; + all_inputs = []; process_amount = 0; process_length = []; @@ -26,7 +27,7 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct triggerRender(); }, false) ]); - static process_data = function(_outSurf, _data, _output_index, _array_index = 0) { return _outSurf; } + static processData = function(_outSurf, _data, _output_index, _array_index = 0) { return _outSurf; } static getSingleValue = function(_index, _arr = 0, output = false) { var _l = output? outputs : inputs; @@ -65,7 +66,7 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct static preProcess = function(outIndex) { var _out = outputs[| outIndex].getValue(); - if(process_amount == 0) { //render single data + if(process_amount == 0) { #region render single data if(outputs[| outIndex].type == VALUE_TYPE.d3object) //passing 3D vertex call return _out; @@ -100,24 +101,30 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct return inputs_data[0] } - var data = process_data(_out, inputs_data, outIndex, 0); /// Process data + var data = processData(_out, inputs_data, outIndex, 0); /// Process data return data; - } + } #endregion - if(outputs[| outIndex].type == VALUE_TYPE.d3object) { //passing 3D vertex call + if(outputs[| outIndex].type == VALUE_TYPE.d3object) { #region passing 3D vertex call if(is_array(_out)) _out = _out[0]; return array_create(process_amount, _out); - } + } #endregion - if(!is_array(_out)) - _out = array_create(process_amount); - else if(array_length(_out) != process_amount) - array_resize(_out, process_amount); + #region ++++ array preparation ++++ + if(!is_array(_out)) + _out = array_create(process_amount); + else if(array_length(_out) != process_amount) + array_resize(_out, process_amount); - var _data = array_create(ds_list_size(inputs)); + var _data = array_create(ds_list_size(inputs)); + all_inputs = array_create(ds_list_size(inputs)); + + for(var i = 0; i < ds_list_size(inputs); i++) + all_inputs[i] = array_create(process_amount); + #endregion for(var l = 0; l < process_amount; l++) { - for(var i = 0; i < ds_list_size(inputs); i++) { //input prepare + for(var i = 0; i < ds_list_size(inputs); i++) { #region input preparation var _in = inputs_data[i]; if(!inputs[| i].isArray(_in)) { @@ -136,10 +143,12 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct case ARRAY_PROCESS.expand : _index = floor(l / process_length[i][1]) % process_length[i][0]; break; case ARRAY_PROCESS.expand_inv : _index = floor(l / process_length[ds_list_size(inputs) - 1 - i][1]) % process_length[i][0]; break; } + _data[i] = _in[_index]; - } + all_inputs[i][l] = _data[i]; + } #endregion - if(outputs[| outIndex].type == VALUE_TYPE.surface && dimension_index > -1) { + if(outputs[| outIndex].type == VALUE_TYPE.surface && dimension_index > -1) { #region output surface verification var surf = _data[dimension_index]; var _sw = 1, _sh = 1; if(inputs[| dimension_index].type == VALUE_TYPE.surface) { @@ -154,7 +163,7 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct } _out[l] = surface_verify(_out[l], _sw, _sh, attrDepth()); - } + } #endregion if(l == 0 || l == preview_index) current_data = _data; @@ -165,14 +174,14 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct else _out[l] = _data[0]; } else { - _out[l] = process_data(_out[l], _data, outIndex, l); /// Process data + _out[l] = processData(_out[l], _data, outIndex, l); /// Process data } } return _out; } - static update = function(frame = PROJECT.animator.current_frame) { + static update = function(frame = PROJECT.animator.current_frame) { #region process_amount = 0; inputs_data = array_create(ds_list_size(inputs)); process_length = array_create(ds_list_size(inputs)); @@ -211,22 +220,22 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct val = preProcess(i); if(val == undefined) continue; } else - val = process_data(noone, noone, i); + val = processData(noone, noone, i); outputs[| i].setValue(val); } - } + } #endregion - static processSerialize = function(_map) { + static processSerialize = function(_map) { #region _map.array_process = attributes.array_process; - } + } #endregion - static processDeserialize = function() { + static processDeserialize = function() { #region attributes.array_process = struct_try_get(load_map, "array_process", ARRAY_PROCESS.loop); - } + } #endregion ///////////////////// CACHE ///////////////////// - static cacheCurrentFrameIndex = function(_frame, index) { + static cacheCurrentFrameIndex = function(_frame, index) { #region cacheArrayCheck(); if(PROJECT.animator.current_frame < 0) return; if(PROJECT.animator.current_frame >= array_length(cached_output)) return; @@ -238,13 +247,13 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct array_safe_set(cache_result, PROJECT.animator.current_frame, true); return cached_output[PROJECT.animator.current_frame]; - } + } #endregion - static getCacheFrameIndex = function(frame = PROJECT.animator.current_frame, index = 0) { + static getCacheFrameIndex = function(frame = PROJECT.animator.current_frame, index = 0) { #region if(frame < 0) return false; if(!cacheExist(frame)) return noone; var surf = array_safe_get(cached_output, frame); return array_safe_get(surf, index); - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_random/node_random.gml b/scripts/node_random/node_random.gml index 0355088c2..223cc964b 100644 --- a/scripts/node_random/node_random.gml +++ b/scripts/node_random/node_random.gml @@ -13,7 +13,7 @@ function Node_Random(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co outputs[| 0] = nodeValue("Result", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0); - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { random_set_seed(_data[0]); return random_range(_data[1], _data[2]); } diff --git a/scripts/node_random_shape/node_random_shape.gml b/scripts/node_random_shape/node_random_shape.gml index 8853187e3..c35ceaeba 100644 --- a/scripts/node_random_shape/node_random_shape.gml +++ b/scripts/node_random_shape/node_random_shape.gml @@ -89,7 +89,7 @@ function Node_Random_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro return _surf; } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _dim = _data[0]; var _seed = _data[1]; diff --git a/scripts/node_rate_remap/node_rate_remap.gml b/scripts/node_rate_remap/node_rate_remap.gml index f31f6e30c..48db39baf 100644 --- a/scripts/node_rate_remap/node_rate_remap.gml +++ b/scripts/node_rate_remap/node_rate_remap.gml @@ -19,7 +19,7 @@ function Node_Rate_Remap(_x, _y, _group = noone) : Node_Processor(_x, _y, _group } - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { var _surf = _data[0]; var _rate = _data[1]; var _time = PROJECT.animator.current_frame; diff --git a/scripts/node_region_fill/node_region_fill.gml b/scripts/node_region_fill/node_region_fill.gml index 8f2af396a..b548965ee 100644 --- a/scripts/node_region_fill/node_region_fill.gml +++ b/scripts/node_region_fill/node_region_fill.gml @@ -28,7 +28,7 @@ function Node_Region_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 4].setVisible(_fill); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _surf = _data[0]; var _mask = _data[1]; diff --git a/scripts/node_rigid_object/node_rigid_object.gml b/scripts/node_rigid_object/node_rigid_object.gml index 820bc14da..12ba6057e 100644 --- a/scripts/node_rigid_object/node_rigid_object.gml +++ b/scripts/node_rigid_object/node_rigid_object.gml @@ -76,7 +76,7 @@ function Node_Rigid_Object(_x, _y, _group = noone) : Node(_x, _y, _group) constr new NodeTool( "Anchor remove", THEME.mesh_tool_delete ), ]; - static getPreviewValue = function() { return inputs[| 6]; } + static getPreviewValues = function() { return inputs[| 6].getValue(); } is_convex = true; hover = -1; diff --git a/scripts/node_scale/node_scale.gml b/scripts/node_scale/node_scale.gml index 4ffb5c46d..b72b16edd 100644 --- a/scripts/node_scale/node_scale.gml +++ b/scripts/node_scale/node_scale.gml @@ -26,7 +26,7 @@ function Node_Scale(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con attribute_surface_depth(); attribute_interpolation(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var scale = _data[1]; var mode = _data[2]; var targ = _data[3]; diff --git a/scripts/node_scale_algo/node_scale_algo.gml b/scripts/node_scale_algo/node_scale_algo.gml index d33170526..5f30d94aa 100644 --- a/scripts/node_scale_algo/node_scale_algo.gml +++ b/scripts/node_scale_algo/node_scale_algo.gml @@ -33,7 +33,7 @@ function Node_Scale_Algo(_x, _y, _group = noone) : Node_Processor(_x, _y, _group attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var inSurf = _data[0]; var algo = _data[1]; var ww = surface_get_width(inSurf); diff --git a/scripts/node_scatter/node_scatter.gml b/scripts/node_scatter/node_scatter.gml index 7d11a24db..2a2dfe3d4 100644 --- a/scripts/node_scatter/node_scatter.gml +++ b/scripts/node_scatter/node_scatter.gml @@ -112,7 +112,7 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c inputs[| 22].setVisible(_dis == 4); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { if(_output_index == 1) return scatter_data; if(_output_index == 0 && _array_index == 0) scatter_data = []; diff --git a/scripts/node_scatter_points/node_scatter_points.gml b/scripts/node_scatter_points/node_scatter_points.gml index 541647ac0..b86831846 100644 --- a/scripts/node_scatter_points/node_scatter_points.gml +++ b/scripts/node_scatter_points/node_scatter_points.gml @@ -51,7 +51,7 @@ function Node_Scatter_Points(_x, _y, _group = noone) : Node(_x, _y, _group) cons inputs[| 0].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); } - static getPreviewValue = function() { return refVal; } + static getPreviewValues = function() { return refVal.getValue(); } function update(frame = PROJECT.animator.current_frame) { var _area = inputs[| 0].getValue(); diff --git a/scripts/node_sdf/node_sdf.gml b/scripts/node_sdf/node_sdf.gml index a7d2637d3..2863a65d3 100644 --- a/scripts/node_sdf/node_sdf.gml +++ b/scripts/node_sdf/node_sdf.gml @@ -30,7 +30,7 @@ function Node_SDF(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) const temp_surface = [ surface_create(1, 1), surface_create(1, 1) ]; - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var inSurf = _data[0]; var _side = _data[2]; var _dist = _data[3]; diff --git a/scripts/node_shadow/node_shadow.gml b/scripts/node_shadow/node_shadow.gml index 86cd6a3ab..f6dc8021c 100644 --- a/scripts/node_shadow/node_shadow.gml +++ b/scripts/node_shadow/node_shadow.gml @@ -53,7 +53,7 @@ function Node_Shadow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| 3].drawOverlay(active, _x + ww / 2, _y + hh / 2, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var cl = _data[1]; var _stre = _data[2]; var _shf = _data[3]; diff --git a/scripts/node_shadow_cast/node_shadow_cast.gml b/scripts/node_shadow_cast/node_shadow_cast.gml index f2380f469..6f5829f3d 100644 --- a/scripts/node_shadow_cast/node_shadow_cast.gml +++ b/scripts/node_shadow_cast/node_shadow_cast.gml @@ -113,7 +113,7 @@ function Node_Shadow_Cast(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou } } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _bg = _data[0]; var _solid = _data[1]; var _pos = _data[2]; diff --git a/scripts/node_simple_shape/node_simple_shape.gml b/scripts/node_simple_shape/node_simple_shape.gml index da0802351..91b5e73e3 100644 --- a/scripts/node_simple_shape/node_simple_shape.gml +++ b/scripts/node_simple_shape/node_simple_shape.gml @@ -88,7 +88,7 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 3].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _dim = _data[0]; var _bg = _data[1]; var _shape = _data[2]; diff --git a/scripts/node_skew/node_skew.gml b/scripts/node_skew/node_skew.gml index 6c0b558a0..f4ce6d874 100644 --- a/scripts/node_skew/node_skew.gml +++ b/scripts/node_skew/node_skew.gml @@ -49,7 +49,7 @@ function Node_Skew(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 4].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _axis = _data[1]; var _amou = _data[2]; var _wrap = _data[3]; diff --git a/scripts/node_solid/node_solid.gml b/scripts/node_solid/node_solid.gml index accd3391b..1e46486a4 100644 --- a/scripts/node_solid/node_solid.gml +++ b/scripts/node_solid/node_solid.gml @@ -21,7 +21,7 @@ function Node_Solid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con attribute_surface_depth(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _dim = _data[0]; var _col = _data[1]; var _emp = _data[2]; diff --git a/scripts/node_sprite_stack/node_sprite_stack.gml b/scripts/node_sprite_stack/node_sprite_stack.gml index 7cc8f0a6b..edbb16c0f 100644 --- a/scripts/node_sprite_stack/node_sprite_stack.gml +++ b/scripts/node_sprite_stack/node_sprite_stack.gml @@ -60,7 +60,7 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[| 11].setVisible(_high); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _in = _data[0]; var _dim = _data[1]; var _amo = _data[2]; diff --git a/scripts/node_string/node_string.gml b/scripts/node_string/node_string.gml index 08ca625b3..e69f38c36 100644 --- a/scripts/node_string/node_string.gml +++ b/scripts/node_string/node_string.gml @@ -7,7 +7,7 @@ function Node_String(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, ""); outputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, ""); - static process_data = function(_output, _data, _index = 0) { + static processData = function(_output, _data, _index = 0) { return _data[0]; } diff --git a/scripts/node_string_get_char/node_string_get_char.gml b/scripts/node_string_get_char/node_string_get_char.gml index cb31f6292..fd2dd3884 100644 --- a/scripts/node_string_get_char/node_string_get_char.gml +++ b/scripts/node_string_get_char/node_string_get_char.gml @@ -12,7 +12,7 @@ function Node_String_Get_Char(_x, _y, _group = noone) : Node_Processor(_x, _y, _ outputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, ""); - static process_data = function(_output, _data, _index = 0) { + static processData = function(_output, _data, _index = 0) { return string_copy(_data[0], _data[1], _data[2]); } diff --git a/scripts/node_string_length/node_string_length.gml b/scripts/node_string_length/node_string_length.gml index 87006ba74..ec95e6a8d 100644 --- a/scripts/node_string_length/node_string_length.gml +++ b/scripts/node_string_length/node_string_length.gml @@ -12,7 +12,7 @@ function Node_String_Length(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr outputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, ""); - static process_data = function(_output, _data, _index = 0) { + static processData = function(_output, _data, _index = 0) { if(_data[1] == 0) return string_length(_data[0]); else diff --git a/scripts/node_string_merge/node_string_merge.gml b/scripts/node_string_merge/node_string_merge.gml index 814b4a82d..e8a8cad39 100644 --- a/scripts/node_string_merge/node_string_merge.gml +++ b/scripts/node_string_merge/node_string_merge.gml @@ -10,7 +10,7 @@ function Node_String_Merge(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro outputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, ""); - static process_data = function(_output, _data, _index = 0) { + static processData = function(_output, _data, _index = 0) { return string(_data[0]) + string(_data[1]); } diff --git a/scripts/node_string_path_separate_folder/node_string_path_separate_folder.gml b/scripts/node_string_path_separate_folder/node_string_path_separate_folder.gml index eddf123f2..2f06d09a3 100644 --- a/scripts/node_string_path_separate_folder/node_string_path_separate_folder.gml +++ b/scripts/node_string_path_separate_folder/node_string_path_separate_folder.gml @@ -13,7 +13,7 @@ function Node_Path_Separate_Folder(_x, _y, _group = noone) : Node_Processor(_x, outputs[| 1] = nodeValue("File Name", self, JUNCTION_CONNECT.output, VALUE_TYPE.path, ""); - static process_data = function(_output, _data, _index = 0) { + static processData = function(_output, _data, _index = 0) { if(_index == 0) return filename_dir(_data[0]); else if(_index == 1) diff --git a/scripts/node_string_regex_match/node_string_regex_match.gml b/scripts/node_string_regex_match/node_string_regex_match.gml index b13bf0665..9c7822359 100644 --- a/scripts/node_string_regex_match/node_string_regex_match.gml +++ b/scripts/node_string_regex_match/node_string_regex_match.gml @@ -15,7 +15,7 @@ function Node_String_Regex_Match(_x, _y, _group = noone) : Node_Processor(_x, _y 0, 1, ]; - static process_data = function(_output, _data, _index = 0) { + static processData = function(_output, _data, _index = 0) { var str = _data[0]; var reg = _data[1]; diff --git a/scripts/node_string_regex_replace/node_string_regex_replace.gml b/scripts/node_string_regex_replace/node_string_regex_replace.gml index 2ab07f346..ebc452f62 100644 --- a/scripts/node_string_regex_replace/node_string_regex_replace.gml +++ b/scripts/node_string_regex_replace/node_string_regex_replace.gml @@ -17,7 +17,7 @@ function Node_String_Regex_Replace(_x, _y, _group = noone) : Node_Processor(_x, 0, 1, 2, ]; - static process_data = function(_output, _data, _index = 0) { + static processData = function(_output, _data, _index = 0) { var str = _data[0]; var reg = _data[1]; var rep = _data[2]; diff --git a/scripts/node_string_regex_search/node_string_regex_search.gml b/scripts/node_string_regex_search/node_string_regex_search.gml index bbc42ab29..a187cc419 100644 --- a/scripts/node_string_regex_search/node_string_regex_search.gml +++ b/scripts/node_string_regex_search/node_string_regex_search.gml @@ -15,7 +15,7 @@ function Node_String_Regex_Search(_x, _y, _group = noone) : Node_Processor(_x, _ 0, 1, ]; - static process_data = function(_output, _data, _index = 0) { + static processData = function(_output, _data, _index = 0) { var str = _data[0]; var reg = _data[1]; diff --git a/scripts/node_string_split/node_string_split.gml b/scripts/node_string_split/node_string_split.gml index 7ce267deb..bec47474e 100644 --- a/scripts/node_string_split/node_string_split.gml +++ b/scripts/node_string_split/node_string_split.gml @@ -12,7 +12,7 @@ function Node_String_Split(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro outputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, ""); - static process_data = function(_output, _data, _index = 0) { + static processData = function(_output, _data, _index = 0) { if(_data[1] == "") return string_to_array(_data[0]); diff --git a/scripts/node_string_trim/node_string_trim.gml b/scripts/node_string_trim/node_string_trim.gml index 068efe92c..7d82ccdcd 100644 --- a/scripts/node_string_trim/node_string_trim.gml +++ b/scripts/node_string_trim/node_string_trim.gml @@ -32,7 +32,7 @@ function Node_String_Trim(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 2].type = mode? VALUE_TYPE.float : VALUE_TYPE.integer; } - static process_data = function(_output, _data, _index = 0) { + static processData = function(_output, _data, _index = 0) { var str = _data[0]; var hed = max(0, _data[1]); var tal = max(0, _data[2]); diff --git a/scripts/node_stripe/node_stripe.gml b/scripts/node_stripe/node_stripe.gml index 105ae2d0c..d3880b63c 100644 --- a/scripts/node_stripe/node_stripe.gml +++ b/scripts/node_stripe/node_stripe.gml @@ -63,7 +63,7 @@ function Node_Stripe(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| 2].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _dim = _data[0]; var _amo = _data[1]; var _ang = _data[2]; diff --git a/scripts/node_surface_from_buffer/node_surface_from_buffer.gml b/scripts/node_surface_from_buffer/node_surface_from_buffer.gml index 51516df92..d91f812bf 100644 --- a/scripts/node_surface_from_buffer/node_surface_from_buffer.gml +++ b/scripts/node_surface_from_buffer/node_surface_from_buffer.gml @@ -6,7 +6,7 @@ function Node_Surface_From_Buffer(_x, _y, _group = noone) : Node_Processor(_x, _ outputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _buff = _data[0]; var _surf = surface_from_buffer(_buff); return _surf; diff --git a/scripts/node_surface_from_color/node_surface_from_color.gml b/scripts/node_surface_from_color/node_surface_from_color.gml index 05137a1bc..6a81c89d9 100644 --- a/scripts/node_surface_from_color/node_surface_from_color.gml +++ b/scripts/node_surface_from_color/node_surface_from_color.gml @@ -6,7 +6,7 @@ function Node_Surface_From_Color(_x, _y, _group = noone) : Node_Processor(_x, _y outputs[| 0] = nodeValue("Surface", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _col = _data[0]; if(!is_array(_col)) _col = [ _col ]; diff --git a/scripts/node_surface_replace/node_surface_replace.gml b/scripts/node_surface_replace/node_surface_replace.gml index 4d2f2c9c6..8cb4a86c0 100644 --- a/scripts/node_surface_replace/node_surface_replace.gml +++ b/scripts/node_surface_replace/node_surface_replace.gml @@ -77,7 +77,7 @@ function Node_Surface_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _ inputs[| 8].setVisible(_mode == 1); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _bas = _data[0]; var _tar = _data[1]; var _rep = _data[2]; diff --git a/scripts/node_surface_to_buffer/node_surface_to_buffer.gml b/scripts/node_surface_to_buffer/node_surface_to_buffer.gml index 2867db52a..6fee34cc4 100644 --- a/scripts/node_surface_to_buffer/node_surface_to_buffer.gml +++ b/scripts/node_surface_to_buffer/node_surface_to_buffer.gml @@ -5,7 +5,7 @@ function Node_Surface_To_Buffer(_x, _y, _group = noone) : Node_Processor(_x, _y, outputs[| 0] = nodeValue("Buffer", self, JUNCTION_CONNECT.output, VALUE_TYPE.buffer, noone); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _surf = _data[0]; return buffer_from_surface(_surf); } diff --git a/scripts/node_surface_to_color/node_surface_to_color.gml b/scripts/node_surface_to_color/node_surface_to_color.gml index e582cb67a..b35f81dc7 100644 --- a/scripts/node_surface_to_color/node_surface_to_color.gml +++ b/scripts/node_surface_to_color/node_surface_to_color.gml @@ -6,7 +6,7 @@ function Node_Surface_To_Color(_x, _y, _group = noone) : Node_Processor(_x, _y, outputs[| 0] = nodeValue("Color", self, JUNCTION_CONNECT.output, VALUE_TYPE.color, []) .setDisplay(VALUE_DISPLAY.palette); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _surf = _data[0]; var _pal = []; diff --git a/scripts/node_text/node_text.gml b/scripts/node_text/node_text.gml index 669a74446..36e8a4f34 100644 --- a/scripts/node_text/node_text.gml +++ b/scripts/node_text/node_text.gml @@ -72,7 +72,7 @@ function Node_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons } } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var str = _data[0]; var _font = _data[1]; var _size = _data[2]; diff --git a/scripts/node_texture_remap/node_texture_remap.gml b/scripts/node_texture_remap/node_texture_remap.gml index 9ff0ae63c..2df469833 100644 --- a/scripts/node_texture_remap/node_texture_remap.gml +++ b/scripts/node_texture_remap/node_texture_remap.gml @@ -20,7 +20,7 @@ function Node_Texture_Remap(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr attribute_surface_depth(); attribute_interpolation(); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { if(!is_surface(_data[1])) return _outSurf; surface_set_shader(_outSurf, shader); diff --git a/scripts/node_threshold/node_threshold.gml b/scripts/node_threshold/node_threshold.gml index 4c269c271..90444ace9 100644 --- a/scripts/node_threshold/node_threshold.gml +++ b/scripts/node_threshold/node_threshold.gml @@ -46,7 +46,7 @@ function Node_Threshold(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 9].setVisible(_alpha); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _bright = _data[1]; var _brightThreshold = _data[2]; var _brightSmooth = _data[3]; diff --git a/scripts/node_to_number/node_to_number.gml b/scripts/node_to_number/node_to_number.gml index 0c2d5844c..513ba49f4 100644 --- a/scripts/node_to_number/node_to_number.gml +++ b/scripts/node_to_number/node_to_number.gml @@ -10,7 +10,7 @@ function Node_To_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) outputs[| 0] = nodeValue("Number", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0); - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { return toNumber(_data[0]); } diff --git a/scripts/node_to_text/node_to_text.gml b/scripts/node_to_text/node_to_text.gml index aa5a2f7a6..1d6c5a469 100644 --- a/scripts/node_to_text/node_to_text.gml +++ b/scripts/node_to_text/node_to_text.gml @@ -9,7 +9,7 @@ function Node_To_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c outputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, ""); - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { return string(_data[0]); } diff --git a/scripts/node_transform/node_transform.gml b/scripts/node_transform/node_transform.gml index b281e59a6..42caced6c 100644 --- a/scripts/node_transform/node_transform.gml +++ b/scripts/node_transform/node_transform.gml @@ -126,7 +126,7 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) } } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var ins = _data[0]; var out_type = _data[9]; diff --git a/scripts/node_transform_array/node_transform_array.gml b/scripts/node_transform_array/node_transform_array.gml index 1cb0c28b7..cbdd7f73f 100644 --- a/scripts/node_transform_array/node_transform_array.gml +++ b/scripts/node_transform_array/node_transform_array.gml @@ -29,7 +29,7 @@ function Node_Transform_Array(_x, _y, _group = noone) : Node_Processor(_x, _y, _ inputs[| 1].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny); } - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { return [_data[0][0], _data[0][1], _data[1], _data[2][0], _data[2][0]]; } diff --git a/scripts/node_transform_single/node_transform_single.gml b/scripts/node_transform_single/node_transform_single.gml index 1b5ca312b..9e56b9dd7 100644 --- a/scripts/node_transform_single/node_transform_single.gml +++ b/scripts/node_transform_single/node_transform_single.gml @@ -13,7 +13,7 @@ function Node_Transform_Single(_x, _y, _group = noone) : Node_Processor(_x, _y, outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var pos_x = _data[1]; var pos_y = _data[2]; var anc_x = _data[3]; diff --git a/scripts/node_twirl/node_twirl.gml b/scripts/node_twirl/node_twirl.gml index 52eb5769b..4823070ce 100644 --- a/scripts/node_twirl/node_twirl.gml +++ b/scripts/node_twirl/node_twirl.gml @@ -50,7 +50,7 @@ function Node_Twirl(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 3].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny, 0, 1, THEME.anchor_scale_hori); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var center = _data[1]; var stren = _data[2]; var rad = _data[3]; diff --git a/scripts/node_unicode/node_unicode.gml b/scripts/node_unicode/node_unicode.gml index fde1f674b..a975649ea 100644 --- a/scripts/node_unicode/node_unicode.gml +++ b/scripts/node_unicode/node_unicode.gml @@ -10,7 +10,7 @@ function Node_Unicode(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c outputs[| 0] = nodeValue("Character", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, 0); - static process_data = function(_output, _data, index = 0) { + static processData = function(_output, _data, index = 0) { return chr(_data[0]); } diff --git a/scripts/node_value/node_value.gml b/scripts/node_value/node_value.gml index f846495a2..373540e7a 100644 --- a/scripts/node_value/node_value.gml +++ b/scripts/node_value/node_value.gml @@ -121,6 +121,10 @@ function value_color(i) { $6691ff, //armature $808080, //buffer $976bff, //pbBox + $ffa64d, //d3Mesh + $ffa64d, //d3Light + $ffa64d, //d3Camera + $ffa64d, //d3Scene ]; if(i == 99) return $5dde8f; diff --git a/scripts/node_vector_cross2D/node_vector_cross2D.gml b/scripts/node_vector_cross2D/node_vector_cross2D.gml index eca9924b5..ec6b0d1b6 100644 --- a/scripts/node_vector_cross2D/node_vector_cross2D.gml +++ b/scripts/node_vector_cross2D/node_vector_cross2D.gml @@ -15,7 +15,7 @@ function Node_Vector_Cross_2D(_x, _y, _group = noone) : Node_Processor(_x, _y, _ outputs[| 0] = nodeValue("Result", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0 ); - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { var vec1 = _data[0]; var vec2 = _data[1]; diff --git a/scripts/node_vector_cross3D/node_vector_cross3D.gml b/scripts/node_vector_cross3D/node_vector_cross3D.gml index b570219a1..fb1824099 100644 --- a/scripts/node_vector_cross3D/node_vector_cross3D.gml +++ b/scripts/node_vector_cross3D/node_vector_cross3D.gml @@ -16,7 +16,7 @@ function Node_Vector_Cross_3D(_x, _y, _group = noone) : Node_Processor(_x, _y, _ outputs[| 0] = nodeValue("Result", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, [ 0, 0, 0 ] ) .setDisplay(VALUE_DISPLAY.vector); - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { var vec1 = _data[0]; var vec2 = _data[1]; diff --git a/scripts/node_vector_dot/node_vector_dot.gml b/scripts/node_vector_dot/node_vector_dot.gml index 190798e11..c85eef363 100644 --- a/scripts/node_vector_dot/node_vector_dot.gml +++ b/scripts/node_vector_dot/node_vector_dot.gml @@ -15,7 +15,7 @@ function Node_Vector_Dot(_x, _y, _group = noone) : Node_Processor(_x, _y, _group outputs[| 0] = nodeValue("Result", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0 ); - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { var _pnt1 = _data[0]; var _pnt2 = _data[1]; diff --git a/scripts/node_wiggler/node_wiggler.gml b/scripts/node_wiggler/node_wiggler.gml index b85d0e294..a7b8208cd 100644 --- a/scripts/node_wiggler/node_wiggler.gml +++ b/scripts/node_wiggler/node_wiggler.gml @@ -35,7 +35,7 @@ function Node_Wiggler(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c random_value[i] = getWiggle(ran[0], ran[1], PROJECT.animator.frames_total / fre, step * i, sed, 0, PROJECT.animator.frames_total); } - static process_data = function(_output, _data, _output_index, _array_index = 0) { + static processData = function(_output, _data, _output_index, _array_index = 0) { var ran = _data[0]; var fre = _data[1]; var sed = _data[2]; diff --git a/scripts/node_wrap/node_wrap.gml b/scripts/node_wrap/node_wrap.gml index 9e9ce52a6..0c5e7151a 100644 --- a/scripts/node_wrap/node_wrap.gml +++ b/scripts/node_wrap/node_wrap.gml @@ -173,7 +173,7 @@ function Node_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 4].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var tl = _data[1]; var tr = _data[2]; var bl = _data[3]; diff --git a/scripts/node_wrap_area/node_wrap_area.gml b/scripts/node_wrap_area/node_wrap_area.gml index 7d4fabda2..603e44a8b 100644 --- a/scripts/node_wrap_area/node_wrap_area.gml +++ b/scripts/node_wrap_area/node_wrap_area.gml @@ -23,7 +23,7 @@ function Node_Wrap_Area(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _inSurf = _data[0]; if(!is_surface(_inSurf)) return _outSurf; diff --git a/scripts/node_wrap_mesh/node_wrap_mesh.gml b/scripts/node_wrap_mesh/node_wrap_mesh.gml index a7880964a..f7bd9d5f1 100644 --- a/scripts/node_wrap_mesh/node_wrap_mesh.gml +++ b/scripts/node_wrap_mesh/node_wrap_mesh.gml @@ -674,7 +674,7 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) else if (_type == 1) tools = tools_mesh; } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _inSurf = _data[0]; if(!is_surface(_inSurf)) return _outSurf; diff --git a/scripts/node_wrap_perspective/node_wrap_perspective.gml b/scripts/node_wrap_perspective/node_wrap_perspective.gml index f724abb2c..0378c33a6 100644 --- a/scripts/node_wrap_perspective/node_wrap_perspective.gml +++ b/scripts/node_wrap_perspective/node_wrap_perspective.gml @@ -192,7 +192,7 @@ function Node_Warp_Perspective(_x, _y, _group = noone) : Node_Processor(_x, _y, inputs[| tool * 4 + 5].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var Ftl = _data[2]; var Ftr = _data[3]; var Fbl = _data[4]; diff --git a/scripts/node_zigzag/node_zigzag.gml b/scripts/node_zigzag/node_zigzag.gml index 2e8e0aa58..15aefe443 100644 --- a/scripts/node_zigzag/node_zigzag.gml +++ b/scripts/node_zigzag/node_zigzag.gml @@ -38,7 +38,7 @@ function Node_Zigzag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); } - static process_data = function(_outSurf, _data, _output_index, _array_index) { + static processData = function(_outSurf, _data, _output_index, _array_index) { var _dim = _data[0]; var _amo = _data[1]; var _pos = _data[2]; diff --git a/scripts/panel_graph/panel_graph.gml b/scripts/panel_graph/panel_graph.gml index 48cf741ab..d3eccec88 100644 --- a/scripts/panel_graph/panel_graph.gml +++ b/scripts/panel_graph/panel_graph.gml @@ -1099,7 +1099,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { } } - if(target != noone && struct_has(target.node, "addInput")) + if(target != noone && target.connect_type == JUNCTION_CONNECT.input && target.node.is_dynamic_input) _addInput = true; var _mmx = target != noone? target.x : _mx; diff --git a/scripts/panel_preview/panel_preview.gml b/scripts/panel_preview/panel_preview.gml index 385a1c391..103ffa95e 100644 --- a/scripts/panel_preview/panel_preview.gml +++ b/scripts/panel_preview/panel_preview.gml @@ -71,6 +71,8 @@ function Panel_Preview() : PanelContent() constructor { splitViewMouse = 0; tileMode = 0; + + bg_color = COLORS.panel_3d_bg; #endregion #region ---- tool ---- @@ -82,6 +84,8 @@ function Panel_Preview() : PanelContent() constructor { #region ---- 3d ---- d3_active = false; + _d3_active = false; + d3_active_transition = 0; d3_surface = noone; d3_outline_surface = noone; @@ -102,15 +106,15 @@ function Panel_Preview() : PanelContent() constructor { d3_pan_speed = 2; d3_scene = new __3dScene(d3_view_camera); - d3_scene.lightAmbient = $202020; + d3_scene.lightAmbient = $404040; d3_scene_light0 = new __3dLightDirectional(); d3_scene_light0.position.set(-1, -2, 3); - d3_scene_light0.color = $303030; + d3_scene_light0.color = $AAAAAA; d3_scene_light1 = new __3dLightDirectional(); d3_scene_light1.position.set(1, 2, 3); - d3_scene_light1.color = $404040; + d3_scene_light1.color = $FFFFFF; #endregion tb_framerate = new textBox(TEXTBOX_INPUT.number, function(val) { preview_rate = real(val); }); @@ -237,6 +241,7 @@ function Panel_Preview() : PanelContent() constructor { for( var i = 0; i < 2; i++ ) { var node = preview_node[i]; + preview_sequence[i] = 0; if(node == noone) continue; if(!node.active) { @@ -244,13 +249,7 @@ function Panel_Preview() : PanelContent() constructor { return; } - var _prev_val = node.getPreviewValue(); - - if(_prev_val == undefined) continue; - if(_prev_val == noone) continue; - if(_prev_val.type != VALUE_TYPE.surface) continue; - - var value = _prev_val.getValue(); + var value = node.getPreviewValues(); if(is_array(value)) { preview_sequence[i] = value; @@ -701,17 +700,34 @@ function Panel_Preview() : PanelContent() constructor { #region view var cam = camera_get_active(); - var _pos, targ; + var _pos, targ, _blend = 1; targ = d3_camTarget; _pos = calculate_3d_position(targ.x, targ.y, targ.z, d3_view_camera.focus_angle_x, d3_view_camera.focus_angle_y, d3_view_camera.focus_dist); - if(d3_camLerp) { - d3_view_camera.position._lerp(_pos, 0.2); - d3_view_camera.focus._lerp(targ, 0.2); + if(d3_active_transition == 1) { + var _up = new __vec3(0, 0, -1); + + d3_view_camera.position._lerp_float(_pos, 5, 0.1); + d3_view_camera.focus._lerp_float( targ, 5, 0.1); + d3_view_camera.up._lerp_float( _up, 5, 0.1); if(d3_view_camera.position.equal(_pos) && d3_view_camera.focus.equal(targ)) - d3_camLerp = false; + d3_active_transition = 0; + } else if(d3_active_transition == -1) { + var _pos = new __vec3(0, 0, 8); + var targ = new __vec3(0, 0, 0); + var _up = new __vec3(0, 1, 0); + + d3_view_camera.position._lerp_float(_pos, 5, 0.1); + d3_view_camera.focus._lerp_float( targ, 5, 0.1); + d3_view_camera.up._lerp_float( _up, 5, 0.1); + + _blend = d3_view_camera.position.distance(_pos) / 2; + _blend = clamp(_blend, 0, 1); + + if(d3_view_camera.position.equal(_pos) && d3_view_camera.focus.equal(targ)) + d3_active_transition = 0; } else { d3_view_camera.position.set(_pos); d3_view_camera.focus.set(targ); @@ -726,7 +742,7 @@ function Panel_Preview() : PanelContent() constructor { d3_outline_surface = surface_verify(d3_outline_surface, w, h); surface_set_target(d3_surface); - draw_clear(COLORS.panel_3d_bg); + draw_clear(bg_color); d3_view_camera.applyCamera(cam); @@ -740,6 +756,7 @@ function Panel_Preview() : PanelContent() constructor { var _scale = _dist * 2; while(_scale > 32) _scale /= 2; + shader_set_f("axisBlend", _blend); shader_set_f("scale", _scale); shader_set_f("shift", _tx / _dist / 2, _ty / _dist / 2); draw_sprite_stretched(s_fx_pixel, 0, _tx - _dist, _ty - _dist, _dist * 2, _dist * 2); @@ -747,27 +764,48 @@ function Panel_Preview() : PanelContent() constructor { gpu_set_zwriteenable(true); d3_scene.reset(); - d3_scene.addLightDirectional(d3_scene_light0); - d3_scene.addLightDirectional(d3_scene_light1); - _prev_node.submitShader(d3_scene); - d3_scene.apply(); - - _prev_node.submitUI(d3_scene); //////////////// SUBMIT //////////////// + if(_prev_node.is_3D) { + var _prev_obj = _prev_node.getPreviewObject(); + + d3_scene.addLightDirectional(d3_scene_light0); + d3_scene.addLightDirectional(d3_scene_light1); + + for( var i = 0, n = array_length(_prev_obj); i < n; i++ ) { + var _prev = _prev_obj[i]; + if(_prev == noone) continue; + + _prev.submitShader(d3_scene); + } + + d3_scene.apply(); + + for( var i = 0, n = array_length(_prev_obj); i < n; i++ ) { + var _prev = _prev_obj[i]; + if(_prev == noone) continue; + _prev.submitUI(d3_scene); //////////////// SUBMIT //////////////// + } + } surface_reset_target(); - draw_surface(d3_surface, 0, 0); + draw_surface_safe(d3_surface); #endregion #region outline var inspect_node = PANEL_INSPECTOR.inspecting; + if(inspect_node && inspect_node.is_3D) { + var _inspect_obj = inspect_node.getPreviewObjectOutline(); + surface_set_target(d3_outline_surface); draw_clear(c_black); d3_view_camera.applyCamera(cam); gpu_set_ztestenable(false); - inspect_node.submitSel(d3_scene); + for( var i = 0, n = array_length(_inspect_obj); i < n; i++ ) { + if(_inspect_obj[i] == noone) continue; + _inspect_obj[i].submitSel(d3_scene); + } surface_reset_target(); shader_set(sh_d3d_outline); @@ -783,38 +821,41 @@ function Panel_Preview() : PanelContent() constructor { right_menu_y = toolbar_height - ui(4); toolbar_draw = false; - if(PANEL_PREVIEW == self) { - draw_set_text(f_p0, fa_right, fa_top, COLORS._main_text_accent); - draw_text(w - ui(8), right_menu_y, __txt("Active")); - right_menu_y += string_height("l"); - } - - draw_set_text(f_p0, fa_right, fa_top, fps >= PROJECT.animator.framerate? COLORS._main_text_sub : COLORS._main_value_negative); - draw_text(w - ui(8), right_menu_y, __txt("fps") + " " + string(fps)); - right_menu_y += string_height("l"); - - draw_set_text(f_p0, fa_right, fa_top, COLORS._main_text_sub); - draw_text(w - ui(8), right_menu_y, __txt("Frame") + " " + string(PROJECT.animator.current_frame) + "/" + string(PROJECT.animator.frames_total)); - - right_menu_y += string_height("l"); - draw_text(w - ui(8), right_menu_y, "x" + string(canvas_s)); - - if(pHOVER) { - right_menu_y += string_height("l"); - var mpx = floor((mx - canvas_x) / canvas_s); - var mpy = floor((my - canvas_y) / canvas_s); - draw_text(w - ui(8), right_menu_y, "[" + string(mpx) + ", " + string(mpy) + "]"); - } - var _node = getNodePreview(); - if(_node == noone) return; - right_menu_y += string_height("l"); - var txt = string(canvas_w) + "x" + string(canvas_h) + "px"; - if(canvas_a) txt = string(canvas_a) + " x " + txt; - draw_text(w - ui(8), right_menu_y, txt); + #region status texts (top right) + if(PANEL_PREVIEW == self) { + draw_set_text(f_p0, fa_right, fa_top, COLORS._main_text_accent); + draw_text(w - ui(8), right_menu_y, __txt("Active")); + right_menu_y += string_height("l"); + } - right_menu_y += string_height("l"); + draw_set_text(f_p0, fa_right, fa_top, fps >= PROJECT.animator.framerate? COLORS._main_text_sub : COLORS._main_value_negative); + draw_text(w - ui(8), right_menu_y, __txt("fps") + " " + string(fps)); + right_menu_y += string_height("l"); + + draw_set_text(f_p0, fa_right, fa_top, COLORS._main_text_sub); + draw_text(w - ui(8), right_menu_y, __txt("Frame") + " " + string(PROJECT.animator.current_frame) + "/" + string(PROJECT.animator.frames_total)); + + right_menu_y += string_height("l"); + draw_text(w - ui(8), right_menu_y, "x" + string(canvas_s)); + + if(pHOVER) { + right_menu_y += string_height("l"); + var mpx = floor((mx - canvas_x) / canvas_s); + var mpy = floor((my - canvas_y) / canvas_s); + draw_text(w - ui(8), right_menu_y, "[" + string(mpx) + ", " + string(mpy) + "]"); + } + + if(_node == noone) return; + + right_menu_y += string_height("l"); + var txt = string(canvas_w) + "x" + string(canvas_h) + "px"; + if(canvas_a) txt = string(canvas_a) + " x " + txt; + draw_text(w - ui(8), right_menu_y, txt); + + right_menu_y += string_height("l"); + #endregion var pseq = getNodePreviewSequence(); if(pseq == 0) return; @@ -836,9 +877,11 @@ function Panel_Preview() : PanelContent() constructor { } preview_x_max = 0; - var xx = preview_x + ui(8); - var yy = h - toolbar_height - prev_size - ui(8); + var _xx = (_node.tools != -1) * ui(40); + var xx = _xx + preview_x + ui(8); + var yy = h - toolbar_height - prev_size - ui(8); if(my > yy) mouse_on_preview = false; + var hoverable = pHOVER && point_in_rectangle(mx, my, _xx, ui(32), w, h - toolbar_height); for(var i = 0; i < array_length(pseq); i++) { var prev = pseq[i]; @@ -852,7 +895,7 @@ function Panel_Preview() : PanelContent() constructor { draw_set_color(COLORS.panel_preview_surface_outline); draw_rectangle(xx, yy, xx + prev_w * ss, yy + prev_h * ss, true); - if(pHOVER && point_in_rectangle(mx, my, xx, yy, xx + prev_sw, yy + prev_h * ss)) { + if(hoverable && point_in_rectangle(mx, my, xx, yy, xx + prev_sw, yy + prev_h * ss)) { if(mouse_press(mb_left, pFOCUS)) { _node.preview_index = i; _node.onValueUpdate(0); @@ -873,25 +916,27 @@ function Panel_Preview() : PanelContent() constructor { preview_x_max += prev_sw + ui(8); } preview_x_max = max(preview_x_max - ui(100), 0); + + #region ++++ sequence control ++++ + //var by = h - toolbar_height - prev_size - ui(56); + //var bx = ui(10); - var by = h - toolbar_height - prev_size - ui(56); - var bx = ui(10); + //var b = buttonInstant(THEME.button_hide, bx, by, ui(40), ui(40), [mx, my], pFOCUS, pHOVER); - var b = buttonInstant(THEME.button_hide, bx, by, ui(40), ui(40), [mx, my], pFOCUS, pHOVER); - - if(_node.preview_speed == 0) { - if(b) { - draw_sprite_ui_uniform(THEME.sequence_control, 1, bx + ui(20), by + ui(20), 1, COLORS._main_icon, 1); - if(b == 2) _node.preview_speed = preview_rate / game_get_speed(gamespeed_fps); - } - draw_sprite_ui_uniform(THEME.sequence_control, 1, bx + ui(20), by + ui(20), 1, COLORS._main_icon, 0.5); - } else { - if(b) { - draw_sprite_ui_uniform(THEME.sequence_control, 0, bx + ui(20), by + ui(20), 1, COLORS._main_accent, 1); - if(b == 2) _node.preview_speed = 0; - } - draw_sprite_ui_uniform(THEME.sequence_control, 0, bx + ui(20), by + ui(20), 1, COLORS._main_accent, .75); - } + //if(_node.preview_speed == 0) { + // if(b) { + // draw_sprite_ui_uniform(THEME.sequence_control, 1, bx + ui(20), by + ui(20), 1, COLORS._main_icon, 1); + // if(b == 2) _node.preview_speed = preview_rate / game_get_speed(gamespeed_fps); + // } + // draw_sprite_ui_uniform(THEME.sequence_control, 1, bx + ui(20), by + ui(20), 1, COLORS._main_icon, 0.5); + //} else { + // if(b) { + // draw_sprite_ui_uniform(THEME.sequence_control, 0, bx + ui(20), by + ui(20), 1, COLORS._main_accent, 1); + // if(b == 2) _node.preview_speed = 0; + // } + // draw_sprite_ui_uniform(THEME.sequence_control, 0, bx + ui(20), by + ui(20), 1, COLORS._main_accent, .75); + //} + #endregion } #endregion tool_hovering = false; @@ -1199,30 +1244,30 @@ function Panel_Preview() : PanelContent() constructor { function drawContent(panel) { #region >>>>>>>>>>>>>>>>>>>> MAIN DRAW <<<<<<<<<<<<<<<<<<<< mouse_on_preview = pHOVER && point_in_rectangle(mx, my, 0, toolbar_height, w, h - toolbar_height); var _prev_node = getNodePreview(); + d3_active = _prev_node != noone && _prev_node.is_3D; - draw_clear(COLORS.panel_bg_clear); + draw_clear(bg_color); if(canvas_bg == -1 && canvas_s >= 0.1) draw_sprite_tiled_ext(s_transparent, 0, canvas_x, canvas_y, canvas_s, canvas_s, COLORS.panel_preview_transparent, 1); else draw_clear(canvas_bg); + draw_set_color(COLORS._main_icon_dark); + draw_line_width(canvas_x, 0, canvas_x, h, 1); + draw_line_width(0, canvas_y, w, canvas_y, 1); + + bg_color = lerp_color(bg_color, d3_active? COLORS.panel_3d_bg : COLORS.panel_bg_clear, 0.3); + title = __txt("Preview"); if(d3_active) { dragCanvas3D(); draw3D(); } else { - - draw_set_color(COLORS._main_icon_dark); - draw_line_width(canvas_x, 0, canvas_x, h, 1); - draw_line_width(0, canvas_y, w, canvas_y, 1); - - title = __txt("Preview"); - dragCanvas(); - getPreviewData(); drawNodePreview(); } + getPreviewData(); drawPreviewOverlay(); var inspect_node = PANEL_INSPECTOR.inspecting; @@ -1231,9 +1276,8 @@ function Panel_Preview() : PanelContent() constructor { if(inspect_node) { tool = inspect_node.getTool(); if(tool) drawNodeTools(pFOCUS, tool); - } else { + } else tool_current = noone; - } if(do_fullView) { do_fullView = false; diff --git a/scripts/surface_functions/surface_functions.gml b/scripts/surface_functions/surface_functions.gml index 89acc31cf..f3711ea2b 100644 --- a/scripts/surface_functions/surface_functions.gml +++ b/scripts/surface_functions/surface_functions.gml @@ -493,4 +493,11 @@ function surface_get_size(surface) { var sh = surface_get_height(surface); var sz = sw * sh * surface_format_get_bytes(surface_get_format(surface)); return sz; +} + +function surface_texture(surface) { + gml_pragma("forceinline"); + + if(!is_surface(surface)) return -1; + return surface_get_texture(surface); } \ No newline at end of file diff --git a/shaders/sh_d3d_default/sh_d3d_default.fsh b/shaders/sh_d3d_default/sh_d3d_default.fsh index bb15c8db9..29c4b5187 100644 --- a/shaders/sh_d3d_default/sh_d3d_default.fsh +++ b/shaders/sh_d3d_default/sh_d3d_default.fsh @@ -27,7 +27,6 @@ varying vec3 v_worldPosition; void main() { vec4 final_color = texture2D( gm_BaseTexture, v_vTexcoord ); final_color *= v_vColour; - gl_FragColor = vec4(0.); #region ++++ light ++++ vec3 light_effect = light_ambient.rgb; diff --git a/shaders/sh_d3d_grid_view/sh_d3d_grid_view.fsh b/shaders/sh_d3d_grid_view/sh_d3d_grid_view.fsh index 86cf955ae..c47999ae1 100644 --- a/shaders/sh_d3d_grid_view/sh_d3d_grid_view.fsh +++ b/shaders/sh_d3d_grid_view/sh_d3d_grid_view.fsh @@ -11,6 +11,8 @@ varying vec3 v_worldPosition; uniform float scale; uniform vec2 shift; +uniform float axisBlend; + vec4 grid(vec2 pos, float scale) { vec2 coord = pos * scale; // use the scale variable to set the distance between the lines vec2 derivative = fwidth(coord); @@ -21,10 +23,10 @@ vec4 grid(vec2 pos, float scale) { vec4 color = vec4(.3, .3, .3, 1. - min(line, 1.)); // y axis if(pos.x > -1. * minimumx / scale && pos.x < 1. * minimumx / scale) - color.y = 1.; + color.y = 0.3 + axisBlend * 0.7; // x axis if(pos.y > -1. * minimumy / scale && pos.y < 1. * minimumy / scale) - color.x = 1.; + color.x = 0.3 + axisBlend * 0.7; return color; } diff --git a/shaders/sh_d3d_normal/sh_d3d_normal.fsh b/shaders/sh_d3d_normal/sh_d3d_normal.fsh new file mode 100644 index 000000000..ce663e69a --- /dev/null +++ b/shaders/sh_d3d_normal/sh_d3d_normal.fsh @@ -0,0 +1,8 @@ +// +// Simple passthrough fragment shader +// +varying vec2 v_vTexcoord; + +void main() { + gl_FragColor = texture2D( gm_BaseTexture, v_vTexcoord ); +} diff --git a/shaders/sh_d3d_normal/sh_d3d_normal.vsh b/shaders/sh_d3d_normal/sh_d3d_normal.vsh new file mode 100644 index 000000000..db458f45a --- /dev/null +++ b/shaders/sh_d3d_normal/sh_d3d_normal.vsh @@ -0,0 +1,15 @@ +// +// Simple passthrough vertex shader +// +attribute vec3 in_Position; // (x,y,z) +attribute vec3 in_Normal; // (x,y,z) unused in this shader. +//attribute vec4 in_Colour; // (r,g,b,a) +attribute vec2 in_TextureCoord; // (u,v) + +varying vec2 v_vTexcoord; + +void main() { + vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0); + gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos; + v_vTexcoord = in_TextureCoord; +} diff --git a/shaders/sh_d3d_normal/sh_d3d_normal.yy b/shaders/sh_d3d_normal/sh_d3d_normal.yy new file mode 100644 index 000000000..3b3d692da --- /dev/null +++ b/shaders/sh_d3d_normal/sh_d3d_normal.yy @@ -0,0 +1,10 @@ +{ + "resourceType": "GMShader", + "resourceVersion": "1.0", + "name": "sh_d3d_normal", + "parent": { + "name": "3d", + "path": "folders/shader/3d.yy", + }, + "type": 1, +} \ No newline at end of file