Browse Source

2to3 exporter: Review all property renames

Fix some bugs with missing or incorrect renames in the process.
Rémi Verschelde 7 years ago
parent
commit
6d6013138e
1 changed files with 32 additions and 70 deletions
  1. 32 70
      editor/editor_export_godot3.cpp

+ 32 - 70
editor/editor_export_godot3.cpp

@@ -195,14 +195,13 @@ static const char *prop_renames[][2] = {
 	{ "bbcode/bbcode", "bbcode_text" },
 	{ "bbcode/bbcode", "bbcode_text" },
 	{ "bbcode/enabled", "bbcode_enabled" },
 	{ "bbcode/enabled", "bbcode_enabled" },
 	{ "bias/bias", "bias" },
 	{ "bias/bias", "bias" },
-	{ "body/friction", "friction" },
-	{ "body/mass", "mass" },
 	{ "caret/block_caret", "caret_block_mode" },
 	{ "caret/block_caret", "caret_block_mode" },
 	{ "caret/caret_blink", "caret_blink" },
 	{ "caret/caret_blink", "caret_blink" },
 	{ "caret/caret_blink_speed", "caret_blink_speed" },
 	{ "caret/caret_blink_speed", "caret_blink_speed" },
 	{ "cell/center_x", "cell_center_x" },
 	{ "cell/center_x", "cell_center_x" },
 	{ "cell/center_y", "cell_center_y" },
 	{ "cell/center_y", "cell_center_y" },
 	{ "cell/center_z", "cell_center_z" },
 	{ "cell/center_z", "cell_center_z" },
+	{ "cell/custom_transform", "cell_custom_transform" },
 	{ "cell/half_offset", "cell_half_offset" },
 	{ "cell/half_offset", "cell_half_offset" },
 	{ "cell/octant_size", "cell_octant_size" },
 	{ "cell/octant_size", "cell_octant_size" },
 	{ "cell/quadrant_size", "cell_quadrant_size" },
 	{ "cell/quadrant_size", "cell_quadrant_size" },
@@ -211,40 +210,29 @@ static const char *prop_renames[][2] = {
 	{ "cell/tile_origin", "cell_tile_origin" },
 	{ "cell/tile_origin", "cell_tile_origin" },
 	{ "cell/y_sort", "cell_y_sort" },
 	{ "cell/y_sort", "cell_y_sort" },
 	{ "collision/bounce", "collision_bounce" },
 	{ "collision/bounce", "collision_bounce" },
-	{ "collision/exclude_nodes", "disable_collision" },
+	//{ "collision/exclude_nodes", "disable_collision" },// FIXME: Joint2D can be converted, not Joint, so manual handling
 	{ "collision/friction", "collision_friction" },
 	{ "collision/friction", "collision_friction" },
-	{ "collision/layers", "collision_layer" }, // conflict with below
-	{ "collision/layers", "collision_layers" },
+	{ "collision/layers", "collision_layer" },
+	{ "collision/margin", "collision/safe_margin" },
 	{ "collision/mask", "collision_mask" },
 	{ "collision/mask", "collision_mask" },
 	{ "collision/use_kinematic", "collision_use_kinematic" },
 	{ "collision/use_kinematic", "collision_use_kinematic" },
-	{ "config/pitch_random", "random_pitch" },
-	{ "config/polyphony", "polyphony" },
-	{ "config/samples", "samples" },
 	{ "content_margin/bottom", "content_margin_bottom" },
 	{ "content_margin/bottom", "content_margin_bottom" },
 	{ "content_margin/left", "content_margin_left" },
 	{ "content_margin/left", "content_margin_left" },
 	{ "content_margin/right", "content_margin_right" },
 	{ "content_margin/right", "content_margin_right" },
 	{ "content_margin/top", "content_margin_top" },
 	{ "content_margin/top", "content_margin_top" },
 	{ "damping/compression", "damping_compression" },
 	{ "damping/compression", "damping_compression" },
 	{ "damping/relaxation", "damping_relaxation" },
 	{ "damping/relaxation", "damping_relaxation" },
-	{ "damp_override_angular", "angular_damp" },
-	{ "damp_override_linear", "linear_damp" },
+	{ "damp_override/angular", "angular_damp" },
+	{ "damp_override/linear", "linear_damp" },
 	{ "dialog/hide_on_ok", "dialog_hide_on_ok" },
 	{ "dialog/hide_on_ok", "dialog_hide_on_ok" },
 	{ "dialog/text", "dialog_text" },
 	{ "dialog/text", "dialog_text" },
-	{ "directional_shadow/bias_split_scale", "directional_shadow_bias_split_scale" },
-	{ "directional_shadow/blend_splits", "directional_shadow_blend_splits" },
-	{ "directional_shadow/mode", "directional_shadow_mode" },
-	{ "directional_shadow/normal_bias", "directional_shadow_normal_bias" },
-	{ "directional_shadow/split_1", "directional_shadow_split_1" },
-	{ "directional_shadow/split_2", "directional_shadow_split_2" },
-	{ "directional_shadow/split_3", "directional_shadow_split_3" },
 	{ "drag_margin/bottom", "drag_margin_bottom" },
 	{ "drag_margin/bottom", "drag_margin_bottom" },
+	{ "drag_margin/h_enabled", "drag_margin_h_enabled" },
 	{ "drag_margin/left", "drag_margin_left" },
 	{ "drag_margin/left", "drag_margin_left" },
 	{ "drag_margin/right", "drag_margin_right" },
 	{ "drag_margin/right", "drag_margin_right" },
 	{ "drag_margin/top", "drag_margin_top" },
 	{ "drag_margin/top", "drag_margin_top" },
-	{ "draw_margin/h_enabled", "draw_margin_h_enabled" },
-	{ "draw_margin/v_enabled", "draw_margin_v_enabled" },
-	{ "editor/editor_only", "editor_only" },
-	{ "enabler/fixed_process_parent", "fixed_process_parent" },
+	{ "drag_margin/v_enabled", "drag_margin_v_enabled" },
+	{ "enabler/fixed_process_parent", "physics_process_parent" },
 	{ "enabler/freeze_bodies", "freeze_bodies" },
 	{ "enabler/freeze_bodies", "freeze_bodies" },
 	{ "enabler/pause_animated_sprites", "pause_animated_sprites" },
 	{ "enabler/pause_animated_sprites", "pause_animated_sprites" },
 	{ "enabler/pause_animations", "pause_animations" },
 	{ "enabler/pause_animations", "pause_animations" },
@@ -259,40 +247,30 @@ static const char *prop_renames[][2] = {
 	{ "extra_spacing/space", "extra_spacing_space" },
 	{ "extra_spacing/space", "extra_spacing_space" },
 	{ "extra_spacing/top", "extra_spacing_top" },
 	{ "extra_spacing/top", "extra_spacing_top" },
 	{ "flags/alpha_cut", "alpha_cut" },
 	{ "flags/alpha_cut", "alpha_cut" },
+	{ "flags/double_sided", "double_sided" },
 	{ "flags/shaded", "shaded" },
 	{ "flags/shaded", "shaded" },
 	{ "flags/transparent", "transparent" },
 	{ "flags/transparent", "transparent" },
-	{ "focus/ignore_mouse", "focus_ignore_mouse" },
 	{ "focus_neighbour/bottom", "focus_neighbour_bottom" },
 	{ "focus_neighbour/bottom", "focus_neighbour_bottom" },
 	{ "focus_neighbour/left", "focus_neighbour_left" },
 	{ "focus_neighbour/left", "focus_neighbour_left" },
 	{ "focus_neighbour/right", "focus_neighbour_right" },
 	{ "focus_neighbour/right", "focus_neighbour_right" },
 	{ "focus_neighbour/top", "focus_neighbour_top" },
 	{ "focus_neighbour/top", "focus_neighbour_top" },
-	{ "focus/stop_mouse", "focus_stop_mouse" },
 	{ "font/font", "font_data" },
 	{ "font/font", "font_data" },
 	{ "font/size", "size" },
 	{ "font/size", "size" },
 	{ "font/use_filter", "use_filter" },
 	{ "font/use_filter", "use_filter" },
 	{ "font/use_mipmaps", "use_mipmaps" },
 	{ "font/use_mipmaps", "use_mipmaps" },
-	{ "geometry/billboard", "use_as_billboard" },
-	{ "geometry/billboard_y", "use_as_y_billboard" },
 	{ "geometry/cast_shadow", "cast_shadow" },
 	{ "geometry/cast_shadow", "cast_shadow" },
-	{ "geometry/depth_scale", "use_depth_scale" },
 	{ "geometry/extra_cull_margin", "extra_cull_margin" },
 	{ "geometry/extra_cull_margin", "extra_cull_margin" },
 	{ "geometry/material_override", "material_override" },
 	{ "geometry/material_override", "material_override" },
 	{ "geometry/use_baked_light", "use_in_baked_light" },
 	{ "geometry/use_baked_light", "use_in_baked_light" },
-	{ "geometry/visible_in_all_rooms", "visible_in_all_rooms" },
+	{ "hint/tooltip", "hint_tooltip" },
 	{ "input/capture_on_drag", "input_capture_on_drag" },
 	{ "input/capture_on_drag", "input_capture_on_drag" },
 	{ "input/pickable", "input_pickable" },
 	{ "input/pickable", "input_pickable" },
 	{ "input/ray_pickable", "input_ray_pickable" },
 	{ "input/ray_pickable", "input_ray_pickable" },
 	{ "invert/border", "invert_border" },
 	{ "invert/border", "invert_border" },
 	{ "invert/enable", "invert_enable" },
 	{ "invert/enable", "invert_enable" },
-	{ "light/color", "light_color" },
-	{ "light/cull_mask", "light_cull_mask" },
-	{ "light/energy", "light_energy" },
-	{ "light/negative", "light_negative" },
-	{ "light/specular", "light_specular" },
 	{ "limit/bottom", "limit_bottom" },
 	{ "limit/bottom", "limit_bottom" },
 	{ "limit/left", "limit_left" },
 	{ "limit/left", "limit_left" },
 	{ "limit/right", "limit_right" },
 	{ "limit/right", "limit_right" },
-	{ "limit/smoothed", "limit_smoothed" },
 	{ "limit/top", "limit_top" },
 	{ "limit/top", "limit_top" },
 	{ "margin/bottom", "margin_bottom" },
 	{ "margin/bottom", "margin_bottom" },
 	{ "margin/left", "margin_left" },
 	{ "margin/left", "margin_left" },
@@ -302,20 +280,14 @@ static const char *prop_renames[][2] = {
 	{ "material/use_parent", "use_parent_material" },
 	{ "material/use_parent", "use_parent_material" },
 	{ "mesh/mesh", "mesh" },
 	{ "mesh/mesh", "mesh" },
 	{ "mesh/skeleton", "skeleton" },
 	{ "mesh/skeleton", "skeleton" },
-	//{ "mode", "fill_mode" }, // breaks tilemap :/
-	{ "modulate/color", "modulate_color" },
-	{ "modulate", "self_modulate" },
-	{ "motion/breake", "breake" },
+	//{ "mode", "fill_mode" },// FIXME: breaks TileMap and others, handle manually
+	{ "motion/brake", "brake" },
 	{ "motion/engine_force", "engine_force" },
 	{ "motion/engine_force", "engine_force" },
 	{ "motion/mirroring", "motion_mirroring" },
 	{ "motion/mirroring", "motion_mirroring" },
 	{ "motion/offset", "motion_offset" },
 	{ "motion/offset", "motion_offset" },
 	{ "motion/scale", "motion_scale" },
 	{ "motion/scale", "motion_scale" },
 	{ "motion/steering", "steering" },
 	{ "motion/steering", "steering" },
 	{ "occluder/light_mask", "occluder_light_mask" },
 	{ "occluder/light_mask", "occluder_light_mask" },
-	{ "omni/attenuation", "omni_attenuation" },
-	{ "omni/range", "omni_range" },
-	{ "omni/shadow_detail", "omni_shadow_detail" },
-	{ "omni/shadow_mode", "omni_shadow_mode" },
 	{ "params/attenuation/distance_exp", "attenuation_distance_exp" },
 	{ "params/attenuation/distance_exp", "attenuation_distance_exp" },
 	{ "params/attenuation/max_distance", "attenuation_max_distance" },
 	{ "params/attenuation/max_distance", "attenuation_max_distance" },
 	{ "params/attenuation/min_distance", "attenuation_min_distance" },
 	{ "params/attenuation/min_distance", "attenuation_min_distance" },
@@ -329,27 +301,24 @@ static const char *prop_renames[][2] = {
 	{ "patch_margin/left", "patch_margin_left" },
 	{ "patch_margin/left", "patch_margin_left" },
 	{ "patch_margin/right", "patch_margin_right" },
 	{ "patch_margin/right", "patch_margin_right" },
 	{ "patch_margin/top", "patch_margin_top" },
 	{ "patch_margin/top", "patch_margin_top" },
-	{ "pause/pause_mode", "pause_mode" },
 	{ "percent/visible", "percent_visible" },
 	{ "percent/visible", "percent_visible" },
 	{ "placeholder/alpha", "placeholder_alpha" },
 	{ "placeholder/alpha", "placeholder_alpha" },
 	{ "placeholder/text", "placeholder_text" },
 	{ "placeholder/text", "placeholder_text" },
-	//{ "playback/active", "playback_active" }, // properly renamed for AnimationPlayer, but not AnimationTreePlayer, so handle manually
+	//{ "playback/active", "playback_active" },// properly renamed for AnimationPlayer, but not AnimationTreePlayer, so handle manually
 	{ "playback/default_blend_time", "playback_default_blend_time" },
 	{ "playback/default_blend_time", "playback_default_blend_time" },
 	{ "playback/process_mode", "playback_process_mode" },
 	{ "playback/process_mode", "playback_process_mode" },
 	{ "playback/speed", "playback_speed" },
 	{ "playback/speed", "playback_speed" },
+	{ "playback/repeat", "playback_speed" },
 	{ "popup/exclusive", "popup_exclusive" },
 	{ "popup/exclusive", "popup_exclusive" },
 	{ "process/pause_mode", "pause_mode" },
 	{ "process/pause_mode", "pause_mode" },
-	{ "quad/axis", "axis" },
-	{ "quad/centered", "centered" },
-	{ "quad/offset", "offset" },
-	{ "quad/size", "size" },
 	{ "radial_fill/center_offset", "radial_center_offset" },
 	{ "radial_fill/center_offset", "radial_center_offset" },
 	{ "radial_fill/fill_degrees", "radial_fill_degrees" },
 	{ "radial_fill/fill_degrees", "radial_fill_degrees" },
 	{ "radial_fill/initial_angle", "radial_initial_angle" },
 	{ "radial_fill/initial_angle", "radial_initial_angle" },
 	{ "range/exp_edit", "exp_edit" },
 	{ "range/exp_edit", "exp_edit" },
 	{ "range/height", "range_height" },
 	{ "range/height", "range_height" },
-	{ "range/item_cull_mask", "range_item_cull_max" },
+	{ "range/item_mask", "range_item_cull_mask" },
 	{ "range/layer_max", "range_layer_max" },
 	{ "range/layer_max", "range_layer_max" },
+	{ "range/layer_min", "range_layer_min" },
 	{ "range/max", "max_value" },
 	{ "range/max", "max_value" },
 	{ "range/min", "min_value" },
 	{ "range/min", "min_value" },
 	{ "range/page", "page" },
 	{ "range/page", "page" },
@@ -359,54 +328,45 @@ static const char *prop_renames[][2] = {
 	{ "range/z_max", "range_z_max" },
 	{ "range/z_max", "range_z_max" },
 	{ "range/z_min", "range_z_min" },
 	{ "range/z_min", "range_z_min" },
 	{ "rect/min_size", "rect_min_size" },
 	{ "rect/min_size", "rect_min_size" },
+	{ "rect/pos", "rect_position" },
 	{ "rect/rotation", "rect_rotation" },
 	{ "rect/rotation", "rect_rotation" },
 	{ "rect/scale", "rect_scale" },
 	{ "rect/scale", "rect_scale" },
-	{ "region", "region_enabled" },
+	{ "rect/size", "rect_size" },
+	//{ "region", "region_enabled" }, // FIXME: Rename manually for Sprite, Sprite3D but not Texture
 	{ "resource/name", "resource_name" },
 	{ "resource/name", "resource_name" },
 	{ "resource/path", "resource_path" },
 	{ "resource/path", "resource_path" },
 	{ "root/root", "root_node" },
 	{ "root/root", "root_node" },
 	{ "script/script", "script" },
 	{ "script/script", "script" },
 	{ "scroll/base_offset", "scroll_base_offset" },
 	{ "scroll/base_offset", "scroll_base_offset" },
 	{ "scroll/base_scale", "scroll_base_scale" },
 	{ "scroll/base_scale", "scroll_base_scale" },
-	{ "scroll/horizontal", "scroll_horizontal" },
+	{ "scroll/horizontal", "scroll_horizontal_enabled" },
 	{ "scroll/ignore_camera_zoom", "scroll_ignore_camera_zoom" },
 	{ "scroll/ignore_camera_zoom", "scroll_ignore_camera_zoom" },
 	{ "scroll/limit_begin", "scroll_limit_begin" },
 	{ "scroll/limit_begin", "scroll_limit_begin" },
 	{ "scroll/limit_end", "scroll_limit_end" },
 	{ "scroll/limit_end", "scroll_limit_end" },
 	{ "scroll/offset", "scroll_offset" },
 	{ "scroll/offset", "scroll_offset" },
-	{ "scroll/vertical", "scroll_vertical" },
-	{ "shadow/bias", "shadow_bias" },
+	{ "scroll/vertical", "scroll_vertical_enabled" },
 	{ "shadow/buffer_size", "shadow_buffer_size" },
 	{ "shadow/buffer_size", "shadow_buffer_size" },
 	{ "shadow/color", "shadow_color" },
 	{ "shadow/color", "shadow_color" },
 	{ "shadow/enabled", "shadow_enabled" },
 	{ "shadow/enabled", "shadow_enabled" },
-	{ "shadow/filter", "shadow_filter" },
-	{ "shadow/gradient_length", "shadow_gradient_length" },
-	{ "shadow/item_cull_mask", "shadow_item_cull_mask" },
-	{ "shadow/max_distance", "shadow_max_distance" },
-	{ "size_flags/horizontal", "size_flags_horizontal" }, // TODO: Fix enum order got inverted Expand,Fill -> Fill,Expand
+	{ "shadow/item_mask", "shadow_item_cull_mask" },
+	{ "size_flags/horizontal", "size_flags_horizontal" },// FIXME: Fix enum order got inverted Expand,Fill -> Fill,Expand
 	{ "size_flags/stretch_ratio", "size_flags_stretch_ratio" },
 	{ "size_flags/stretch_ratio", "size_flags_stretch_ratio" },
-	{ "size_flags/vertical", "size_flags_vertical" }, // TODO: Fix enum order got inverted Expand,Fill -> Fill,Expand
+	{ "size_flags/vertical", "size_flags_vertical" },// FIXME: Fix enum order got inverted Expand,Fill -> Fill,Expand
 	{ "smoothing/enable", "smoothing_enabled" },
 	{ "smoothing/enable", "smoothing_enabled" },
 	{ "smoothing/speed", "smoothing_speed" },
 	{ "smoothing/speed", "smoothing_speed" },
 	{ "sort/enabled", "sort_enabled" },
 	{ "sort/enabled", "sort_enabled" },
 	{ "split/collapsed", "collapsed" },
 	{ "split/collapsed", "collapsed" },
 	{ "split/dragger_visibility", "dragger_visibility" },
 	{ "split/dragger_visibility", "dragger_visibility" },
 	{ "split/offset", "split_offset" },
 	{ "split/offset", "split_offset" },
-	{ "spot/angle", "spot_angle" },
-	{ "spot/attenuation", "spot_attenuation" },
-	{ "spot/range", "spot_range" },
-	{ "spot/spot_attenuation", "spot_angle_attenuation" },
 	{ "stream/audio_track", "audio_track" },
 	{ "stream/audio_track", "audio_track" },
 	{ "stream/autoplay", "autoplay" },
 	{ "stream/autoplay", "autoplay" },
-	{ "stream/autoplay", "stream_autoplay" },
-	{ "stream/buffering_ms", "buffering_ms" },
+	{ "stream/buffering_ms", "buffering_msec" },
 	{ "stream/loop", "loop" },
 	{ "stream/loop", "loop" },
-	{ "stream/loop_restart_time", "loop_restart_time" },
+	{ "stream/loop_restart_time", "loop_offset" },
 	{ "stream/paused", "paused" },
 	{ "stream/paused", "paused" },
-	{ "stream/paused", "stream_paused" },
 	{ "stream/pitch_scale", "pitch_scale" },
 	{ "stream/pitch_scale", "pitch_scale" },
 	{ "stream/play", "playing" },
 	{ "stream/play", "playing" },
 	{ "stream/stream", "stream" },
 	{ "stream/stream", "stream" },
-	{ "stream/tempo_scale", "tempo_scale" },
 	{ "stream/volume_db", "volume_db" },
 	{ "stream/volume_db", "volume_db" },
 	{ "suspension/max_force", "suspension_max_force" },
 	{ "suspension/max_force", "suspension_max_force" },
 	{ "suspension/stiffness", "suspension_stiffness" },
 	{ "suspension/stiffness", "suspension_stiffness" },
@@ -414,7 +374,7 @@ static const char *prop_renames[][2] = {
 	{ "texture/offset", "texture_offset" },
 	{ "texture/offset", "texture_offset" },
 	{ "texture/over", "texture_over" },
 	{ "texture/over", "texture_over" },
 	{ "texture/progress", "texture_progress" },
 	{ "texture/progress", "texture_progress" },
-	{ "texture/rotation", "texture_rotation" },
+	{ "texture/rotation", "texture_rotation_degrees" },
 	{ "texture/scale", "texture_scale" },
 	{ "texture/scale", "texture_scale" },
 	{ "textures/click_mask", "texture_click_mask" },
 	{ "textures/click_mask", "texture_click_mask" },
 	{ "textures/disabled", "texture_disabled" },
 	{ "textures/disabled", "texture_disabled" },
@@ -428,6 +388,7 @@ static const char *prop_renames[][2] = {
 	{ "transform/local", "transform" },
 	{ "transform/local", "transform" },
 	{ "transform/pos", "position" },
 	{ "transform/pos", "position" },
 	{ "transform/rotation", "rotation_degrees" },
 	{ "transform/rotation", "rotation_degrees" },
+	{ "transform/rotation_rad", "rotation" },
 	{ "transform/rot", "rotation_degrees" },
 	{ "transform/rot", "rotation_degrees" },
 	{ "transform/scale", "scale" },
 	{ "transform/scale", "scale" },
 	{ "transform/translation", "translation" },
 	{ "transform/translation", "translation" },
@@ -439,12 +400,13 @@ static const char *prop_renames[][2] = {
 	{ "visibility/light_mask", "light_mask" },
 	{ "visibility/light_mask", "light_mask" },
 	{ "visibility/on_top", "show_on_top" },
 	{ "visibility/on_top", "show_on_top" },
 	{ "visibility/visible", "visible" },
 	{ "visibility/visible", "visible" },
-	{ "wheel/friction_slip", "wheel_friction_sleep" },
+	{ "wheel/friction_slip", "wheel_friction_slip" },
 	{ "wheel/radius", "wheel_radius" },
 	{ "wheel/radius", "wheel_radius" },
 	{ "wheel/rest_length", "wheel_rest_length" },
 	{ "wheel/rest_length", "wheel_rest_length" },
+	{ "wheel/roll_influence", "wheel_roll_influence" },
 	{ "window/title", "window_title" },
 	{ "window/title", "window_title" },
 	{ "z/relative", "z_as_relative" },
 	{ "z/relative", "z_as_relative" },
-	{ "z/z", "z" },
+	{ "z/z", "z_index" },
 	{ NULL, NULL }
 	{ NULL, NULL }
 };
 };