Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bind many more properties to scripts #15611

Merged
merged 2 commits into from Jan 12, 2018

Conversation

bojidar-bg
Copy link
Contributor

@bojidar-bg bojidar-bg commented Jan 11, 2018

Notable potentially breaking changes:

  • PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL
  • Some properties were renamed, and sometimes even shadowed by new ones
  • New getter methods (some virtual) were added

Some notes I did while doing this:

  • AnimationPlayer.playback/play became AnimationPlayer.current_animation, with a backward-compatibility fallback. I think I tested this part, but slight bugs are possible.
  • Node.filename, Node.name and Node.owner might generate some GDScript errors about shadowing.
  • ScrollContainer.h_scroll and ScrollContainer.v_scroll are now scroll_horizontal_enabled and scroll_vertical_enabled.
  • CanvasLayer.rotation and Polygon2D.texture_rotation were in degrees, while the new property is in radians. Likely to break a few projects.
  • I couldn't really test Control.default_cursor_shape on linux.
  • Used OS.window_borderless instead of OS.borderless_window, so we might add a group at a later point.
  • Unbound TextEdit.set_max_chars, but added potential bindings for later on, since it wasn't used anywhere. Now I see there is an issue for set_wrap as well, might unbind it as well...
  • OS.window_title, Physics{,2D}ShapeQueryParameters.shape and Viewport.attach_to_screen_rect lack getters, so I didn't bind them.
  • Added a setter for VehicleBody.linear_velocity, hopefully it works. All the while someone made it extend RigidBody.

While reviewing, please pay attention to the usage of the properties. It should not be PROPERTY_USAGE_NOEDITOR or DEFAULT for properties that are not supposed to be saved to disk.

Notable potentially breaking changes:
- PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL
- Some properties were renamed, and sometimes even shadowed by new ones
- New getter methods (some virtual) were added
[ci skip]
@akien-mga akien-mga added this to the 3.0 milestone Jan 11, 2018
@akien-mga
Copy link
Member

Let's test in production™ and see what breaks :) This is quite important for 3.0 to have a consistent API.

@akien-mga akien-mga merged commit e24f2c6 into godotengine:master Jan 12, 2018
@@ -29,9 +29,6 @@
<member name="Geometry" type="Geometry" setter="" getter="">
[Geometry] singleton
</member>
<member name="GodotSharp" type="GodotSharp" setter="" getter="">
[GodotSharp] singleton
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how those happened, I just ran doctool a few times.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only the mono build outputs this GodotSharp singleton. For the other issue, not sure.

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm.. (bis)

akien-mga added a commit that referenced this pull request Jan 12, 2018
akien-mga added a commit to godotengine/godot-docs that referenced this pull request Jan 12, 2018
@bojidar-bg bojidar-bg mentioned this pull request Jan 12, 2018
31 tasks
dploeger added a commit to dploeger/godot-migrationnotes that referenced this pull request Jan 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants