-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
offsetx and offsety methods added to Python plugins api #3073
Conversation
(what was I thinking??? :| )
Previously, holding either Ctrl or Ctrl+Shift while in either "Snap to Grid" mode or in "Snap to Fine Grid" mode would turn off snapping entirely. Now only Ctrl turns off snapping entirely, but Ctrl+Shift toggles between snapping to the grid or to the fine grid.
Yeah, I don't think you can do anything about this on GitHub. In your local repository, you'd need to rebase your last change onto my latest master branch, which already contains the other commits (but merged together as 10c943f). Once rebased, you can force-push to your |
src/plugins/python/tiledbinding.py
Outdated
@@ -331,6 +331,8 @@ def _decorate(obj, *args, **kwargs): | |||
cls_layer.add_method('asObjectGroup', retval('Tiled::ObjectGroup*',reference_existing_object=True), []) | |||
cls_layer.add_method('asImageLayer', retval('Tiled::ImageLayer*',reference_existing_object=True), []) | |||
cls_layer.add_method('asGroupLayer', retval('Tiled::GroupLayer*',reference_existing_object=True), []) | |||
cls_layer.add_method('offsetx', 'double', []) | |||
cls_layer.add_method('offsety', 'double', []) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change as such is insufficient. You'll need to actually run the tiledbinding.py
script to update the pythonbind.cpp
file.
In addition, the Layer
class does not have offsetx
and offsety
methods. It has QPointF offset() const;
. Probably what we need to add here is cls_layer.add_method('offset', 'QPointF', [])
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. I thought the build process would regenerate that file for me
Please cancel this, I'll see if I can do better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've pushed the necessary changes.
Next time, just be sure to base your changes on the latest Thanks for your help with this addition! |
I'm learning. One day I'll open a proper PR, hopefully 😅 |
(not sure why this PR contains all previous commits, it seems I can't cherry pick here)