[Armature] Add basic bone constrains.
|
@ -219,7 +219,6 @@
|
|||
{"name":"gameframe","order":1,"path":"folders/sprites/gameframe.yy",},
|
||||
{"name":"misc","order":2,"path":"folders/sprites/misc.yy",},
|
||||
{"name":"nodes","order":3,"path":"folders/sprites/nodes.yy",},
|
||||
{"name":"junctions","order":30,"path":"folders/sprites/nodes/junctions.yy",},
|
||||
{"name":"profiler","order":5,"path":"folders/sprites/profiler.yy",},
|
||||
{"name":"texture","order":4,"path":"folders/sprites/texture.yy",},
|
||||
{"name":"theme","order":6,"path":"folders/sprites/theme.yy",},
|
||||
|
@ -356,7 +355,14 @@
|
|||
{"name":"__3D","order":6,"path":"scripts/__3D/__3D.yy",},
|
||||
{"name":"__add_node_item","order":12,"path":"scripts/__add_node_item/__add_node_item.yy",},
|
||||
{"name":"__bbox","order":5,"path":"scripts/__bbox/__bbox.yy",},
|
||||
{"name":"__bone","order":2,"path":"scripts/__bone/__bone.yy",},
|
||||
{"name":"__bone_constain_look_at","order":6,"path":"scripts/__bone_constain_look_at/__bone_constain_look_at.yy",},
|
||||
{"name":"__bone_constrain_copy_position","order":2,"path":"scripts/__bone_constrain_copy_position/__bone_constrain_copy_position.yy",},
|
||||
{"name":"__bone_constrain_copy_rotation","order":3,"path":"scripts/__bone_constrain_copy_rotation/__bone_constrain_copy_rotation.yy",},
|
||||
{"name":"__bone_constrain_copy_scale","order":4,"path":"scripts/__bone_constrain_copy_scale/__bone_constrain_copy_scale.yy",},
|
||||
{"name":"__bone_constrain_limit_rotation","order":8,"path":"scripts/__bone_constrain_limit_rotation/__bone_constrain_limit_rotation.yy",},
|
||||
{"name":"__bone_constrain_move_to","order":6,"path":"scripts/__bone_constrain_move_to/__bone_constrain_move_to.yy",},
|
||||
{"name":"__bone_constrain_stretch_to","order":7,"path":"scripts/__bone_constrain_stretch_to/__bone_constrain_stretch_to.yy",},
|
||||
{"name":"__bone_constrain","order":2,"path":"scripts/__bone_constrain/__bone_constrain.yy",},
|
||||
{"name":"__canvas_brush","order":2,"path":"scripts/__canvas_brush/__canvas_brush.yy",},
|
||||
{"name":"__canvas_tool_shader","order":4,"path":"scripts/__canvas_tool_shader/__canvas_tool_shader.yy",},
|
||||
{"name":"__canvas_tool","order":1,"path":"scripts/__canvas_tool/__canvas_tool.yy",},
|
||||
|
@ -671,11 +677,12 @@
|
|||
{"name":"node_application_out","order":17,"path":"scripts/node_application_out/node_application_out.yy",},
|
||||
{"name":"node_area","order":15,"path":"scripts/node_area/node_area.yy",},
|
||||
{"name":"node_argument","order":22,"path":"scripts/node_argument/node_argument.yy",},
|
||||
{"name":"node_armature_bind","order":1,"path":"scripts/node_armature_bind/node_armature_bind.yy",},
|
||||
{"name":"node_armature_mesh_rig","order":6,"path":"scripts/node_armature_mesh_rig/node_armature_mesh_rig.yy",},
|
||||
{"name":"node_armature_path","order":4,"path":"scripts/node_armature_path/node_armature_path.yy",},
|
||||
{"name":"node_armature_pose","order":3,"path":"scripts/node_armature_pose/node_armature_pose.yy",},
|
||||
{"name":"node_armature_sample","order":5,"path":"scripts/node_armature_sample/node_armature_sample.yy",},
|
||||
{"name":"node_armature_bind","order":11,"path":"scripts/node_armature_bind/node_armature_bind.yy",},
|
||||
{"name":"node_armature_mesh_rig","order":15,"path":"scripts/node_armature_mesh_rig/node_armature_mesh_rig.yy",},
|
||||
{"name":"node_armature_path","order":13,"path":"scripts/node_armature_path/node_armature_path.yy",},
|
||||
{"name":"node_armature_pose","order":12,"path":"scripts/node_armature_pose/node_armature_pose.yy",},
|
||||
{"name":"node_armature_sample","order":14,"path":"scripts/node_armature_sample/node_armature_sample.yy",},
|
||||
{"name":"node_armature","order":10,"path":"scripts/node_armature/node_armature.yy",},
|
||||
{"name":"node_array_add","order":6,"path":"scripts/node_array_add/node_array_add.yy",},
|
||||
{"name":"node_array_composite","order":17,"path":"scripts/node_array_composite/node_array_composite.yy",},
|
||||
{"name":"node_array_convolute","order":16,"path":"scripts/node_array_convolute/node_array_convolute.yy",},
|
||||
|
@ -1795,6 +1802,7 @@
|
|||
{"name":"s_biterator_tab_content","order":14,"path":"sprites/s_biterator_tab_content/s_biterator_tab_content.yy",},
|
||||
{"name":"s_biterator_tab_inactive","order":11,"path":"sprites/s_biterator_tab_inactive/s_biterator_tab_inactive.yy",},
|
||||
{"name":"s_biterator_toggler","order":13,"path":"sprites/s_biterator_toggler/s_biterator_toggler.yy",},
|
||||
{"name":"s_bone_constrain","order":33,"path":"sprites/s_bone_constrain/s_bone_constrain.yy",},
|
||||
{"name":"s_bone_IK","order":8,"path":"sprites/s_bone_IK/s_bone_IK.yy",},
|
||||
{"name":"s_bone_move","order":14,"path":"sprites/s_bone_move/s_bone_move.yy",},
|
||||
{"name":"s_bone_rotate","order":15,"path":"sprites/s_bone_rotate/s_bone_rotate.yy",},
|
||||
|
@ -2034,9 +2042,9 @@
|
|||
{"name":"s_new_line_shift","order":133,"path":"sprites/s_new_line_shift/s_new_line_shift.yy",},
|
||||
{"name":"s_new","order":132,"path":"sprites/s_new/s_new.yy",},
|
||||
{"name":"s_nightly","order":5,"path":"sprites/s_nightly/s_nightly.yy",},
|
||||
{"name":"s_node_2d_light_shape","order":12,"path":"sprites/s_node_2d_light_shape/s_node_2d_light_shape.yy",},
|
||||
{"name":"s_node_2d_light_shape","order":13,"path":"sprites/s_node_2d_light_shape/s_node_2d_light_shape.yy",},
|
||||
{"name":"s_node_2d_light","order":1,"path":"sprites/s_node_2d_light/s_node_2d_light.yy",},
|
||||
{"name":"s_node_3d_affector_shape","order":11,"path":"sprites/s_node_3d_affector_shape/s_node_3d_affector_shape.yy",},
|
||||
{"name":"s_node_3d_affector_shape","order":12,"path":"sprites/s_node_3d_affector_shape/s_node_3d_affector_shape.yy",},
|
||||
{"name":"s_node_3d_array","order":7,"path":"sprites/s_node_3d_array/s_node_3d_array.yy",},
|
||||
{"name":"s_node_3d_camera_set","order":24,"path":"sprites/s_node_3d_camera_set/s_node_3d_camera_set.yy",},
|
||||
{"name":"s_node_3d_camera","order":13,"path":"sprites/s_node_3d_camera/s_node_3d_camera.yy",},
|
||||
|
@ -2068,7 +2076,7 @@
|
|||
{"name":"s_node_3d_wall","order":36,"path":"sprites/s_node_3d_wall/s_node_3d_wall.yy",},
|
||||
{"name":"s_node_ace","order":61,"path":"sprites/s_node_ace/s_node_ace.yy",},
|
||||
{"name":"s_node_active_canvas","order":22,"path":"sprites/s_node_active_canvas/s_node_active_canvas.yy",},
|
||||
{"name":"s_node_alignment","order":3,"path":"sprites/s_node_alignment/s_node_alignment.yy",},
|
||||
{"name":"s_node_alignment","order":4,"path":"sprites/s_node_alignment/s_node_alignment.yy",},
|
||||
{"name":"s_node_alpha_cut","order":2,"path":"sprites/s_node_alpha_cut/s_node_alpha_cut.yy",},
|
||||
{"name":"s_node_alpha_grey","order":3,"path":"sprites/s_node_alpha_grey/s_node_alpha_grey.yy",},
|
||||
{"name":"s_node_animation_control","order":31,"path":"sprites/s_node_animation_control/s_node_animation_control.yy",},
|
||||
|
@ -2107,9 +2115,9 @@
|
|||
{"name":"s_node_atlas","order":4,"path":"sprites/s_node_atlas/s_node_atlas.yy",},
|
||||
{"name":"s_node_audio_trim","order":3,"path":"sprites/s_node_audio_trim/s_node_audio_trim.yy",},
|
||||
{"name":"s_node_audio_volume","order":5,"path":"sprites/s_node_audio_volume/s_node_audio_volume.yy",},
|
||||
{"name":"s_node_axis_type","order":15,"path":"sprites/s_node_axis_type/s_node_axis_type.yy",},
|
||||
{"name":"s_node_axis_type","order":16,"path":"sprites/s_node_axis_type/s_node_axis_type.yy",},
|
||||
{"name":"s_node_bar_graph","order":27,"path":"sprites/s_node_bar_graph/s_node_bar_graph.yy",},
|
||||
{"name":"s_node_bend_type","order":19,"path":"sprites/s_node_bend_type/s_node_bend_type.yy",},
|
||||
{"name":"s_node_bend_type","order":20,"path":"sprites/s_node_bend_type/s_node_bend_type.yy",},
|
||||
{"name":"s_node_bend","order":20,"path":"sprites/s_node_bend/s_node_bend.yy",},
|
||||
{"name":"s_node_bevel","order":5,"path":"sprites/s_node_bevel/s_node_bevel.yy",},
|
||||
{"name":"s_node_bg_glow","order":10,"path":"sprites/s_node_bg_glow/s_node_bg_glow.yy",},
|
||||
|
@ -2136,13 +2144,13 @@
|
|||
{"name":"s_node_byte_file_write","order":27,"path":"sprites/s_node_byte_file_write/s_node_byte_file_write.yy",},
|
||||
{"name":"s_node_cache_array","order":25,"path":"sprites/s_node_cache_array/s_node_cache_array.yy",},
|
||||
{"name":"s_node_cache","order":27,"path":"sprites/s_node_cache/s_node_cache.yy",},
|
||||
{"name":"s_node_camera_repeat","order":17,"path":"sprites/s_node_camera_repeat/s_node_camera_repeat.yy",},
|
||||
{"name":"s_node_camera_repeat","order":18,"path":"sprites/s_node_camera_repeat/s_node_camera_repeat.yy",},
|
||||
{"name":"s_node_camera","order":3,"path":"sprites/s_node_camera/s_node_camera.yy",},
|
||||
{"name":"s_node_canvas_group","order":39,"path":"sprites/s_node_canvas_group/s_node_canvas_group.yy",},
|
||||
{"name":"s_node_caustic","order":35,"path":"sprites/s_node_caustic/s_node_caustic.yy",},
|
||||
{"name":"s_node_chromatic_abarration","order":11,"path":"sprites/s_node_chromatic_abarration/s_node_chromatic_abarration.yy",},
|
||||
{"name":"s_node_color_adjust","order":1,"path":"sprites/s_node_color_adjust/s_node_color_adjust.yy",},
|
||||
{"name":"s_node_color_data_label","order":25,"path":"sprites/s_node_color_data_label/s_node_color_data_label.yy",},
|
||||
{"name":"s_node_color_data_label","order":26,"path":"sprites/s_node_color_data_label/s_node_color_data_label.yy",},
|
||||
{"name":"s_node_color_data","order":2,"path":"sprites/s_node_color_data/s_node_color_data.yy",},
|
||||
{"name":"s_node_color_from_hsv","order":3,"path":"sprites/s_node_color_from_hsv/s_node_color_from_hsv.yy",},
|
||||
{"name":"s_node_color_from_oklch","order":23,"path":"sprites/s_node_color_from_oklch/s_node_color_from_oklch.yy",},
|
||||
|
@ -2153,7 +2161,7 @@
|
|||
{"name":"s_node_color_replace","order":8,"path":"sprites/s_node_color_replace/s_node_color_replace.yy",},
|
||||
{"name":"s_node_colorize","order":12,"path":"sprites/s_node_colorize/s_node_colorize.yy",},
|
||||
{"name":"s_node_compose","order":1,"path":"sprites/s_node_compose/s_node_compose.yy",},
|
||||
{"name":"s_node_condition_type","order":7,"path":"sprites/s_node_condition_type/s_node_condition_type.yy",},
|
||||
{"name":"s_node_condition_type","order":8,"path":"sprites/s_node_condition_type/s_node_condition_type.yy",},
|
||||
{"name":"s_node_convolution","order":13,"path":"sprites/s_node_convolution/s_node_convolution.yy",},
|
||||
{"name":"s_node_coor_pin","order":1,"path":"sprites/s_node_coor_pin/s_node_coor_pin.yy",},
|
||||
{"name":"s_node_corner","order":14,"path":"sprites/s_node_corner/s_node_corner.yy",},
|
||||
|
@ -2169,7 +2177,7 @@
|
|||
{"name":"s_node_csv_parse","order":19,"path":"sprites/s_node_csv_parse/s_node_csv_parse.yy",},
|
||||
{"name":"s_node_curve_edit","order":15,"path":"sprites/s_node_curve_edit/s_node_curve_edit.yy",},
|
||||
{"name":"s_node_curve_hsv","order":63,"path":"sprites/s_node_curve_hsv/s_node_curve_hsv.yy",},
|
||||
{"name":"s_node_curve","order":18,"path":"sprites/s_node_curve/s_node_curve.yy",},
|
||||
{"name":"s_node_curve","order":19,"path":"sprites/s_node_curve/s_node_curve.yy",},
|
||||
{"name":"s_node_decorner","order":16,"path":"sprites/s_node_decorner/s_node_decorner.yy",},
|
||||
{"name":"s_node_delay","order":7,"path":"sprites/s_node_delay/s_node_delay.yy",},
|
||||
{"name":"s_node_deprecated_badge","order":4,"path":"sprites/s_node_deprecated_badge/s_node_deprecated_badge.yy",},
|
||||
|
@ -2194,7 +2202,7 @@
|
|||
{"name":"s_node_feedback","order":3,"path":"sprites/s_node_feedback/s_node_feedback.yy",},
|
||||
{"name":"s_node_FFT","order":5,"path":"sprites/s_node_FFT/s_node_FFT.yy",},
|
||||
{"name":"s_node_filter_array","order":28,"path":"sprites/s_node_filter_array/s_node_filter_array.yy",},
|
||||
{"name":"s_node_flip_render","order":9,"path":"sprites/s_node_flip_render/s_node_flip_render.yy",},
|
||||
{"name":"s_node_flip_render","order":10,"path":"sprites/s_node_flip_render/s_node_flip_render.yy",},
|
||||
{"name":"s_node_flip","order":12,"path":"sprites/s_node_flip/s_node_flip.yy",},
|
||||
{"name":"s_node_flood_fill","order":24,"path":"sprites/s_node_flood_fill/s_node_flood_fill.yy",},
|
||||
{"name":"s_node_flow_noise","order":48,"path":"sprites/s_node_flow_noise/s_node_flow_noise.yy",},
|
||||
|
@ -2230,7 +2238,7 @@
|
|||
{"name":"s_node_gradient_replace","order":12,"path":"sprites/s_node_gradient_replace/s_node_gradient_replace.yy",},
|
||||
{"name":"s_node_gradient_sample","order":22,"path":"sprites/s_node_gradient_sample/s_node_gradient_sample.yy",},
|
||||
{"name":"s_node_gradient_shift","order":13,"path":"sprites/s_node_gradient_shift/s_node_gradient_shift.yy",},
|
||||
{"name":"s_node_gradient_type","order":6,"path":"sprites/s_node_gradient_type/s_node_gradient_type.yy",},
|
||||
{"name":"s_node_gradient_type","order":7,"path":"sprites/s_node_gradient_type/s_node_gradient_type.yy",},
|
||||
{"name":"s_node_gradient","order":1,"path":"sprites/s_node_gradient/s_node_gradient.yy",},
|
||||
{"name":"s_node_grain","order":69,"path":"sprites/s_node_grain/s_node_grain.yy",},
|
||||
{"name":"s_node_grey_alpha","order":26,"path":"sprites/s_node_grey_alpha/s_node_grey_alpha.yy",},
|
||||
|
@ -2292,11 +2300,11 @@
|
|||
{"name":"s_node_level_selector","order":34,"path":"sprites/s_node_level_selector/s_node_level_selector.yy",},
|
||||
{"name":"s_node_level","order":33,"path":"sprites/s_node_level/s_node_level.yy",},
|
||||
{"name":"s_node_line","order":7,"path":"sprites/s_node_line/s_node_line.yy",},
|
||||
{"name":"s_node_liquefy_type","order":28,"path":"sprites/s_node_liquefy_type/s_node_liquefy_type.yy",},
|
||||
{"name":"s_node_liquefy_type","order":29,"path":"sprites/s_node_liquefy_type/s_node_liquefy_type.yy",},
|
||||
{"name":"s_node_liquefy","order":71,"path":"sprites/s_node_liquefy/s_node_liquefy.yy",},
|
||||
{"name":"s_node_local_analyze","order":35,"path":"sprites/s_node_local_analyze/s_node_local_analyze.yy",},
|
||||
{"name":"s_node_logic_opr","order":1,"path":"sprites/s_node_logic_opr/s_node_logic_opr.yy",},
|
||||
{"name":"s_node_logic","order":2,"path":"sprites/s_node_logic/s_node_logic.yy",},
|
||||
{"name":"s_node_logic","order":3,"path":"sprites/s_node_logic/s_node_logic.yy",},
|
||||
{"name":"s_node_loop_array","order":23,"path":"sprites/s_node_loop_array/s_node_loop_array.yy",},
|
||||
{"name":"s_node_loop_input","order":14,"path":"sprites/s_node_loop_input/s_node_loop_input.yy",},
|
||||
{"name":"s_node_loop_output","order":13,"path":"sprites/s_node_loop_output/s_node_loop_output.yy",},
|
||||
|
@ -2306,10 +2314,10 @@
|
|||
{"name":"s_node_lua_global","order":19,"path":"sprites/s_node_lua_global/s_node_lua_global.yy",},
|
||||
{"name":"s_node_lua_surface","order":18,"path":"sprites/s_node_lua_surface/s_node_lua_surface.yy",},
|
||||
{"name":"s_node_magnitude","order":18,"path":"sprites/s_node_magnitude/s_node_magnitude.yy",},
|
||||
{"name":"s_node_math_operators","order":29,"path":"sprites/s_node_math_operators/s_node_math_operators.yy",},
|
||||
{"name":"s_node_math_operators","order":30,"path":"sprites/s_node_math_operators/s_node_math_operators.yy",},
|
||||
{"name":"s_node_math","order":6,"path":"sprites/s_node_math/s_node_math.yy",},
|
||||
{"name":"s_node_mesh_transform","order":1,"path":"sprites/s_node_mesh_transform/s_node_mesh_transform.yy",},
|
||||
{"name":"s_node_mesh_type","order":13,"path":"sprites/s_node_mesh_type/s_node_mesh_type.yy",},
|
||||
{"name":"s_node_mesh_type","order":14,"path":"sprites/s_node_mesh_type/s_node_mesh_type.yy",},
|
||||
{"name":"s_node_midi","order":24,"path":"sprites/s_node_midi/s_node_midi.yy",},
|
||||
{"name":"s_node_mirror","order":3,"path":"sprites/s_node_mirror/s_node_mirror.yy",},
|
||||
{"name":"s_node_mk_ball_grid","order":3,"path":"sprites/s_node_mk_ball_grid/s_node_mk_ball_grid.yy",},
|
||||
|
@ -2321,8 +2329,8 @@
|
|||
{"name":"s_node_mk_flare","order":11,"path":"sprites/s_node_mk_flare/s_node_mk_flare.yy",},
|
||||
{"name":"s_node_mk_flip_grid","order":2,"path":"sprites/s_node_mk_flip_grid/s_node_mk_flip_grid.yy",},
|
||||
{"name":"s_node_mk_fracture","order":13,"path":"sprites/s_node_mk_fracture/s_node_mk_fracture.yy",},
|
||||
{"name":"s_node_mk_grid_flip","order":16,"path":"sprites/s_node_mk_grid_flip/s_node_mk_grid_flip.yy",},
|
||||
{"name":"s_node_mk_rain_type","order":5,"path":"sprites/s_node_mk_rain_type/s_node_mk_rain_type.yy",},
|
||||
{"name":"s_node_mk_grid_flip","order":17,"path":"sprites/s_node_mk_grid_flip/s_node_mk_grid_flip.yy",},
|
||||
{"name":"s_node_mk_rain_type","order":6,"path":"sprites/s_node_mk_rain_type/s_node_mk_rain_type.yy",},
|
||||
{"name":"s_node_mk_rain","order":4,"path":"sprites/s_node_mk_rain/s_node_mk_rain.yy",},
|
||||
{"name":"s_node_mk_saber","order":1,"path":"sprites/s_node_mk_saber/s_node_mk_saber.yy",},
|
||||
{"name":"s_node_mk_sparkle","order":7,"path":"sprites/s_node_mk_sparkle/s_node_mk_sparkle.yy",},
|
||||
|
@ -2338,7 +2346,7 @@
|
|||
{"name":"s_node_noise_perlin","order":11,"path":"sprites/s_node_noise_perlin/s_node_noise_perlin.yy",},
|
||||
{"name":"s_node_noise_simplex","order":20,"path":"sprites/s_node_noise_simplex/s_node_noise_simplex.yy",},
|
||||
{"name":"s_node_noise","order":8,"path":"sprites/s_node_noise/s_node_noise.yy",},
|
||||
{"name":"s_node_normal_light_type","order":27,"path":"sprites/s_node_normal_light_type/s_node_normal_light_type.yy",},
|
||||
{"name":"s_node_normal_light_type","order":28,"path":"sprites/s_node_normal_light_type/s_node_normal_light_type.yy",},
|
||||
{"name":"s_node_normal_light","order":38,"path":"sprites/s_node_normal_light/s_node_normal_light.yy",},
|
||||
{"name":"s_node_normal","order":37,"path":"sprites/s_node_normal/s_node_normal.yy",},
|
||||
{"name":"s_node_normalize","order":62,"path":"sprites/s_node_normalize/s_node_normalize.yy",},
|
||||
|
@ -2415,7 +2423,7 @@
|
|||
{"name":"s_node_pixel_math","order":70,"path":"sprites/s_node_pixel_math/s_node_pixel_math.yy",},
|
||||
{"name":"s_node_pixel_sampler","order":54,"path":"sprites/s_node_pixel_sampler/s_node_pixel_sampler.yy",},
|
||||
{"name":"s_node_pixel_sort","order":42,"path":"sprites/s_node_pixel_sort/s_node_pixel_sort.yy",},
|
||||
{"name":"s_node_plot_linear_type","order":8,"path":"sprites/s_node_plot_linear_type/s_node_plot_linear_type.yy",},
|
||||
{"name":"s_node_plot_linear_type","order":9,"path":"sprites/s_node_plot_linear_type/s_node_plot_linear_type.yy",},
|
||||
{"name":"s_node_point_in_area","order":1,"path":"sprites/s_node_point_in_area/s_node_point_in_area.yy",},
|
||||
{"name":"s_node_polar","order":5,"path":"sprites/s_node_polar/s_node_polar.yy",},
|
||||
{"name":"s_node_posterize","order":43,"path":"sprites/s_node_posterize/s_node_posterize.yy",},
|
||||
|
@ -2435,8 +2443,8 @@
|
|||
{"name":"s_node_regex_replace","order":10,"path":"sprites/s_node_regex_replace/s_node_regex_replace.yy",},
|
||||
{"name":"s_node_regex_search","order":11,"path":"sprites/s_node_regex_search/s_node_regex_search.yy",},
|
||||
{"name":"s_node_region_fill","order":29,"path":"sprites/s_node_region_fill/s_node_region_fill.yy",},
|
||||
{"name":"s_node_repeat_axis","order":14,"path":"sprites/s_node_repeat_axis/s_node_repeat_axis.yy",},
|
||||
{"name":"s_node_repeat_selection_types","order":26,"path":"sprites/s_node_repeat_selection_types/s_node_repeat_selection_types.yy",},
|
||||
{"name":"s_node_repeat_axis","order":15,"path":"sprites/s_node_repeat_axis/s_node_repeat_axis.yy",},
|
||||
{"name":"s_node_repeat_selection_types","order":27,"path":"sprites/s_node_repeat_selection_types/s_node_repeat_selection_types.yy",},
|
||||
{"name":"s_node_repeat_texture","order":55,"path":"sprites/s_node_repeat_texture/s_node_repeat_texture.yy",},
|
||||
{"name":"s_node_repeat","order":23,"path":"sprites/s_node_repeat/s_node_repeat.yy",},
|
||||
{"name":"s_node_replace_palette","order":45,"path":"sprites/s_node_replace_palette/s_node_replace_palette.yy",},
|
||||
|
@ -2472,17 +2480,18 @@
|
|||
{"name":"s_node_separate_file_path","order":14,"path":"sprites/s_node_separate_file_path/s_node_separate_file_path.yy",},
|
||||
{"name":"s_node_sepearte_shape","order":49,"path":"sprites/s_node_sepearte_shape/s_node_sepearte_shape.yy",},
|
||||
{"name":"s_node_shadow_cast","order":51,"path":"sprites/s_node_shadow_cast/s_node_shadow_cast.yy",},
|
||||
{"name":"s_node_shadow_type","order":1,"path":"sprites/s_node_shadow_type/s_node_shadow_type.yy",},
|
||||
{"name":"s_node_shadow_type","order":2,"path":"sprites/s_node_shadow_type/s_node_shadow_type.yy",},
|
||||
{"name":"s_node_shadow","order":50,"path":"sprites/s_node_shadow/s_node_shadow.yy",},
|
||||
{"name":"s_node_shape_3d","order":24,"path":"sprites/s_node_shape_3d/s_node_shape_3d.yy",},
|
||||
{"name":"s_node_shape_3d","order":25,"path":"sprites/s_node_shape_3d/s_node_shape_3d.yy",},
|
||||
{"name":"s_node_shape_blur","order":7,"path":"sprites/s_node_shape_blur/s_node_shape_blur.yy",},
|
||||
{"name":"s_node_shape_circle","order":22,"path":"sprites/s_node_shape_circle/s_node_shape_circle.yy",},
|
||||
{"name":"s_node_shape_leaf","order":23,"path":"sprites/s_node_shape_leaf/s_node_shape_leaf.yy",},
|
||||
{"name":"s_node_shape_circle","order":23,"path":"sprites/s_node_shape_circle/s_node_shape_circle.yy",},
|
||||
{"name":"s_node_shape_leaf","order":24,"path":"sprites/s_node_shape_leaf/s_node_shape_leaf.yy",},
|
||||
{"name":"s_node_shape_map","order":21,"path":"sprites/s_node_shape_map/s_node_shape_map.yy",},
|
||||
{"name":"s_node_shape_misc","order":4,"path":"sprites/s_node_shape_misc/s_node_shape_misc.yy",},
|
||||
{"name":"s_node_shape_poly_type","order":20,"path":"sprites/s_node_shape_poly_type/s_node_shape_poly_type.yy",},
|
||||
{"name":"s_node_shape_misc","order":5,"path":"sprites/s_node_shape_misc/s_node_shape_misc.yy",},
|
||||
{"name":"s_node_shape_poly_type","order":21,"path":"sprites/s_node_shape_poly_type/s_node_shape_poly_type.yy",},
|
||||
{"name":"s_node_shape_polygon","order":25,"path":"sprites/s_node_shape_polygon/s_node_shape_polygon.yy",},
|
||||
{"name":"s_node_shape_rectangle","order":21,"path":"sprites/s_node_shape_rectangle/s_node_shape_rectangle.yy",},
|
||||
{"name":"s_node_shape_rectangle","order":22,"path":"sprites/s_node_shape_rectangle/s_node_shape_rectangle.yy",},
|
||||
{"name":"s_node_shape_type","order":1,"path":"sprites/s_node_shape_type/s_node_shape_type.yy",},
|
||||
{"name":"s_node_shape","order":14,"path":"sprites/s_node_shape/s_node_shape.yy",},
|
||||
{"name":"s_node_shard","order":33,"path":"sprites/s_node_shard/s_node_shard.yy",},
|
||||
{"name":"s_node_shell_excecute","order":33,"path":"sprites/s_node_shell_excecute/s_node_shell_excecute.yy",},
|
||||
|
@ -2558,7 +2567,7 @@
|
|||
{"name":"s_node_transform","order":8,"path":"sprites/s_node_transform/s_node_transform.yy",},
|
||||
{"name":"s_node_translate_point","order":13,"path":"sprites/s_node_translate_point/s_node_translate_point.yy",},
|
||||
{"name":"s_node_trigger_bool","order":4,"path":"sprites/s_node_trigger_bool/s_node_trigger_bool.yy",},
|
||||
{"name":"s_node_trigger_cond","order":10,"path":"sprites/s_node_trigger_cond/s_node_trigger_cond.yy",},
|
||||
{"name":"s_node_trigger_cond","order":11,"path":"sprites/s_node_trigger_cond/s_node_trigger_cond.yy",},
|
||||
{"name":"s_node_trigger","order":2,"path":"sprites/s_node_trigger/s_node_trigger.yy",},
|
||||
{"name":"s_node_tunnel_in","order":21,"path":"sprites/s_node_tunnel_in/s_node_tunnel_in.yy",},
|
||||
{"name":"s_node_tunnel_out","order":22,"path":"sprites/s_node_tunnel_out/s_node_tunnel_out.yy",},
|
||||
|
|
|
@ -831,6 +831,14 @@
|
|||
{"id":{"name":"__3D","path":"scripts/__3D/__3D.yy",},},
|
||||
{"id":{"name":"__add_node_item","path":"scripts/__add_node_item/__add_node_item.yy",},},
|
||||
{"id":{"name":"__bbox","path":"scripts/__bbox/__bbox.yy",},},
|
||||
{"id":{"name":"__bone_constain_look_at","path":"scripts/__bone_constain_look_at/__bone_constain_look_at.yy",},},
|
||||
{"id":{"name":"__bone_constrain_copy_position","path":"scripts/__bone_constrain_copy_position/__bone_constrain_copy_position.yy",},},
|
||||
{"id":{"name":"__bone_constrain_copy_rotation","path":"scripts/__bone_constrain_copy_rotation/__bone_constrain_copy_rotation.yy",},},
|
||||
{"id":{"name":"__bone_constrain_copy_scale","path":"scripts/__bone_constrain_copy_scale/__bone_constrain_copy_scale.yy",},},
|
||||
{"id":{"name":"__bone_constrain_limit_rotation","path":"scripts/__bone_constrain_limit_rotation/__bone_constrain_limit_rotation.yy",},},
|
||||
{"id":{"name":"__bone_constrain_move_to","path":"scripts/__bone_constrain_move_to/__bone_constrain_move_to.yy",},},
|
||||
{"id":{"name":"__bone_constrain_stretch_to","path":"scripts/__bone_constrain_stretch_to/__bone_constrain_stretch_to.yy",},},
|
||||
{"id":{"name":"__bone_constrain","path":"scripts/__bone_constrain/__bone_constrain.yy",},},
|
||||
{"id":{"name":"__bone","path":"scripts/__bone/__bone.yy",},},
|
||||
{"id":{"name":"__canvas_brush","path":"scripts/__canvas_brush/__canvas_brush.yy",},},
|
||||
{"id":{"name":"__canvas_tool_shader","path":"scripts/__canvas_tool_shader/__canvas_tool_shader.yy",},},
|
||||
|
@ -2490,6 +2498,7 @@
|
|||
{"id":{"name":"s_biterator_tab_content","path":"sprites/s_biterator_tab_content/s_biterator_tab_content.yy",},},
|
||||
{"id":{"name":"s_biterator_tab_inactive","path":"sprites/s_biterator_tab_inactive/s_biterator_tab_inactive.yy",},},
|
||||
{"id":{"name":"s_biterator_toggler","path":"sprites/s_biterator_toggler/s_biterator_toggler.yy",},},
|
||||
{"id":{"name":"s_bone_constrain","path":"sprites/s_bone_constrain/s_bone_constrain.yy",},},
|
||||
{"id":{"name":"s_bone_IK","path":"sprites/s_bone_IK/s_bone_IK.yy",},},
|
||||
{"id":{"name":"s_bone_move","path":"sprites/s_bone_move/s_bone_move.yy",},},
|
||||
{"id":{"name":"s_bone_rotate","path":"sprites/s_bone_rotate/s_bone_rotate.yy",},},
|
||||
|
|
|
@ -209,9 +209,12 @@ DIALOG_WINCLEAR1
|
|||
|
||||
} else {
|
||||
if(_menuItem.spr != noone) {
|
||||
var spr = is_array(_menuItem.spr)? _menuItem.spr[0] : _menuItem.spr;
|
||||
var ind = is_array(_menuItem.spr)? _menuItem.spr[1] : 0;
|
||||
draw_sprite_ui(spr, ind, dialog_x + ui(24), yy + hght / 2, .8, .8, 0, COLORS._main_icon, _menuItem.active * 0.5 + 0.25);
|
||||
var spr = array_safe_get_fast(_menuItem.spr, 0, _menuItem.spr);
|
||||
var ind = array_safe_get_fast(_menuItem.spr, 1, 0);
|
||||
var sca = array_safe_get_fast(_menuItem.spr, 2, 0.8);
|
||||
var clr = array_safe_get_fast(_menuItem.spr, 3, COLORS._main_icon);
|
||||
|
||||
draw_sprite_ui(spr, ind, dialog_x + ui(24), yy + hght / 2, sca, sca, 0, clr, _menuItem.active * 0.5 + 0.25);
|
||||
}
|
||||
|
||||
if(_menuItem.toggle != noone) {
|
||||
|
|
|
@ -17,8 +17,6 @@ function __Bone(_parent = noone, _distance = 0, _direction = 0, _angle = 0, _len
|
|||
pose_local_rotate = 0; pose_apply_rotate = 0;
|
||||
pose_local_scale = 1; pose_apply_scale = 1;
|
||||
|
||||
angular_constrain = -1;
|
||||
|
||||
bone_head_init = new __vec2(); bone_head_pose = new __vec2();
|
||||
bone_tail_init = new __vec2(); bone_tail_pose = new __vec2();
|
||||
|
||||
|
@ -39,6 +37,8 @@ function __Bone(_parent = noone, _distance = 0, _direction = 0, _angle = 0, _len
|
|||
IKTargetID = "";
|
||||
IKTarget = noone;
|
||||
|
||||
constrains = [];
|
||||
|
||||
freeze_data = {};
|
||||
|
||||
control_x0 = 0; control_y0 = 0; control_i0 = 0;
|
||||
|
@ -52,6 +52,8 @@ function __Bone(_parent = noone, _distance = 0, _direction = 0, _angle = 0, _len
|
|||
array_foreach(childs, function(c) /*=>*/ {return c.freeze()});
|
||||
}
|
||||
|
||||
////- Find
|
||||
|
||||
static findBone = function(_id) {
|
||||
if(ID == _id) return self;
|
||||
|
||||
|
@ -75,6 +77,8 @@ function __Bone(_parent = noone, _distance = 0, _direction = 0, _angle = 0, _len
|
|||
return noone;
|
||||
}
|
||||
|
||||
////- Get position
|
||||
|
||||
static getHead = function(pose = true) { return pose? bone_head_pose.clone() : bone_head_init.clone(); }
|
||||
static getTail = function(pose = true) { return pose? bone_tail_pose.clone() : bone_tail_init.clone(); }
|
||||
|
||||
|
@ -114,6 +118,8 @@ function __Bone(_parent = noone, _distance = 0, _direction = 0, _angle = 0, _len
|
|||
.addElement(_lx, _ly);
|
||||
}
|
||||
|
||||
////- Draw
|
||||
|
||||
static draw = function(attributes, edit = false, _x = 0, _y = 0, _s = 1, _mx = 0, _my = 0, _hover = noone, _select = noone, _blend = c_white, _alpha = 1) {
|
||||
setControl(_x, _y, _s);
|
||||
|
||||
|
@ -126,7 +132,10 @@ function __Bone(_parent = noone, _distance = 0, _direction = 0, _angle = 0, _len
|
|||
|
||||
for( var i = 0, n = array_length(childs); i < n; i++ ) {
|
||||
h = childs[i].draw(attributes, edit, _x, _y, _s, _mx, _my, _hover, _select, _blend, _alpha);
|
||||
if(h != noone && (hover == noone || IKlength)) hover = h;
|
||||
if(h == noone) continue;
|
||||
|
||||
if(hover == noone || IKlength) hover = h;
|
||||
if(h[1] != 2) hover = h;
|
||||
}
|
||||
|
||||
return hover;
|
||||
|
@ -154,26 +163,6 @@ function __Bone(_parent = noone, _distance = 0, _direction = 0, _angle = 0, _len
|
|||
}
|
||||
|
||||
if(IKlength == 0) {
|
||||
if(angular_constrain != -1) {
|
||||
var _a0 = angle - angular_constrain;
|
||||
var _a1 = angle + angular_constrain;
|
||||
var ox, oy, nx, ny;
|
||||
|
||||
for( var i = 0; i <= 32; i++ ) {
|
||||
var _t = lerp(_a0, _a1, i / 32);
|
||||
|
||||
nx = p0x + lengthdir_x(32 * _s, _t);
|
||||
ny = p0y + lengthdir_y(32 * _s, _t);
|
||||
|
||||
if(i == 0) draw_line(p0x, p0y, nx, ny);
|
||||
if(i == 32) draw_line(p0x, p0y, nx, ny);
|
||||
if(i) draw_line(ox, oy, nx, ny);
|
||||
|
||||
ox = nx;
|
||||
oy = ny;
|
||||
}
|
||||
}
|
||||
|
||||
if(pose_rotate != 0) {
|
||||
var nx = p0x + lengthdir_x(16, angle + pose_rotate);
|
||||
var ny = p0y + lengthdir_y(16, angle + pose_rotate);
|
||||
|
@ -326,6 +315,8 @@ function __Bone(_parent = noone, _distance = 0, _direction = 0, _angle = 0, _len
|
|||
childs[i].drawControl(attributes);
|
||||
}
|
||||
|
||||
////- Pose
|
||||
|
||||
static resetPose = function() {
|
||||
pose_distance = distance;
|
||||
pose_direction = direction;
|
||||
|
@ -367,9 +358,12 @@ function __Bone(_parent = noone, _distance = 0, _direction = 0, _angle = 0, _len
|
|||
}
|
||||
|
||||
static setPose = function(_ik = true) {
|
||||
__c_bone = self;
|
||||
|
||||
setPosition();
|
||||
setPoseTransform();
|
||||
if(_ik) { setPosition(); setIKconstrain(); }
|
||||
array_foreach(constrains, function(c) /*=>*/ {return c.constrain(__c_bone)});
|
||||
setPosition();
|
||||
|
||||
return self;
|
||||
|
@ -408,6 +402,8 @@ function __Bone(_parent = noone, _distance = 0, _direction = 0, _angle = 0, _len
|
|||
array_foreach(childs, function(c) /*=>*/ {return c.setPoseTransform()});
|
||||
}
|
||||
|
||||
////- IK
|
||||
|
||||
static setIKconstrain = function() {
|
||||
if(IKlength > 0 && IKTarget != noone) {
|
||||
var points = array_create(IKlength + 1);
|
||||
|
@ -519,8 +515,6 @@ function __Bone(_parent = noone, _distance = 0, _direction = 0, _angle = 0, _len
|
|||
var len = lengths[i];
|
||||
var dir = point_direction(tx, ty, p1.x, p1.y);
|
||||
|
||||
// if(_b.angular_constrain != -1) dir = clamp(dir, _b.angle - _b.angular_constrain, _b.angle + _b.angular_constrain);
|
||||
|
||||
p0.x = tx;
|
||||
p0.y = ty;
|
||||
|
||||
|
@ -569,6 +563,8 @@ function __Bone(_parent = noone, _distance = 0, _direction = 0, _angle = 0, _len
|
|||
return _bbox;
|
||||
}
|
||||
|
||||
////- Serialize
|
||||
|
||||
static serialize = function() {
|
||||
var bone = {};
|
||||
|
||||
|
@ -588,7 +584,7 @@ function __Bone(_parent = noone, _distance = 0, _direction = 0, _angle = 0, _len
|
|||
bone.apply_rotation = apply_rotation;
|
||||
bone.apply_scale = apply_scale;
|
||||
|
||||
bone.angular_constrain = angular_constrain;
|
||||
bone.constrains = array_map(constrains, function(c) /*=>*/ {return c.serialize()});
|
||||
|
||||
bone.childs = [];
|
||||
for( var i = 0, n = array_length(childs); i < n; i++ )
|
||||
|
@ -616,8 +612,10 @@ function __Bone(_parent = noone, _distance = 0, _direction = 0, _angle = 0, _len
|
|||
apply_rotation = bone.apply_rotation;
|
||||
apply_scale = bone.apply_scale;
|
||||
|
||||
angular_constrain = struct_try_get(bone, "angular_constrain", -1);
|
||||
angular_constrain = -1;
|
||||
if(struct_has(bone, "constrains")) {
|
||||
__b = self;
|
||||
constrains = array_filter(array_map(bone.constrains, function(c) /*=>*/ {return new __Bone_Constrain(__b).deserialize(c)}), function(c) /*=>*/ {return c != noone});
|
||||
}
|
||||
|
||||
childs = [];
|
||||
for( var i = 0, n = array_length(bone.childs); i < n; i++ )
|
||||
|
@ -655,14 +653,19 @@ function __Bone(_parent = noone, _distance = 0, _direction = 0, _angle = 0, _len
|
|||
|
||||
_b.apply_rotation = apply_rotation;
|
||||
_b.apply_scale = apply_scale;
|
||||
_b.angular_constrain = angular_constrain;
|
||||
|
||||
|
||||
for( var i = 0, n = array_length(childs); i < n; i++ )
|
||||
_b.addChild(childs[i].clone());
|
||||
|
||||
__b = _b;
|
||||
_b.constrains = array_map(constrains, function(c) /*=>*/ {return new __Bone_Constrain(__b).deserialize(c.serialize())});
|
||||
|
||||
return _b;
|
||||
}
|
||||
|
||||
////- Actions
|
||||
|
||||
static toString = function() { return $"Bone {name} [{ID}] : [{direction}, {distance}] / [{angle}, {length}]"; }
|
||||
|
||||
static toArray = function(arr = []) {
|
||||
|
|
112
scripts/__bone_constain_look_at/__bone_constain_look_at.gml
Normal file
|
@ -0,0 +1,112 @@
|
|||
function __Bone_Constrain_Look_At(_bone, _bid = "", _tid = "") : __Bone_Constrain(_bone) constructor {
|
||||
name = "Look at";
|
||||
sindex = 3;
|
||||
bone_id = _bid;
|
||||
target_id = _tid;
|
||||
strength = 1;
|
||||
|
||||
bone_object = noone;
|
||||
target_object = noone;
|
||||
|
||||
tb_strength = new textBox(TEXTBOX_INPUT.number, function(v) /*=>*/ { strength = clamp(v, 0, 1); node.triggerRender(); });
|
||||
tb_strength.font = f_p2;
|
||||
tb_strength.label = "Strength";
|
||||
|
||||
static init = function() {
|
||||
if(!is(bone, __Bone)) return;
|
||||
|
||||
bone_object = bone_id == ""? noone : bone.findBone(bone_id);
|
||||
target_object = target_id == ""? noone : bone.findBone(target_id);
|
||||
}
|
||||
|
||||
static constrain = function(_b) {
|
||||
var _bone = bone_id == ""? noone : _b.findBone(bone_id);
|
||||
var _target = target_id == ""? noone : _b.findBone(target_id);
|
||||
if(_bone == noone || _target == noone) return;
|
||||
|
||||
var _fr = _bone.getHead();
|
||||
var _to = _target.getHead();
|
||||
|
||||
var _dr = point_direction(_fr.x, _fr.y, _to.x, _to.y);
|
||||
_bone.pose_angle = lerp_angle(_bone.pose_angle, _dr, strength);
|
||||
}
|
||||
|
||||
static draw_inspector = function(_x, _y, _w, _m, _hover, _focus, _drawParam) {
|
||||
var wh = 0;
|
||||
|
||||
// draw bones
|
||||
var _wdx = _x + ui(8);
|
||||
var _wdw = (_w - ui(16 + 4)) / 2;
|
||||
var _wdh = ui(24);
|
||||
draw_sprite_stretched_ext(THEME.textbox, 3, _wdx, _y, _wdw, _wdh, c_white, 1);
|
||||
draw_sprite_stretched_ext(THEME.textbox, 3, _wdx + _wdw + ui(4), _y, _wdw, _wdh, c_white, 1);
|
||||
|
||||
if(bone_object != noone) {
|
||||
var _bname = bone_object.name;
|
||||
|
||||
draw_sprite_ext(THEME.bone, 1, _wdx + ui(16), _y + _wdh / 2, 1, 1, 0, COLORS._main_icon, 1);
|
||||
draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text);
|
||||
draw_text_add(_wdx + ui(32), _y + _wdh / 2, _bname);
|
||||
|
||||
} else
|
||||
draw_sprite_ext(THEME.bone, 1, _wdx + ui(16), _y + _wdh / 2, 1, 1, 0, COLORS._main_icon, .5);
|
||||
|
||||
if(target_object != noone) {
|
||||
var _bname = target_object.name;
|
||||
|
||||
draw_sprite_ext(THEME.bone, 1, _wdx + _wdw + ui(4) + ui(16), _y + _wdh / 2, 1, 1, 0, COLORS._main_icon, 1);
|
||||
draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text);
|
||||
draw_text_add(_wdx + _wdw + ui(4) + ui(32), _y + _wdh / 2, _bname);
|
||||
|
||||
} else
|
||||
draw_sprite_ext(THEME.bone, 1, _wdx + _wdw + ui(4) + ui(16), _y + _wdh / 2, 1, 1, 0, COLORS._main_icon, .5);
|
||||
|
||||
if(_hover && point_in_rectangle(_m[0], _m[1], _wdx, _y, _wdx + _wdw, _y + _wdh)) {
|
||||
draw_sprite_stretched_ext(THEME.textbox, 1, _wdx, _y, _wdw, _wdh, c_white, 1);
|
||||
if(mouse_click(mb_left, _focus))
|
||||
menuCall(, array_map(_drawParam.bone_array, function(b) /*=>*/ {return new MenuItem(b.name, function(p) /*=>*/ { bone_id = p.bone.ID; init(); node.triggerRender(); }).setParam({ bone: b })}) );
|
||||
}
|
||||
|
||||
if(_hover && point_in_rectangle(_m[0], _m[1], _wdx + _wdw + ui(4), _y, _wdx + _wdw + ui(4) + _wdw, _y + _wdh)) {
|
||||
draw_sprite_stretched_ext(THEME.textbox, 1, _wdx + _wdw + ui(4), _y, _wdw, _wdh, c_white, 1);
|
||||
if(mouse_click(mb_left, _focus))
|
||||
menuCall(, array_map(_drawParam.bone_array, function(b) /*=>*/ {return new MenuItem(b.name, function(p) /*=>*/ { target_id = p.bone.ID; init(); node.triggerRender(); }).setParam({ bone: b })}) );
|
||||
}
|
||||
|
||||
_y += _wdh + ui(4);
|
||||
wh += _wdh + ui(4);
|
||||
|
||||
// draw widget
|
||||
var _wdx = _x + ui(8);
|
||||
var _wdw = _w - ui(16);
|
||||
var _wdh = ui(24);
|
||||
|
||||
tb_strength.rx = _drawParam.rx;
|
||||
tb_strength.ry = _drawParam.ry;
|
||||
tb_strength.setFocusHover(_focus, _hover);
|
||||
tb_strength.draw(_wdx, _y, _wdw, _wdh, strength, _m);
|
||||
|
||||
_y += _wdh + ui(8);
|
||||
wh += _wdh + ui(8);
|
||||
|
||||
return wh;
|
||||
}
|
||||
|
||||
static serialize = function() {
|
||||
var _map = {};
|
||||
_map.type = "Look At";
|
||||
_map.bone_id = bone_id;
|
||||
_map.target_id = target_id;
|
||||
_map.strength = strength;
|
||||
|
||||
return _map;
|
||||
}
|
||||
|
||||
static deserialize = function(_map) {
|
||||
bone_id = _map.bone_id;
|
||||
target_id = _map.target_id;
|
||||
strength = _map.strength;
|
||||
|
||||
return self;
|
||||
}
|
||||
}
|
14
scripts/__bone_constain_look_at/__bone_constain_look_at.yy
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"$GMScript":"v1",
|
||||
"%Name":"__bone_constain_look_at",
|
||||
"isCompatibility":false,
|
||||
"isDnD":false,
|
||||
"name":"__bone_constain_look_at",
|
||||
"parent":{
|
||||
"name":"armature",
|
||||
"path":"folders/nodes/data/compose/armature.yy",
|
||||
},
|
||||
"resourceType":"GMScript",
|
||||
"resourceVersion":"2.0",
|
||||
"tags":[],
|
||||
}
|
29
scripts/__bone_constrain/__bone_constrain.gml
Normal file
|
@ -0,0 +1,29 @@
|
|||
function __Bone_Constrain(_bone) constructor {
|
||||
name = "Constrain";
|
||||
bone = _bone;
|
||||
draw_height = 0;
|
||||
node = noone;
|
||||
|
||||
static init = function() {}
|
||||
static constrain = function() {}
|
||||
|
||||
static draw_inspector = function(_x, _y, _w, _m, _hover, _focus, _drawParam) { return 0; }
|
||||
|
||||
static build = function(type, _bid = "") {
|
||||
switch(type) {
|
||||
case "Copy Position" : return new __Bone_Constrain_Copy_Position(bone, _bid);
|
||||
case "Copy Rotation" : return new __Bone_Constrain_Copy_Rotation(bone, _bid);
|
||||
case "Copy Scale" : return new __Bone_Constrain_Copy_Scale(bone, _bid);
|
||||
|
||||
case "Look At" : return new __Bone_Constrain_Look_At(bone, _bid);
|
||||
case "Move To" : return new __Bone_Constrain_Move_To(bone, _bid);
|
||||
case "Stretch To" : return new __Bone_Constrain_Stretch_To(bone, _bid);
|
||||
|
||||
case "Limit Rotation" : return new __Bone_Constrain_Limit_Rotation(bone, _bid);
|
||||
}
|
||||
return noone;
|
||||
}
|
||||
|
||||
static serialize = function() { return {}; }
|
||||
static deserialize = function(_map) { var c = build(_map.type); return c == noone? c : c.deserialize(_map); }
|
||||
}
|
14
scripts/__bone_constrain/__bone_constrain.yy
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"$GMScript":"v1",
|
||||
"%Name":"__bone_constrain",
|
||||
"isCompatibility":false,
|
||||
"isDnD":false,
|
||||
"name":"__bone_constrain",
|
||||
"parent":{
|
||||
"name":"armature",
|
||||
"path":"folders/nodes/data/compose/armature.yy",
|
||||
},
|
||||
"resourceType":"GMScript",
|
||||
"resourceVersion":"2.0",
|
||||
"tags":[],
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
function __Bone_Constrain_Copy_Position(_bone, _bid = "", _tid = "") : __Bone_Constrain(_bone) constructor {
|
||||
name = "Copy Position";
|
||||
sindex = 0;
|
||||
bone_id = _bid;
|
||||
target_id = _tid;
|
||||
strength = 1;
|
||||
|
||||
bone_object = noone;
|
||||
target_object = noone;
|
||||
|
||||
tb_strength = new textBox(TEXTBOX_INPUT.number, function(v) /*=>*/ { strength = clamp(v, 0, 1); node.triggerRender(); });
|
||||
tb_strength.font = f_p2;
|
||||
tb_strength.label = "Strength";
|
||||
|
||||
static init = function() {
|
||||
if(!is(bone, __Bone)) return;
|
||||
|
||||
bone_object = bone_id == ""? noone : bone.findBone(bone_id);
|
||||
target_object = target_id == ""? noone : bone.findBone(target_id);
|
||||
}
|
||||
|
||||
static constrain = function(_b) {
|
||||
var _bone = bone_id == ""? noone : _b.findBone(bone_id);
|
||||
var _target = target_id == ""? noone : _b.findBone(target_id);
|
||||
if(_bone == noone || _target == noone) return;
|
||||
|
||||
var _fr = _bone.getHead();
|
||||
var _to = _target.getHead();
|
||||
|
||||
var _dr = point_direction(_fr.x, _fr.y, _to.x, _to.y);
|
||||
var _ds = point_distance(_fr.x, _fr.y, _to.x, _to.y);
|
||||
|
||||
var _x = lerp(_fr.x, _to.x, strength);
|
||||
var _y = lerp(_fr.y, _to.y, strength);
|
||||
|
||||
_bone.pose_direction = point_direction(0, 0, _x, _y);
|
||||
_bone.pose_distance = point_distance(0, 0, _x, _y);
|
||||
}
|
||||
|
||||
static draw_inspector = function(_x, _y, _w, _m, _hover, _focus, _drawParam) {
|
||||
var wh = 0;
|
||||
|
||||
// draw bones
|
||||
var _wdx = _x + ui(8);
|
||||
var _wdw = (_w - ui(16 + 4)) / 2;
|
||||
var _wdh = ui(24);
|
||||
draw_sprite_stretched_ext(THEME.textbox, 3, _wdx, _y, _wdw, _wdh, c_white, 1);
|
||||
draw_sprite_stretched_ext(THEME.textbox, 3, _wdx + _wdw + ui(4), _y, _wdw, _wdh, c_white, 1);
|
||||
|
||||
if(bone_object != noone) {
|
||||
var _bname = bone_object.name;
|
||||
|
||||
draw_sprite_ext(THEME.bone, 1, _wdx + ui(16), _y + _wdh / 2, 1, 1, 0, COLORS._main_icon, 1);
|
||||
draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text);
|
||||
draw_text_add(_wdx + ui(32), _y + _wdh / 2, _bname);
|
||||
|
||||
} else
|
||||
draw_sprite_ext(THEME.bone, 1, _wdx + ui(16), _y + _wdh / 2, 1, 1, 0, COLORS._main_icon, .5);
|
||||
|
||||
if(target_object != noone) {
|
||||
var _bname = target_object.name;
|
||||
|
||||
draw_sprite_ext(THEME.bone, 1, _wdx + _wdw + ui(4) + ui(16), _y + _wdh / 2, 1, 1, 0, COLORS._main_icon, 1);
|
||||
draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text);
|
||||
draw_text_add(_wdx + _wdw + ui(4) + ui(32), _y + _wdh / 2, _bname);
|
||||
|
||||
} else
|
||||
draw_sprite_ext(THEME.bone, 1, _wdx + _wdw + ui(4) + ui(16), _y + _wdh / 2, 1, 1, 0, COLORS._main_icon, .5);
|
||||
|
||||
if(_hover && point_in_rectangle(_m[0], _m[1], _wdx, _y, _wdx + _wdw, _y + _wdh)) {
|
||||
draw_sprite_stretched_ext(THEME.textbox, 1, _wdx, _y, _wdw, _wdh, c_white, 1);
|
||||
if(mouse_click(mb_left, _focus))
|
||||
menuCall(, array_map(_drawParam.bone_array, function(b) /*=>*/ {return new MenuItem(b.name, function(p) /*=>*/ { bone_id = p.bone.ID; init(); node.triggerRender(); }).setParam({ bone: b })}) );
|
||||
}
|
||||
|
||||
if(_hover && point_in_rectangle(_m[0], _m[1], _wdx + _wdw + ui(4), _y, _wdx + _wdw + ui(4) + _wdw, _y + _wdh)) {
|
||||
draw_sprite_stretched_ext(THEME.textbox, 1, _wdx + _wdw + ui(4), _y, _wdw, _wdh, c_white, 1);
|
||||
if(mouse_click(mb_left, _focus))
|
||||
menuCall(, array_map(_drawParam.bone_array, function(b) /*=>*/ {return new MenuItem(b.name, function(p) /*=>*/ { target_id = p.bone.ID; init(); node.triggerRender(); }).setParam({ bone: b })}) );
|
||||
}
|
||||
|
||||
_y += _wdh + ui(4);
|
||||
wh += _wdh + ui(4);
|
||||
|
||||
// draw widget
|
||||
var _wdx = _x + ui(8);
|
||||
var _wdw = _w - ui(16);
|
||||
var _wdh = ui(24);
|
||||
|
||||
tb_strength.rx = _drawParam.rx;
|
||||
tb_strength.ry = _drawParam.ry;
|
||||
tb_strength.setFocusHover(_focus, _hover);
|
||||
tb_strength.draw(_wdx, _y, _wdw, _wdh, strength, _m);
|
||||
|
||||
_y += _wdh + ui(8);
|
||||
wh += _wdh + ui(8);
|
||||
|
||||
return wh;
|
||||
}
|
||||
|
||||
static serialize = function() {
|
||||
var _map = {};
|
||||
_map.type = "Copy Position";
|
||||
_map.bone_id = bone_id;
|
||||
_map.target_id = target_id;
|
||||
_map.strength = strength;
|
||||
|
||||
return _map;
|
||||
}
|
||||
|
||||
static deserialize = function(_map) {
|
||||
bone_id = _map.bone_id;
|
||||
target_id = _map.target_id;
|
||||
strength = _map.strength;
|
||||
|
||||
return self;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"$GMScript":"v1",
|
||||
"%Name":"__bone_constrain_copy_position",
|
||||
"isCompatibility":false,
|
||||
"isDnD":false,
|
||||
"name":"__bone_constrain_copy_position",
|
||||
"parent":{
|
||||
"name":"armature",
|
||||
"path":"folders/nodes/data/compose/armature.yy",
|
||||
},
|
||||
"resourceType":"GMScript",
|
||||
"resourceVersion":"2.0",
|
||||
"tags":[],
|
||||
}
|
|
@ -0,0 +1,108 @@
|
|||
function __Bone_Constrain_Copy_Rotation(_bone, _bid = "", _tid = "") : __Bone_Constrain(_bone) constructor {
|
||||
name = "Copy Rotation";
|
||||
sindex = 1;
|
||||
bone_id = _bid;
|
||||
target_id = _tid;
|
||||
strength = 1;
|
||||
|
||||
bone_object = noone;
|
||||
target_object = noone;
|
||||
|
||||
tb_strength = new textBox(TEXTBOX_INPUT.number, function(v) /*=>*/ { strength = clamp(v, 0, 1); node.triggerRender(); });
|
||||
tb_strength.font = f_p2;
|
||||
tb_strength.label = "Strength";
|
||||
|
||||
static init = function() {
|
||||
if(!is(bone, __Bone)) return;
|
||||
|
||||
bone_object = bone_id == ""? noone : bone.findBone(bone_id);
|
||||
target_object = target_id == ""? noone : bone.findBone(target_id);
|
||||
}
|
||||
|
||||
static constrain = function(_b) {
|
||||
var _bone = bone_id == ""? noone : _b.findBone(bone_id);
|
||||
var _target = target_id == ""? noone : _b.findBone(target_id);
|
||||
if(_bone == noone || _target == noone) return;
|
||||
|
||||
_bone.pose_angle = lerp_angle(_bone.pose_angle, _target.pose_angle, strength);
|
||||
}
|
||||
|
||||
static draw_inspector = function(_x, _y, _w, _m, _hover, _focus, _drawParam) {
|
||||
var wh = 0;
|
||||
|
||||
// draw bones
|
||||
var _wdx = _x + ui(8);
|
||||
var _wdw = (_w - ui(16 + 4)) / 2;
|
||||
var _wdh = ui(24);
|
||||
draw_sprite_stretched_ext(THEME.textbox, 3, _wdx, _y, _wdw, _wdh, c_white, 1);
|
||||
draw_sprite_stretched_ext(THEME.textbox, 3, _wdx + _wdw + ui(4), _y, _wdw, _wdh, c_white, 1);
|
||||
|
||||
if(bone_object != noone) {
|
||||
var _bname = bone_object.name;
|
||||
|
||||
draw_sprite_ext(THEME.bone, 1, _wdx + ui(16), _y + _wdh / 2, 1, 1, 0, COLORS._main_icon, 1);
|
||||
draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text);
|
||||
draw_text_add(_wdx + ui(32), _y + _wdh / 2, _bname);
|
||||
|
||||
} else
|
||||
draw_sprite_ext(THEME.bone, 1, _wdx + ui(16), _y + _wdh / 2, 1, 1, 0, COLORS._main_icon, .5);
|
||||
|
||||
if(target_object != noone) {
|
||||
var _bname = target_object.name;
|
||||
|
||||
draw_sprite_ext(THEME.bone, 1, _wdx + _wdw + ui(4) + ui(16), _y + _wdh / 2, 1, 1, 0, COLORS._main_icon, 1);
|
||||
draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text);
|
||||
draw_text_add(_wdx + _wdw + ui(4) + ui(32), _y + _wdh / 2, _bname);
|
||||
|
||||
} else
|
||||
draw_sprite_ext(THEME.bone, 1, _wdx + _wdw + ui(4) + ui(16), _y + _wdh / 2, 1, 1, 0, COLORS._main_icon, .5);
|
||||
|
||||
if(_hover && point_in_rectangle(_m[0], _m[1], _wdx, _y, _wdx + _wdw, _y + _wdh)) {
|
||||
draw_sprite_stretched_ext(THEME.textbox, 1, _wdx, _y, _wdw, _wdh, c_white, 1);
|
||||
if(mouse_click(mb_left, _focus))
|
||||
menuCall(, array_map(_drawParam.bone_array, function(b) /*=>*/ {return new MenuItem(b.name, function(p) /*=>*/ { bone_id = p.bone.ID; init(); node.triggerRender(); }).setParam({ bone: b })}) );
|
||||
}
|
||||
|
||||
if(_hover && point_in_rectangle(_m[0], _m[1], _wdx + _wdw + ui(4), _y, _wdx + _wdw + ui(4) + _wdw, _y + _wdh)) {
|
||||
draw_sprite_stretched_ext(THEME.textbox, 1, _wdx + _wdw + ui(4), _y, _wdw, _wdh, c_white, 1);
|
||||
if(mouse_click(mb_left, _focus))
|
||||
menuCall(, array_map(_drawParam.bone_array, function(b) /*=>*/ {return new MenuItem(b.name, function(p) /*=>*/ { target_id = p.bone.ID; init(); node.triggerRender(); }).setParam({ bone: b })}) );
|
||||
}
|
||||
|
||||
_y += _wdh + ui(4);
|
||||
wh += _wdh + ui(4);
|
||||
|
||||
// draw widget
|
||||
var _wdx = _x + ui(8);
|
||||
var _wdw = _w - ui(16);
|
||||
var _wdh = ui(24);
|
||||
|
||||
tb_strength.rx = _drawParam.rx;
|
||||
tb_strength.ry = _drawParam.ry;
|
||||
tb_strength.setFocusHover(_focus, _hover);
|
||||
tb_strength.draw(_wdx, _y, _wdw, _wdh, strength, _m);
|
||||
|
||||
_y += _wdh + ui(8);
|
||||
wh += _wdh + ui(8);
|
||||
|
||||
return wh;
|
||||
}
|
||||
|
||||
static serialize = function() {
|
||||
var _map = {};
|
||||
_map.type = "Copy Rotation";
|
||||
_map.bone_id = bone_id;
|
||||
_map.target_id = target_id;
|
||||
_map.strength = strength;
|
||||
|
||||
return _map;
|
||||
}
|
||||
|
||||
static deserialize = function(_map) {
|
||||
bone_id = _map.bone_id;
|
||||
target_id = _map.target_id;
|
||||
strength = _map.strength;
|
||||
|
||||
return self;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"$GMScript":"v1",
|
||||
"%Name":"__bone_constrain_copy_rotation",
|
||||
"isCompatibility":false,
|
||||
"isDnD":false,
|
||||
"name":"__bone_constrain_copy_rotation",
|
||||
"parent":{
|
||||
"name":"armature",
|
||||
"path":"folders/nodes/data/compose/armature.yy",
|
||||
},
|
||||
"resourceType":"GMScript",
|
||||
"resourceVersion":"2.0",
|
||||
"tags":[],
|
||||
}
|
|
@ -0,0 +1,108 @@
|
|||
function __Bone_Constrain_Copy_Scale(_bone, _bid = "", _tid = "") : __Bone_Constrain(_bone) constructor {
|
||||
name = "Copy Scale";
|
||||
sindex = 2;
|
||||
bone_id = _bid;
|
||||
target_id = _tid;
|
||||
strength = 1;
|
||||
|
||||
bone_object = noone;
|
||||
target_object = noone;
|
||||
|
||||
tb_strength = new textBox(TEXTBOX_INPUT.number, function(v) /*=>*/ { strength = clamp(v, 0, 1); node.triggerRender(); });
|
||||
tb_strength.font = f_p2;
|
||||
tb_strength.label = "Strength";
|
||||
|
||||
static init = function() {
|
||||
if(!is(bone, __Bone)) return;
|
||||
|
||||
bone_object = bone_id == ""? noone : bone.findBone(bone_id);
|
||||
target_object = target_id == ""? noone : bone.findBone(target_id);
|
||||
}
|
||||
|
||||
static constrain = function(_b) {
|
||||
var _bone = bone_id == ""? noone : _b.findBone(bone_id);
|
||||
var _target = target_id == ""? noone : _b.findBone(target_id);
|
||||
if(_bone == noone || _target == noone) return;
|
||||
|
||||
_bone.pose_length = lerp(_bone.pose_length, _target.pose_length, strength);
|
||||
}
|
||||
|
||||
static draw_inspector = function(_x, _y, _w, _m, _hover, _focus, _drawParam) {
|
||||
var wh = 0;
|
||||
|
||||
// draw bones
|
||||
var _wdx = _x + ui(8);
|
||||
var _wdw = (_w - ui(16 + 4)) / 2;
|
||||
var _wdh = ui(24);
|
||||
draw_sprite_stretched_ext(THEME.textbox, 3, _wdx, _y, _wdw, _wdh, c_white, 1);
|
||||
draw_sprite_stretched_ext(THEME.textbox, 3, _wdx + _wdw + ui(4), _y, _wdw, _wdh, c_white, 1);
|
||||
|
||||
if(bone_object != noone) {
|
||||
var _bname = bone_object.name;
|
||||
|
||||
draw_sprite_ext(THEME.bone, 1, _wdx + ui(16), _y + _wdh / 2, 1, 1, 0, COLORS._main_icon, 1);
|
||||
draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text);
|
||||
draw_text_add(_wdx + ui(32), _y + _wdh / 2, _bname);
|
||||
|
||||
} else
|
||||
draw_sprite_ext(THEME.bone, 1, _wdx + ui(16), _y + _wdh / 2, 1, 1, 0, COLORS._main_icon, .5);
|
||||
|
||||
if(target_object != noone) {
|
||||
var _bname = target_object.name;
|
||||
|
||||
draw_sprite_ext(THEME.bone, 1, _wdx + _wdw + ui(4) + ui(16), _y + _wdh / 2, 1, 1, 0, COLORS._main_icon, 1);
|
||||
draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text);
|
||||
draw_text_add(_wdx + _wdw + ui(4) + ui(32), _y + _wdh / 2, _bname);
|
||||
|
||||
} else
|
||||
draw_sprite_ext(THEME.bone, 1, _wdx + _wdw + ui(4) + ui(16), _y + _wdh / 2, 1, 1, 0, COLORS._main_icon, .5);
|
||||
|
||||
if(_hover && point_in_rectangle(_m[0], _m[1], _wdx, _y, _wdx + _wdw, _y + _wdh)) {
|
||||
draw_sprite_stretched_ext(THEME.textbox, 1, _wdx, _y, _wdw, _wdh, c_white, 1);
|
||||
if(mouse_click(mb_left, _focus))
|
||||
menuCall(, array_map(_drawParam.bone_array, function(b) /*=>*/ {return new MenuItem(b.name, function(p) /*=>*/ { bone_id = p.bone.ID; init(); node.triggerRender(); }).setParam({ bone: b })}) );
|
||||
}
|
||||
|
||||
if(_hover && point_in_rectangle(_m[0], _m[1], _wdx + _wdw + ui(4), _y, _wdx + _wdw + ui(4) + _wdw, _y + _wdh)) {
|
||||
draw_sprite_stretched_ext(THEME.textbox, 1, _wdx + _wdw + ui(4), _y, _wdw, _wdh, c_white, 1);
|
||||
if(mouse_click(mb_left, _focus))
|
||||
menuCall(, array_map(_drawParam.bone_array, function(b) /*=>*/ {return new MenuItem(b.name, function(p) /*=>*/ { target_id = p.bone.ID; init(); node.triggerRender(); }).setParam({ bone: b })}) );
|
||||
}
|
||||
|
||||
_y += _wdh + ui(4);
|
||||
wh += _wdh + ui(4);
|
||||
|
||||
// draw widget
|
||||
var _wdx = _x + ui(8);
|
||||
var _wdw = _w - ui(16);
|
||||
var _wdh = ui(24);
|
||||
|
||||
tb_strength.rx = _drawParam.rx;
|
||||
tb_strength.ry = _drawParam.ry;
|
||||
tb_strength.setFocusHover(_focus, _hover);
|
||||
tb_strength.draw(_wdx, _y, _wdw, _wdh, strength, _m);
|
||||
|
||||
_y += _wdh + ui(8);
|
||||
wh += _wdh + ui(8);
|
||||
|
||||
return wh;
|
||||
}
|
||||
|
||||
static serialize = function() {
|
||||
var _map = {};
|
||||
_map.type = "Copy Scale";
|
||||
_map.bone_id = bone_id;
|
||||
_map.target_id = target_id;
|
||||
_map.strength = strength;
|
||||
|
||||
return _map;
|
||||
}
|
||||
|
||||
static deserialize = function(_map) {
|
||||
bone_id = _map.bone_id;
|
||||
target_id = _map.target_id;
|
||||
strength = _map.strength;
|
||||
|
||||
return self;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"$GMScript":"v1",
|
||||
"%Name":"__bone_constrain_copy_scale",
|
||||
"isCompatibility":false,
|
||||
"isDnD":false,
|
||||
"name":"__bone_constrain_copy_scale",
|
||||
"parent":{
|
||||
"name":"armature",
|
||||
"path":"folders/nodes/data/compose/armature.yy",
|
||||
},
|
||||
"resourceType":"GMScript",
|
||||
"resourceVersion":"2.0",
|
||||
"tags":[],
|
||||
}
|
|
@ -0,0 +1,87 @@
|
|||
function __Bone_Constrain_Limit_Rotation(_bone, _bid = "") : __Bone_Constrain(_bone) constructor {
|
||||
name = "Limit Rotation";
|
||||
sindex = 7;
|
||||
bone_id = _bid;
|
||||
limit_min = 0;
|
||||
limit_max = 0;
|
||||
|
||||
tb_limit = new vectorBox(2, function(v, i) /*=>*/ { if(i == 0) limit_min = v; else if(i == 1) limit_max = v; node.triggerRender(); });
|
||||
tb_limit.axis = ["min", "max"];
|
||||
tb_limit.tb[0].font = f_p2;
|
||||
tb_limit.tb[1].font = f_p2;
|
||||
|
||||
static init = function() {
|
||||
if(!is(bone, __Bone)) return;
|
||||
|
||||
bone_object = bone_id == ""? noone : bone.findBone(bone_id);
|
||||
}
|
||||
|
||||
static constrain = function(_b) {
|
||||
var _bone = bone_id == ""? noone : _b.findBone(bone_id);
|
||||
if(_bone == noone) return;
|
||||
|
||||
_bone.pose_angle = clamp(_bone.pose_angle, _bone.angle - limit_min, _bone.angle + limit_max);
|
||||
}
|
||||
|
||||
static draw_inspector = function(_x, _y, _w, _m, _hover, _focus, _drawParam) {
|
||||
var wh = 0;
|
||||
|
||||
// draw bones
|
||||
var _wdx = _x + ui(8);
|
||||
var _wdw = _w - ui(16);
|
||||
var _wdh = ui(24);
|
||||
draw_sprite_stretched_ext(THEME.textbox, 3, _wdx, _y, _wdw, _wdh, c_white, 1);
|
||||
|
||||
if(bone_object != noone) {
|
||||
var _bname = bone_object.name;
|
||||
|
||||
draw_sprite_ext(THEME.bone, 1, _wdx + ui(16), _y + _wdh / 2, 1, 1, 0, COLORS._main_icon, 1);
|
||||
draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text);
|
||||
draw_text_add(_wdx + ui(32), _y + _wdh / 2, _bname);
|
||||
|
||||
} else
|
||||
draw_sprite_ext(THEME.bone, 1, _wdx + ui(16), _y + _wdh / 2, 1, 1, 0, COLORS._main_icon, .5);
|
||||
|
||||
if(_hover && point_in_rectangle(_m[0], _m[1], _wdx, _y, _wdx + _wdw, _y + _wdh)) {
|
||||
draw_sprite_stretched_ext(THEME.textbox, 1, _wdx, _y, _wdw, _wdh, c_white, 1);
|
||||
if(mouse_click(mb_left, _focus))
|
||||
menuCall(, array_map(_drawParam.bone_array, function(b) /*=>*/ {return new MenuItem(b.name, function(p) /*=>*/ { bone_id = p.bone.ID; init(); node.triggerRender(); }).setParam({ bone: b })}) );
|
||||
}
|
||||
|
||||
_y += _wdh + ui(4);
|
||||
wh += _wdh + ui(4);
|
||||
|
||||
// draw widget
|
||||
var _wdx = _x + ui(8);
|
||||
var _wdw = _w - ui(16);
|
||||
var _wdh = ui(24);
|
||||
|
||||
tb_limit.rx = _drawParam.rx;
|
||||
tb_limit.ry = _drawParam.ry;
|
||||
tb_limit.setFocusHover(_focus, _hover);
|
||||
tb_limit.draw(_wdx, _y, _wdw, _wdh, [ limit_min, limit_max ], _m);
|
||||
|
||||
_y += _wdh + ui(8);
|
||||
wh += _wdh + ui(8);
|
||||
|
||||
return wh;
|
||||
}
|
||||
|
||||
static serialize = function() {
|
||||
var _map = {};
|
||||
_map.type = "Stretch To";
|
||||
_map.bone_id = bone_id;
|
||||
_map.limit_min = limit_min;
|
||||
_map.limit_max = limit_max;
|
||||
|
||||
return _map;
|
||||
}
|
||||
|
||||
static deserialize = function(_map) {
|
||||
bone_id = _map.bone_id;
|
||||
limit_min = _map.limit_min;
|
||||
limit_max = _map.limit_max;
|
||||
|
||||
return self;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"$GMScript":"v1",
|
||||
"%Name":"__bone_constrain_limit_rotation",
|
||||
"isCompatibility":false,
|
||||
"isDnD":false,
|
||||
"name":"__bone_constrain_limit_rotation",
|
||||
"parent":{
|
||||
"name":"armature",
|
||||
"path":"folders/nodes/data/compose/armature.yy",
|
||||
},
|
||||
"resourceType":"GMScript",
|
||||
"resourceVersion":"2.0",
|
||||
"tags":[],
|
||||
}
|
118
scripts/__bone_constrain_move_to/__bone_constrain_move_to.gml
Normal file
|
@ -0,0 +1,118 @@
|
|||
function __Bone_Constrain_Move_To(_bone, _bid = "", _tid = "") : __Bone_Constrain(_bone) constructor {
|
||||
name = "Move To";
|
||||
sindex = 4;
|
||||
bone_id = _bid;
|
||||
target_id = _tid;
|
||||
strength = 1;
|
||||
|
||||
bone_object = noone;
|
||||
target_object = noone;
|
||||
|
||||
tb_strength = new textBox(TEXTBOX_INPUT.number, function(v) /*=>*/ { strength = clamp(v, 0, 1); node.triggerRender(); });
|
||||
tb_strength.font = f_p2;
|
||||
tb_strength.label = "Strength";
|
||||
|
||||
static init = function() {
|
||||
if(!is(bone, __Bone)) return;
|
||||
|
||||
bone_object = bone_id == ""? noone : bone.findBone(bone_id);
|
||||
target_object = target_id == ""? noone : bone.findBone(target_id);
|
||||
}
|
||||
|
||||
static constrain = function(_b) {
|
||||
var _bone = bone_id == ""? noone : _b.findBone(bone_id);
|
||||
var _target = target_id == ""? noone : _b.findBone(target_id);
|
||||
if(_bone == noone || _target == noone) return;
|
||||
|
||||
var _fr = _bone.getHead();
|
||||
var _to = _target.getHead();
|
||||
|
||||
var _dr = point_direction(_fr.x, _fr.y, _to.x, _to.y);
|
||||
var _ds = point_distance(_fr.x, _fr.y, _to.x, _to.y);
|
||||
|
||||
var _x = lerp(_fr.x, _to.x, strength);
|
||||
var _y = lerp(_fr.y, _to.y, strength);
|
||||
|
||||
_bone.pose_direction = point_direction(0, 0, _x, _y);
|
||||
_bone.pose_distance = point_distance(0, 0, _x, _y);
|
||||
}
|
||||
|
||||
static draw_inspector = function(_x, _y, _w, _m, _hover, _focus, _drawParam) {
|
||||
var wh = 0;
|
||||
|
||||
// draw bones
|
||||
var _wdx = _x + ui(8);
|
||||
var _wdw = (_w - ui(16 + 4)) / 2;
|
||||
var _wdh = ui(24);
|
||||
draw_sprite_stretched_ext(THEME.textbox, 3, _wdx, _y, _wdw, _wdh, c_white, 1);
|
||||
draw_sprite_stretched_ext(THEME.textbox, 3, _wdx + _wdw + ui(4), _y, _wdw, _wdh, c_white, 1);
|
||||
|
||||
if(bone_object != noone) {
|
||||
var _bname = bone_object.name;
|
||||
|
||||
draw_sprite_ext(THEME.bone, 1, _wdx + ui(16), _y + _wdh / 2, 1, 1, 0, COLORS._main_icon, 1);
|
||||
draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text);
|
||||
draw_text_add(_wdx + ui(32), _y + _wdh / 2, _bname);
|
||||
|
||||
} else
|
||||
draw_sprite_ext(THEME.bone, 1, _wdx + ui(16), _y + _wdh / 2, 1, 1, 0, COLORS._main_icon, .5);
|
||||
|
||||
if(target_object != noone) {
|
||||
var _bname = target_object.name;
|
||||
|
||||
draw_sprite_ext(THEME.bone, 1, _wdx + _wdw + ui(4) + ui(16), _y + _wdh / 2, 1, 1, 0, COLORS._main_icon, 1);
|
||||
draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text);
|
||||
draw_text_add(_wdx + _wdw + ui(4) + ui(32), _y + _wdh / 2, _bname);
|
||||
|
||||
} else
|
||||
draw_sprite_ext(THEME.bone, 1, _wdx + _wdw + ui(4) + ui(16), _y + _wdh / 2, 1, 1, 0, COLORS._main_icon, .5);
|
||||
|
||||
if(_hover && point_in_rectangle(_m[0], _m[1], _wdx, _y, _wdx + _wdw, _y + _wdh)) {
|
||||
draw_sprite_stretched_ext(THEME.textbox, 1, _wdx, _y, _wdw, _wdh, c_white, 1);
|
||||
if(mouse_click(mb_left, _focus))
|
||||
menuCall(, array_map(_drawParam.bone_array, function(b) /*=>*/ {return new MenuItem(b.name, function(p) /*=>*/ { bone_id = p.bone.ID; init(); node.triggerRender(); }).setParam({ bone: b })}) );
|
||||
}
|
||||
|
||||
if(_hover && point_in_rectangle(_m[0], _m[1], _wdx + _wdw + ui(4), _y, _wdx + _wdw + ui(4) + _wdw, _y + _wdh)) {
|
||||
draw_sprite_stretched_ext(THEME.textbox, 1, _wdx + _wdw + ui(4), _y, _wdw, _wdh, c_white, 1);
|
||||
if(mouse_click(mb_left, _focus))
|
||||
menuCall(, array_map(_drawParam.bone_array, function(b) /*=>*/ {return new MenuItem(b.name, function(p) /*=>*/ { target_id = p.bone.ID; init(); node.triggerRender(); }).setParam({ bone: b })}) );
|
||||
}
|
||||
|
||||
_y += _wdh + ui(4);
|
||||
wh += _wdh + ui(4);
|
||||
|
||||
// draw widget
|
||||
var _wdx = _x + ui(8);
|
||||
var _wdw = _w - ui(16);
|
||||
var _wdh = ui(24);
|
||||
|
||||
tb_strength.rx = _drawParam.rx;
|
||||
tb_strength.ry = _drawParam.ry;
|
||||
tb_strength.setFocusHover(_focus, _hover);
|
||||
tb_strength.draw(_wdx, _y, _wdw, _wdh, strength, _m);
|
||||
|
||||
_y += _wdh + ui(8);
|
||||
wh += _wdh + ui(8);
|
||||
|
||||
return wh;
|
||||
}
|
||||
|
||||
static serialize = function() {
|
||||
var _map = {};
|
||||
_map.type = "Move To";
|
||||
_map.bone_id = bone_id;
|
||||
_map.target_id = target_id;
|
||||
_map.strength = strength;
|
||||
|
||||
return _map;
|
||||
}
|
||||
|
||||
static deserialize = function(_map) {
|
||||
bone_id = _map.bone_id;
|
||||
target_id = _map.target_id;
|
||||
strength = _map.strength;
|
||||
|
||||
return self;
|
||||
}
|
||||
}
|
14
scripts/__bone_constrain_move_to/__bone_constrain_move_to.yy
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"$GMScript":"v1",
|
||||
"%Name":"__bone_constrain_move_to",
|
||||
"isCompatibility":false,
|
||||
"isDnD":false,
|
||||
"name":"__bone_constrain_move_to",
|
||||
"parent":{
|
||||
"name":"armature",
|
||||
"path":"folders/nodes/data/compose/armature.yy",
|
||||
},
|
||||
"resourceType":"GMScript",
|
||||
"resourceVersion":"2.0",
|
||||
"tags":[],
|
||||
}
|
|
@ -0,0 +1,112 @@
|
|||
function __Bone_Constrain_Stretch_To(_bone, _bid = "", _tid = "") : __Bone_Constrain(_bone) constructor {
|
||||
name = "Stretch To";
|
||||
sindex = 5;
|
||||
bone_id = _bid;
|
||||
target_id = _tid;
|
||||
strength = 1;
|
||||
|
||||
bone_object = noone;
|
||||
target_object = noone;
|
||||
|
||||
tb_strength = new textBox(TEXTBOX_INPUT.number, function(v) /*=>*/ { strength = clamp(v, 0, 1); node.triggerRender(); });
|
||||
tb_strength.font = f_p2;
|
||||
tb_strength.label = "Strength";
|
||||
|
||||
static init = function() {
|
||||
if(!is(bone, __Bone)) return;
|
||||
|
||||
bone_object = bone_id == ""? noone : bone.findBone(bone_id);
|
||||
target_object = target_id == ""? noone : bone.findBone(target_id);
|
||||
}
|
||||
|
||||
static constrain = function(_b) {
|
||||
var _bone = bone_id == ""? noone : _b.findBone(bone_id);
|
||||
var _target = target_id == ""? noone : _b.findBone(target_id);
|
||||
if(_bone == noone || _target == noone) return;
|
||||
|
||||
var _fr = _bone.getHead();
|
||||
var _to = _target.getHead();
|
||||
|
||||
var _dr = point_distance(_fr.x, _fr.y, _to.x, _to.y);
|
||||
_bone.pose_length = lerp(_bone.pose_length, _dr, strength);
|
||||
}
|
||||
|
||||
static draw_inspector = function(_x, _y, _w, _m, _hover, _focus, _drawParam) {
|
||||
var wh = 0;
|
||||
|
||||
// draw bones
|
||||
var _wdx = _x + ui(8);
|
||||
var _wdw = (_w - ui(16 + 4)) / 2;
|
||||
var _wdh = ui(24);
|
||||
draw_sprite_stretched_ext(THEME.textbox, 3, _wdx, _y, _wdw, _wdh, c_white, 1);
|
||||
draw_sprite_stretched_ext(THEME.textbox, 3, _wdx + _wdw + ui(4), _y, _wdw, _wdh, c_white, 1);
|
||||
|
||||
if(bone_object != noone) {
|
||||
var _bname = bone_object.name;
|
||||
|
||||
draw_sprite_ext(THEME.bone, 1, _wdx + ui(16), _y + _wdh / 2, 1, 1, 0, COLORS._main_icon, 1);
|
||||
draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text);
|
||||
draw_text_add(_wdx + ui(32), _y + _wdh / 2, _bname);
|
||||
|
||||
} else
|
||||
draw_sprite_ext(THEME.bone, 1, _wdx + ui(16), _y + _wdh / 2, 1, 1, 0, COLORS._main_icon, .5);
|
||||
|
||||
if(target_object != noone) {
|
||||
var _bname = target_object.name;
|
||||
|
||||
draw_sprite_ext(THEME.bone, 1, _wdx + _wdw + ui(4) + ui(16), _y + _wdh / 2, 1, 1, 0, COLORS._main_icon, 1);
|
||||
draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text);
|
||||
draw_text_add(_wdx + _wdw + ui(4) + ui(32), _y + _wdh / 2, _bname);
|
||||
|
||||
} else
|
||||
draw_sprite_ext(THEME.bone, 1, _wdx + _wdw + ui(4) + ui(16), _y + _wdh / 2, 1, 1, 0, COLORS._main_icon, .5);
|
||||
|
||||
if(_hover && point_in_rectangle(_m[0], _m[1], _wdx, _y, _wdx + _wdw, _y + _wdh)) {
|
||||
draw_sprite_stretched_ext(THEME.textbox, 1, _wdx, _y, _wdw, _wdh, c_white, 1);
|
||||
if(mouse_click(mb_left, _focus))
|
||||
menuCall(, array_map(_drawParam.bone_array, function(b) /*=>*/ {return new MenuItem(b.name, function(p) /*=>*/ { bone_id = p.bone.ID; init(); node.triggerRender(); }).setParam({ bone: b })}) );
|
||||
}
|
||||
|
||||
if(_hover && point_in_rectangle(_m[0], _m[1], _wdx + _wdw + ui(4), _y, _wdx + _wdw + ui(4) + _wdw, _y + _wdh)) {
|
||||
draw_sprite_stretched_ext(THEME.textbox, 1, _wdx + _wdw + ui(4), _y, _wdw, _wdh, c_white, 1);
|
||||
if(mouse_click(mb_left, _focus))
|
||||
menuCall(, array_map(_drawParam.bone_array, function(b) /*=>*/ {return new MenuItem(b.name, function(p) /*=>*/ { target_id = p.bone.ID; init(); node.triggerRender(); }).setParam({ bone: b })}) );
|
||||
}
|
||||
|
||||
_y += _wdh + ui(4);
|
||||
wh += _wdh + ui(4);
|
||||
|
||||
// draw widget
|
||||
var _wdx = _x + ui(8);
|
||||
var _wdw = _w - ui(16);
|
||||
var _wdh = ui(24);
|
||||
|
||||
tb_strength.rx = _drawParam.rx;
|
||||
tb_strength.ry = _drawParam.ry;
|
||||
tb_strength.setFocusHover(_focus, _hover);
|
||||
tb_strength.draw(_wdx, _y, _wdw, _wdh, strength, _m);
|
||||
|
||||
_y += _wdh + ui(8);
|
||||
wh += _wdh + ui(8);
|
||||
|
||||
return wh;
|
||||
}
|
||||
|
||||
static serialize = function() {
|
||||
var _map = {};
|
||||
_map.type = "Stretch To";
|
||||
_map.bone_id = bone_id;
|
||||
_map.target_id = target_id;
|
||||
_map.strength = strength;
|
||||
|
||||
return _map;
|
||||
}
|
||||
|
||||
static deserialize = function(_map) {
|
||||
bone_id = _map.bone_id;
|
||||
target_id = _map.target_id;
|
||||
strength = _map.strength;
|
||||
|
||||
return self;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"$GMScript":"v1",
|
||||
"%Name":"__bone_constrain_stretch_to",
|
||||
"isCompatibility":false,
|
||||
"isDnD":false,
|
||||
"name":"__bone_constrain_stretch_to",
|
||||
"parent":{
|
||||
"name":"armature",
|
||||
"path":"folders/nodes/data/compose/armature.yy",
|
||||
},
|
||||
"resourceType":"GMScript",
|
||||
"resourceVersion":"2.0",
|
||||
"tags":[],
|
||||
}
|
|
@ -88,6 +88,7 @@ function MenuItem(_name, _func, _spr = noone, _hotkey = noone, _toggle = noone,
|
|||
static setActive = function(_active) /*=>*/ { INLINE active = _active; return self; }
|
||||
static setColor = function(_color) /*=>*/ { INLINE color = _color; return self; }
|
||||
static setShiftMenu = function(_shiftMenu) /*=>*/ { INLINE shiftMenu = _shiftMenu; return self; }
|
||||
static setParam = function(_param) /*=>*/ { INLINE params = _param; return self; }
|
||||
}
|
||||
|
||||
function menuItemGroup(_name, _group, _hotkey = noone) { return new MenuItemGroup(_name, _group, _hotkey); }
|
||||
|
|
|
@ -275,8 +275,6 @@ function node_auto_organize_parameter() constructor {
|
|||
|
||||
snap = true;
|
||||
snap_size = 16;
|
||||
|
||||
gridmap = [];
|
||||
}
|
||||
|
||||
function __node_auto_organize_graph(node) {
|
||||
|
|
|
@ -3,19 +3,34 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
|
|||
setDimension(96, 96);
|
||||
draw_padding = 8;
|
||||
|
||||
bone_constrain_adding = noone;
|
||||
function addConstain(_c) {
|
||||
if(bone_constrain_adding == noone) return;
|
||||
array_push(bones.constrains, new __Bone_Constrain(bones).build(_c, bone_constrain_adding.ID));
|
||||
}
|
||||
|
||||
bone_constrain_menu = [
|
||||
new MenuItem("Copy Position", function() /*=>*/ { addConstain("Copy Position") }, [ s_bone_constrain, 0, 1, c_white ]),
|
||||
new MenuItem("Copy Rotation", function() /*=>*/ { addConstain("Copy Rotation") }, [ s_bone_constrain, 1, 1, c_white ]),
|
||||
new MenuItem("Copy Scale", function() /*=>*/ { addConstain("Copy Scale") }, [ s_bone_constrain, 2, 1, c_white ]),
|
||||
-1,
|
||||
new MenuItem("Look At", function() /*=>*/ { addConstain("Look At") }, [ s_bone_constrain, 3, 1, c_white ]),
|
||||
new MenuItem("Move To", function() /*=>*/ { addConstain("Move To") }, [ s_bone_constrain, 4, 1, c_white ]),
|
||||
new MenuItem("Stretch To", function() /*=>*/ { addConstain("Stretch To") }, [ s_bone_constrain, 5, 1, c_white ]),
|
||||
-1,
|
||||
new MenuItem("Limit Rotation", function() /*=>*/ { addConstain("Limit Rotation") }, [ s_bone_constrain, 6, 1, c_white ]),
|
||||
];
|
||||
|
||||
bone_array = [];
|
||||
bone_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) {
|
||||
var _b = bones;
|
||||
if(_b == noone) return 0;
|
||||
var amo = _b.childCount();
|
||||
var _hh = ui(28);
|
||||
var bh = ui(32 + 16) + amo * _hh;
|
||||
var bh = ui(16) + amo * _hh;
|
||||
var ty = _y;
|
||||
|
||||
draw_set_text(f_p2, fa_left, fa_top, COLORS._main_text_sub);
|
||||
draw_text_add(_x + ui(16), ty + ui(4), __txt("Bones"));
|
||||
ty += ui(28);
|
||||
|
||||
draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, ty, _w, bh - ui(32), COLORS.node_composite_bg_blend, 1);
|
||||
draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, ty, _w, bh, COLORS.node_composite_bg_blend, 1);
|
||||
ty += ui(8);
|
||||
|
||||
var hovering = noone;
|
||||
|
@ -70,11 +85,11 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
|
|||
bone.tb_name.setFocusHover(_focus, _hover);
|
||||
bone.tb_name.draw(__x + 24, ty + 3, ww + 16, _hh - 6, bone.name, _m);
|
||||
|
||||
var _x0 = __x + 24 + ww + 32;
|
||||
var _y0 = ty + 14;
|
||||
var _x0 = bx - 24;
|
||||
var _y0 = by;
|
||||
var cc = bone.apply_scale? COLORS._main_icon : COLORS._main_value_negative;
|
||||
if(point_in_circle(_m[0], _m[1], _x0, _y0, 16)) {
|
||||
TOOLTIP = "Apply scale";
|
||||
if(_hover && point_in_circle(_m[0], _m[1], _x0, _y0, 10)) {
|
||||
TOOLTIP = "Apply Scale";
|
||||
draw_sprite_ui(THEME.bone, 3, _x0, _y0,,,, cc, 0.75);
|
||||
|
||||
if(mouse_press(mb_left, _focus))
|
||||
|
@ -82,10 +97,10 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
|
|||
} else
|
||||
draw_sprite_ui(THEME.bone, 3, _x0, _y0,,,, cc, 0.5);
|
||||
|
||||
_x0 += 20;
|
||||
_x0 -= 20;
|
||||
var cc = bone.apply_rotation? COLORS._main_icon : COLORS._main_value_negative;
|
||||
if(point_in_circle(_m[0], _m[1], _x0, _y0, 16)) {
|
||||
TOOLTIP = "Apply rotation";
|
||||
if(_hover && point_in_circle(_m[0], _m[1], _x0, _y0, 10)) {
|
||||
TOOLTIP = "Apply Rotation";
|
||||
draw_sprite_ui(THEME.bone, 4, _x0, _y0,,,, cc, 0.75);
|
||||
|
||||
if(mouse_press(mb_left, _focus))
|
||||
|
@ -93,6 +108,19 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
|
|||
} else
|
||||
draw_sprite_ui(THEME.bone, 4, _x0, _y0,,,, cc, 0.5);
|
||||
|
||||
_x0 -= 20;
|
||||
var cc = COLORS._main_icon;
|
||||
if(_hover && point_in_circle(_m[0], _m[1], _x0, _y0, 10)) {
|
||||
TOOLTIP = "Add Constrains";
|
||||
draw_sprite_ui(THEME.bone, 5, _x0, _y0,,,, cc, .75);
|
||||
|
||||
if(mouse_press(mb_left, _focus)) {
|
||||
bone_constrain_adding = bone;
|
||||
menuCall("bone_constrain_add", bone_constrain_menu);
|
||||
}
|
||||
} else
|
||||
draw_sprite_ui(THEME.bone, 5, _x0, _y0,,,, cc, .5);
|
||||
|
||||
ty += _hh;
|
||||
|
||||
if(!ds_stack_empty(_bst)) {
|
||||
|
@ -122,8 +150,61 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
|
|||
return bh;
|
||||
});
|
||||
|
||||
constrains_h = 0;
|
||||
constrain_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) {
|
||||
var _b = bones;
|
||||
var hh = 0;
|
||||
if(_b == noone) return 0;
|
||||
|
||||
var ty = _y;
|
||||
var constrains = _b.constrains;
|
||||
|
||||
constrains_h = 0;
|
||||
var _del = -1;
|
||||
|
||||
var _drawParam = {
|
||||
rx: constrain_renderer.rx,
|
||||
ry: constrain_renderer.ry,
|
||||
|
||||
selecting: anchor_selecting,
|
||||
bone_array: bone_array,
|
||||
}
|
||||
|
||||
for( var i = 0, n = array_length(constrains); i < n; i++ ) {
|
||||
var _con = constrains[i];
|
||||
|
||||
draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, ty, _w, _con.draw_height + ui(32), COLORS.node_composite_bg_blend, 1);
|
||||
draw_sprite_ui(s_bone_constrain, _con.sindex, _x + ui(4 + 16), ty + ui(16), 1, 1, 0, c_white, 1);
|
||||
|
||||
draw_set_text(f_p2, fa_left, fa_top, COLORS._main_text_sub);
|
||||
draw_text_add(_x + ui(4 + 32), ty + ui(8), _con.name);
|
||||
|
||||
var bx = _x + _w - ui(16);
|
||||
var by = ty + ui(16);
|
||||
|
||||
if(point_in_circle(_m[0], _m[1], bx, by, 16)) {
|
||||
draw_sprite_ui_uniform(THEME.icon_delete, 3, bx, by, 1, COLORS._main_value_negative);
|
||||
|
||||
if(mouse_press(mb_left, _focus)) _del = i;
|
||||
} else
|
||||
draw_sprite_ui_uniform(THEME.icon_delete, 3, bx, by, 1, COLORS._main_icon);
|
||||
|
||||
_con.node = self;
|
||||
var _h = _con.draw_inspector(_x, ty + ui(32), _w, _m, _hover, _focus, _drawParam);
|
||||
|
||||
_con.draw_height = _h;
|
||||
constrains_h += _h + ui(32 + 4);
|
||||
ty += _h + ui(32 + 4);
|
||||
}
|
||||
|
||||
if(_del != -1) array_delete(constrains, _del, 1);
|
||||
hh += constrains_h;
|
||||
return hh;
|
||||
});
|
||||
|
||||
input_display_list = [
|
||||
bone_renderer,
|
||||
["Bones", false], bone_renderer,
|
||||
["Constrains", false], constrain_renderer,
|
||||
];
|
||||
|
||||
static createBone = function(parent, distance, direction) {
|
||||
|
@ -752,11 +833,14 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
|
|||
static step = function() {}
|
||||
|
||||
static update = function(frame = CURRENT_FRAME) {
|
||||
array_foreach(bones.constrains, function(c) /*=>*/ { c.bone = bones; c.init(); });
|
||||
|
||||
bones.resetPose()
|
||||
.setPosition();
|
||||
bone_bbox = bones.bbox();
|
||||
|
||||
outputs[0].setValue(bones);
|
||||
bone_array = bones.toArray();
|
||||
}
|
||||
|
||||
static getPreviewBoundingBox = function() {
|
||||
|
@ -803,6 +887,8 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
|
|||
bones = new __Bone(,,,,, self);
|
||||
bones.deserialize(load_map.bones, self);
|
||||
bones.connect();
|
||||
|
||||
bone_array = bones.toArray();
|
||||
}
|
||||
|
||||
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
|
||||
|
|
|
@ -384,6 +384,7 @@ function Node_Armature_Mesh_Rig(_x, _y, _group = noone) : Node(_x, _y, _group) c
|
|||
bone_posed = _bones.clone()
|
||||
.connect()
|
||||
.resetPose();
|
||||
bone_posed.constrains = _bones.constrains;
|
||||
|
||||
var _barr = bone_posed.toArray();
|
||||
for( var i = 0, n = array_length(_barr); i < n; i++ ) {
|
||||
|
|
|
@ -304,6 +304,7 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
|||
|
||||
bonePose.resetPose()
|
||||
.setPosition();
|
||||
bonePose.constrains = _b.constrains;
|
||||
|
||||
var _bArr = _b.toArray();
|
||||
var bArr = bonePose.toArray();
|
||||
|
|
|
@ -894,10 +894,6 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
|
|||
var _fr = jun.value_from;
|
||||
if(_fr != noone && _fr.node.active) array_push(_nodes, _fr.node);
|
||||
}
|
||||
|
||||
// for( var i = 0, n = array_length(inputs); i < n; i++ ) {
|
||||
// var _fr = inputs[i].value_from;
|
||||
// }
|
||||
|
||||
return array_unique(_nodes);
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ function Panel_Graph_Auto_Organize(_nodes) : PanelContent() constructor {
|
|||
selecting_menu = noone;
|
||||
|
||||
static node_organize = function() {
|
||||
param.snap_size = PANEL_GRAPH.project.graphGrid.size;
|
||||
node_auto_organize(nodes, param);
|
||||
} node_organize();
|
||||
|
||||
|
@ -29,6 +30,11 @@ function Panel_Graph_Auto_Organize(_nodes) : PanelContent() constructor {
|
|||
new textBox(TEXTBOX_INPUT.number, function(v) /*=>*/ { param.padd_h = v; node_organize(); }),
|
||||
function() /*=>*/ {return param.padd_h}
|
||||
),
|
||||
new __Panel_Linear_Setting_Item(
|
||||
__txt("Snap to grid"),
|
||||
new checkBox(function() /*=>*/ { param.snap = !param.snap; node_organize(); }),
|
||||
function() /*=>*/ {return param.snap}
|
||||
),
|
||||
];
|
||||
|
||||
static setHeight = function() { h = ui(12 + 36 * array_length(properties)); }
|
||||
|
|
|
@ -128,7 +128,7 @@
|
|||
animated
|
||||
}
|
||||
|
||||
function __funcList() constructor { #region
|
||||
function __funcList() constructor {
|
||||
funcTrees = [];
|
||||
|
||||
static addFunction = function(fn) {
|
||||
|
@ -159,9 +159,9 @@
|
|||
|
||||
return val;
|
||||
}
|
||||
} #endregion
|
||||
}
|
||||
|
||||
function __funcIf() constructor { #region
|
||||
function __funcIf() constructor {
|
||||
condition = noone;
|
||||
if_true = new __funcList();
|
||||
if_false = new __funcList();
|
||||
|
@ -192,9 +192,9 @@
|
|||
if(res) return if_true == noone? 0 : if_true.eval(params);
|
||||
else return if_false == noone? 0 : if_false.eval(params);
|
||||
}
|
||||
} #endregion
|
||||
}
|
||||
|
||||
function __funcFor() constructor { #region
|
||||
function __funcFor() constructor {
|
||||
itr_array = false;
|
||||
|
||||
cond_init = noone;
|
||||
|
@ -258,24 +258,24 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
} #endregion
|
||||
}
|
||||
|
||||
function __funcTree(symbol, l = noone, r = noone) constructor { #region
|
||||
function __funcTree(symbol, l = noone, r = noone) constructor {
|
||||
self.symbol = symbol;
|
||||
self.l = l;
|
||||
self.r = r;
|
||||
dependency = [];
|
||||
anim_stat = undefined;
|
||||
|
||||
static _string = function(str) { #region
|
||||
static _string = function(str) {
|
||||
return string_char_at(str, 1) == "\"" && string_char_at(str, string_length(str)) == "\"";
|
||||
} #endregion
|
||||
}
|
||||
|
||||
static _string_trim = function(str) { #region
|
||||
static _string_trim = function(str) {
|
||||
return string_trim(str, [ "\"" ]);
|
||||
} #endregion
|
||||
}
|
||||
|
||||
static getVal = function(val, params = {}, getRaw = false) { #region
|
||||
static getVal = function(val, params = {}, getRaw = false) {
|
||||
if(is_struct(val)) return val.eval(params, getRaw);
|
||||
if(is_real(val)) return val;
|
||||
if(getRaw) return val;
|
||||
|
@ -293,9 +293,9 @@
|
|||
return struct_try_get(params.node_values, _str[1]);
|
||||
|
||||
return nodeGetData(val);
|
||||
} #endregion
|
||||
}
|
||||
|
||||
static _validate = function(val) { #region
|
||||
static _validate = function(val) {
|
||||
if(is_real(val)) return true;
|
||||
if(is_string(val)) return true;
|
||||
if(is_struct(val)) return val.validate();
|
||||
|
@ -314,9 +314,9 @@
|
|||
|
||||
array_push_unique(dependency, strs[0]);
|
||||
return true;
|
||||
} #endregion
|
||||
}
|
||||
|
||||
static validate = function() { #region
|
||||
static validate = function() {
|
||||
dependency = [];
|
||||
|
||||
if(ds_map_exists(global.PCX_FUNCTIONS, symbol)) {
|
||||
|
@ -333,9 +333,9 @@
|
|||
}
|
||||
|
||||
return _validate(l) && _validate(r);
|
||||
} #endregion
|
||||
}
|
||||
|
||||
static _isAnimated = function(val) { #region
|
||||
static _isAnimated = function(val) {
|
||||
if(is_real(val)) return EXPRESS_TREE_ANIM.none;
|
||||
if(is_struct(val)) return val.isDynamic();
|
||||
if(is_array(val)) {
|
||||
|
@ -348,17 +348,17 @@
|
|||
if(val == "value") return EXPRESS_TREE_ANIM.base_value;
|
||||
//var anim = nodeGetDataAnim(val);
|
||||
return EXPRESS_TREE_ANIM.animated;
|
||||
} #endregion
|
||||
}
|
||||
|
||||
static isDynamic = function() { #region
|
||||
static isDynamic = function() {
|
||||
anim_stat = EXPRESS_TREE_ANIM.none;
|
||||
anim_stat = max(anim_stat, _isAnimated(l));
|
||||
if(symbol != "@") anim_stat = max(anim_stat, _isAnimated(r));
|
||||
|
||||
return anim_stat;
|
||||
} #endregion
|
||||
}
|
||||
|
||||
static eval = function(params = {}, isLeft = false) { #region
|
||||
static eval = function(params = {}, isLeft = false) {
|
||||
//print($"{symbol}, {l} | {r}")
|
||||
//print(params);
|
||||
|
||||
|
@ -477,9 +477,9 @@
|
|||
}
|
||||
|
||||
return res;
|
||||
} #endregion
|
||||
}
|
||||
|
||||
static eval_real = function(v1, v2, _symbol = symbol) { #region
|
||||
static eval_real = function(v1, v2, _symbol = symbol) {
|
||||
switch(_symbol) {
|
||||
case "+":
|
||||
case "⊕":
|
||||
|
@ -512,15 +512,15 @@
|
|||
}
|
||||
|
||||
return v1;
|
||||
} #endregion
|
||||
}
|
||||
|
||||
static toString = function() { #region
|
||||
static toString = function() {
|
||||
return $"[PCX funcTree] \{ symbol: {symbol}, l: {l}, r: {r}\}";
|
||||
} #endregion
|
||||
} #endregion
|
||||
}
|
||||
}
|
||||
|
||||
function evaluateFunction(fx, params = {}) { #region
|
||||
function evaluateFunction(fx, params = {}) {
|
||||
if(isNumber(fx)) return toNumber(fx);
|
||||
return evaluateFunctionList(fx).eval(params);
|
||||
} #endregion
|
||||
}
|
||||
#endregion
|
|
@ -36,7 +36,7 @@
|
|||
#endregion
|
||||
|
||||
#region parser
|
||||
function functionStringClean(fx) { #region
|
||||
function functionStringClean(fx) {
|
||||
static __BRACKETS = [ "(", "[", "," ];
|
||||
|
||||
var ch = "";
|
||||
|
@ -90,9 +90,9 @@
|
|||
fx = string_trim(fx);
|
||||
|
||||
return fx;
|
||||
} #endregion
|
||||
}
|
||||
|
||||
function functionStrip(fx) { #region
|
||||
function functionStrip(fx) {
|
||||
var el_st = 1;
|
||||
var el_ed = 1;
|
||||
|
||||
|
@ -113,9 +113,9 @@
|
|||
}
|
||||
|
||||
return string_copy(fx, el_st, el_ed - el_st)
|
||||
} #endregion
|
||||
}
|
||||
|
||||
function evaluateFunctionList(fx) { #region
|
||||
function evaluateFunctionList(fx) {
|
||||
fx = string_replace_all(fx, "{", "\n{\n");
|
||||
fx = string_replace_all(fx, "}", "\n}\n");
|
||||
|
||||
|
@ -205,9 +205,9 @@
|
|||
ds_stack_destroy(blok_st);
|
||||
|
||||
return flist;
|
||||
} #endregion
|
||||
}
|
||||
|
||||
function evaluateFunctionTree(fx) { #region //////////////////////////////////////////// STATEMENT PARSER ////////////////////////////////////////////
|
||||
function evaluateFunctionTree(fx) { //////////////////////////////////////////// STATEMENT PARSER ////////////////////////////////////////////
|
||||
static __BRACKETS = [ "(", ")", "[", "]", "]" ];
|
||||
|
||||
var pres = global.EQUATION_PRES;
|
||||
|
@ -394,9 +394,9 @@
|
|||
printIf(global.LOG_EXPRESSION, "");
|
||||
|
||||
return tree;
|
||||
} #endregion
|
||||
}
|
||||
|
||||
function buildFuncTree(operator, vl) { #region
|
||||
function buildFuncTree(operator, vl) {
|
||||
if(ds_stack_empty(vl)) return noone;
|
||||
|
||||
if(ds_map_exists(global.PCX_FUNCTIONS, operator)) {
|
||||
|
@ -451,5 +451,5 @@
|
|||
}
|
||||
|
||||
return noone;
|
||||
} #endregion
|
||||
}
|
||||
#endregion
|
|
@ -174,6 +174,8 @@ function __nodeIsRenderLeaf(_node) {
|
|||
}
|
||||
|
||||
function Render(partial = false, runAction = false) {
|
||||
// node_auto_organize(PROJECT.nodes);
|
||||
|
||||
LOG_END();
|
||||
|
||||
LOG_BLOCK_START();
|
||||
|
|
BIN
sprites/s_bone/1da42b06-f768-4f4c-ad13-465423a11075.png
Normal file
After Width: | Height: | Size: 561 B |
Before Width: | Height: | Size: 469 B |
BIN
sprites/s_bone/29e7513e-9760-4b10-bc81-0d0138659b5a.png
Normal file
After Width: | Height: | Size: 510 B |
Before Width: | Height: | Size: 470 B |
Before Width: | Height: | Size: 478 B |
Before Width: | Height: | Size: 487 B |
BIN
sprites/s_bone/a91c3efc-ab6b-4dca-a2cd-0dcc5e26b6a5.png
Normal file
After Width: | Height: | Size: 518 B |
BIN
sprites/s_bone/d558aff3-4ff7-4f90-b9d1-eccbc543cce1.png
Normal file
After Width: | Height: | Size: 483 B |
Before Width: | Height: | Size: 449 B |
BIN
sprites/s_bone/f9742d1d-ed20-4cf1-ba18-7b899449ccbe.png
Normal file
After Width: | Height: | Size: 537 B |
BIN
sprites/s_bone/fb5fb9c3-84e3-4781-8030-784568f280c2.png
Normal file
After Width: | Height: | Size: 505 B |
After Width: | Height: | Size: 561 B |
Before Width: | Height: | Size: 469 B |
After Width: | Height: | Size: 510 B |
Before Width: | Height: | Size: 470 B |
Before Width: | Height: | Size: 478 B |
Before Width: | Height: | Size: 487 B |
After Width: | Height: | Size: 518 B |
After Width: | Height: | Size: 483 B |
Before Width: | Height: | Size: 449 B |
After Width: | Height: | Size: 537 B |
After Width: | Height: | Size: 505 B |
|
@ -5,25 +5,26 @@
|
|||
"bbox_bottom":15,
|
||||
"bbox_left":1,
|
||||
"bbox_right":15,
|
||||
"bbox_top":1,
|
||||
"bbox_top":0,
|
||||
"collisionKind":1,
|
||||
"collisionTolerance":0,
|
||||
"DynamicTexturePage":false,
|
||||
"edgeFiltering":false,
|
||||
"For3D":false,
|
||||
"frames":[
|
||||
{"$GMSpriteFrame":"","%Name":"2f24ef16-f40a-4406-a890-1feb91fec59a","name":"2f24ef16-f40a-4406-a890-1feb91fec59a","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
{"$GMSpriteFrame":"","%Name":"24688870-14dc-40d5-bef8-f143942fec22","name":"24688870-14dc-40d5-bef8-f143942fec22","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
{"$GMSpriteFrame":"","%Name":"d75c63a0-bae2-47e4-afa0-19121f7b3e49","name":"d75c63a0-bae2-47e4-afa0-19121f7b3e49","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
{"$GMSpriteFrame":"","%Name":"7e00cee7-6fcf-483d-a02c-5d827a860d34","name":"7e00cee7-6fcf-483d-a02c-5d827a860d34","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
{"$GMSpriteFrame":"","%Name":"838d47a7-f072-4971-81fd-b8fdfc4be594","name":"838d47a7-f072-4971-81fd-b8fdfc4be594","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
{"$GMSpriteFrame":"","%Name":"d558aff3-4ff7-4f90-b9d1-eccbc543cce1","name":"d558aff3-4ff7-4f90-b9d1-eccbc543cce1","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
{"$GMSpriteFrame":"","%Name":"a91c3efc-ab6b-4dca-a2cd-0dcc5e26b6a5","name":"a91c3efc-ab6b-4dca-a2cd-0dcc5e26b6a5","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
{"$GMSpriteFrame":"","%Name":"fb5fb9c3-84e3-4781-8030-784568f280c2","name":"fb5fb9c3-84e3-4781-8030-784568f280c2","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
{"$GMSpriteFrame":"","%Name":"29e7513e-9760-4b10-bc81-0d0138659b5a","name":"29e7513e-9760-4b10-bc81-0d0138659b5a","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
{"$GMSpriteFrame":"","%Name":"f9742d1d-ed20-4cf1-ba18-7b899449ccbe","name":"f9742d1d-ed20-4cf1-ba18-7b899449ccbe","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
{"$GMSpriteFrame":"","%Name":"1da42b06-f768-4f4c-ad13-465423a11075","name":"1da42b06-f768-4f4c-ad13-465423a11075","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
],
|
||||
"gridX":0,
|
||||
"gridY":0,
|
||||
"height":16,
|
||||
"HTile":false,
|
||||
"layers":[
|
||||
{"$GMImageLayer":"","%Name":"cdd131d3-6a7a-4215-9655-dca1ef6e761d","blendMode":0,"displayName":"default","isLocked":false,"name":"cdd131d3-6a7a-4215-9655-dca1ef6e761d","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,},
|
||||
{"$GMImageLayer":"","%Name":"65f4cc82-ecdf-4f51-a39b-c43550b7da85","blendMode":0,"displayName":"default","isLocked":false,"name":"65f4cc82-ecdf-4f51-a39b-c43550b7da85","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,},
|
||||
],
|
||||
"name":"s_bone",
|
||||
"nineSlice":null,
|
||||
|
@ -53,7 +54,7 @@
|
|||
},
|
||||
"eventStubScript":null,
|
||||
"eventToFunction":{},
|
||||
"length":5.0,
|
||||
"length":6.0,
|
||||
"lockOrigin":false,
|
||||
"moments":{
|
||||
"$KeyframeStore<MomentsEventKeyframe>":"",
|
||||
|
@ -73,20 +74,23 @@
|
|||
"tracks":[
|
||||
{"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore<SpriteFrameKeyframe>":"","Keyframes":[
|
||||
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"2f24ef16-f40a-4406-a890-1feb91fec59a","path":"sprites/s_bone/s_bone.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"893f9f93-747a-4a3a-91d1-a28e4d1c8550","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"d558aff3-4ff7-4f90-b9d1-eccbc543cce1","path":"sprites/s_bone/s_bone.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"38b51186-b726-4130-bcc1-2bbfc4a1e1f5","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"24688870-14dc-40d5-bef8-f143942fec22","path":"sprites/s_bone/s_bone.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"e7435e20-2fa2-4c7e-85ba-338c4ead6905","IsCreationKey":false,"Key":1.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"a91c3efc-ab6b-4dca-a2cd-0dcc5e26b6a5","path":"sprites/s_bone/s_bone.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"5e580aeb-15e0-4a3e-9047-438f463a25f9","IsCreationKey":false,"Key":1.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"d75c63a0-bae2-47e4-afa0-19121f7b3e49","path":"sprites/s_bone/s_bone.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"e9dbab8f-fc9b-454e-882d-3633f27bf7f5","IsCreationKey":false,"Key":2.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"fb5fb9c3-84e3-4781-8030-784568f280c2","path":"sprites/s_bone/s_bone.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"398bcb20-7568-49f9-ba43-8feb3b559ca3","IsCreationKey":false,"Key":2.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"7e00cee7-6fcf-483d-a02c-5d827a860d34","path":"sprites/s_bone/s_bone.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"d3a82281-4b24-4a24-b8aa-2757ec0ae878","IsCreationKey":false,"Key":3.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"29e7513e-9760-4b10-bc81-0d0138659b5a","path":"sprites/s_bone/s_bone.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"858892e3-c8b5-4c1c-afa0-f04133863947","IsCreationKey":false,"Key":3.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"838d47a7-f072-4971-81fd-b8fdfc4be594","path":"sprites/s_bone/s_bone.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"c5f82344-1556-4362-9c75-705909c66c1f","IsCreationKey":false,"Key":4.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"f9742d1d-ed20-4cf1-ba18-7b899449ccbe","path":"sprites/s_bone/s_bone.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"06716bcc-11fb-4eeb-a32f-91952ed4770b","IsCreationKey":false,"Key":4.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"1da42b06-f768-4f4c-ad13-465423a11075","path":"sprites/s_bone/s_bone.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"3a9e2e48-492d-46dc-bf4e-f77e6687e97a","IsCreationKey":false,"Key":5.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
],"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
|
||||
],
|
||||
"visibleRange":null,
|
||||
|
|
After Width: | Height: | Size: 699 B |
After Width: | Height: | Size: 691 B |
After Width: | Height: | Size: 615 B |
After Width: | Height: | Size: 619 B |
After Width: | Height: | Size: 698 B |
After Width: | Height: | Size: 780 B |
After Width: | Height: | Size: 623 B |
After Width: | Height: | Size: 699 B |
After Width: | Height: | Size: 691 B |
After Width: | Height: | Size: 615 B |
After Width: | Height: | Size: 619 B |
After Width: | Height: | Size: 698 B |
After Width: | Height: | Size: 780 B |
After Width: | Height: | Size: 623 B |
114
sprites/s_bone_constrain/s_bone_constrain.yy
Normal file
|
@ -0,0 +1,114 @@
|
|||
{
|
||||
"$GMSprite":"",
|
||||
"%Name":"s_bone_constrain",
|
||||
"bboxMode":0,
|
||||
"bbox_bottom":15,
|
||||
"bbox_left":0,
|
||||
"bbox_right":15,
|
||||
"bbox_top":0,
|
||||
"collisionKind":1,
|
||||
"collisionTolerance":0,
|
||||
"DynamicTexturePage":false,
|
||||
"edgeFiltering":false,
|
||||
"For3D":false,
|
||||
"frames":[
|
||||
{"$GMSpriteFrame":"","%Name":"060200a0-e010-47dd-9810-6d11095292ea","name":"060200a0-e010-47dd-9810-6d11095292ea","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
{"$GMSpriteFrame":"","%Name":"ed914ce0-6f60-42f2-8ecd-11642b26a114","name":"ed914ce0-6f60-42f2-8ecd-11642b26a114","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
{"$GMSpriteFrame":"","%Name":"782718bc-f06c-45e7-a614-8a5899f845e4","name":"782718bc-f06c-45e7-a614-8a5899f845e4","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
{"$GMSpriteFrame":"","%Name":"c0bd8b8e-d839-4c58-9ea5-5be5a29fefff","name":"c0bd8b8e-d839-4c58-9ea5-5be5a29fefff","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
{"$GMSpriteFrame":"","%Name":"8f4c72fa-fd59-4c0c-97b2-2f14a72271dc","name":"8f4c72fa-fd59-4c0c-97b2-2f14a72271dc","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
{"$GMSpriteFrame":"","%Name":"fb54f30b-284c-4cc6-a5f9-92dca2275890","name":"fb54f30b-284c-4cc6-a5f9-92dca2275890","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
{"$GMSpriteFrame":"","%Name":"cd34ad54-b797-4f98-9121-7bb81fb11ef6","name":"cd34ad54-b797-4f98-9121-7bb81fb11ef6","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
],
|
||||
"gridX":0,
|
||||
"gridY":0,
|
||||
"height":16,
|
||||
"HTile":false,
|
||||
"layers":[
|
||||
{"$GMImageLayer":"","%Name":"42535985-e6c2-4ee6-bb74-809cd1065bf0","blendMode":0,"displayName":"default","isLocked":false,"name":"42535985-e6c2-4ee6-bb74-809cd1065bf0","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,},
|
||||
],
|
||||
"name":"s_bone_constrain",
|
||||
"nineSlice":null,
|
||||
"origin":4,
|
||||
"parent":{
|
||||
"name":"nodes",
|
||||
"path":"folders/sprites/nodes.yy",
|
||||
},
|
||||
"preMultiplyAlpha":false,
|
||||
"resourceType":"GMSprite",
|
||||
"resourceVersion":"2.0",
|
||||
"sequence":{
|
||||
"$GMSequence":"",
|
||||
"%Name":"s_bone_constrain",
|
||||
"autoRecord":true,
|
||||
"backdropHeight":768,
|
||||
"backdropImageOpacity":0.5,
|
||||
"backdropImagePath":"",
|
||||
"backdropWidth":1366,
|
||||
"backdropXOffset":0.0,
|
||||
"backdropYOffset":0.0,
|
||||
"events":{
|
||||
"$KeyframeStore<MessageEventKeyframe>":"",
|
||||
"Keyframes":[],
|
||||
"resourceType":"KeyframeStore<MessageEventKeyframe>",
|
||||
"resourceVersion":"2.0",
|
||||
},
|
||||
"eventStubScript":null,
|
||||
"eventToFunction":{},
|
||||
"length":7.0,
|
||||
"lockOrigin":false,
|
||||
"moments":{
|
||||
"$KeyframeStore<MomentsEventKeyframe>":"",
|
||||
"Keyframes":[],
|
||||
"resourceType":"KeyframeStore<MomentsEventKeyframe>",
|
||||
"resourceVersion":"2.0",
|
||||
},
|
||||
"name":"s_bone_constrain",
|
||||
"playback":1,
|
||||
"playbackSpeed":30.0,
|
||||
"playbackSpeedType":0,
|
||||
"resourceType":"GMSequence",
|
||||
"resourceVersion":"2.0",
|
||||
"showBackdrop":true,
|
||||
"showBackdropImage":false,
|
||||
"timeUnits":1,
|
||||
"tracks":[
|
||||
{"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore<SpriteFrameKeyframe>":"","Keyframes":[
|
||||
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"060200a0-e010-47dd-9810-6d11095292ea","path":"sprites/s_bone_constrain/s_bone_constrain.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"f9bded20-ceb7-4472-a35b-cfdd604bc32a","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"ed914ce0-6f60-42f2-8ecd-11642b26a114","path":"sprites/s_bone_constrain/s_bone_constrain.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"7107bd03-65df-4df8-9ca6-13aa73e0b80f","IsCreationKey":false,"Key":1.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"782718bc-f06c-45e7-a614-8a5899f845e4","path":"sprites/s_bone_constrain/s_bone_constrain.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"13c4e637-1f34-466e-8805-2032fee8c0ae","IsCreationKey":false,"Key":2.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"c0bd8b8e-d839-4c58-9ea5-5be5a29fefff","path":"sprites/s_bone_constrain/s_bone_constrain.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"0fbcdf3e-c970-4d79-b518-b59c4d015b8f","IsCreationKey":false,"Key":3.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"8f4c72fa-fd59-4c0c-97b2-2f14a72271dc","path":"sprites/s_bone_constrain/s_bone_constrain.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"4f10a9bf-5fb1-435a-a788-d313dc83476f","IsCreationKey":false,"Key":4.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"fb54f30b-284c-4cc6-a5f9-92dca2275890","path":"sprites/s_bone_constrain/s_bone_constrain.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"81c60b8e-7409-4d70-9648-76260a44f1b8","IsCreationKey":false,"Key":5.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"cd34ad54-b797-4f98-9121-7bb81fb11ef6","path":"sprites/s_bone_constrain/s_bone_constrain.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"2d0fcabe-b80e-413e-9529-3fe2b41d6ef6","IsCreationKey":false,"Key":6.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
],"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
|
||||
],
|
||||
"visibleRange":null,
|
||||
"volume":1.0,
|
||||
"xorigin":8,
|
||||
"yorigin":8,
|
||||
},
|
||||
"swatchColours":null,
|
||||
"swfPrecision":0.5,
|
||||
"textureGroupId":{
|
||||
"name":"Default",
|
||||
"path":"texturegroups/Default",
|
||||
},
|
||||
"type":0,
|
||||
"VTile":false,
|
||||
"width":16,
|
||||
}
|