Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
335faa10
Unverified
Commit
335faa10
authored
Jun 23, 2020
by
Rémi Verschelde
Committed by
GitHub
Jun 23, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #39773 from mrushyendra/uv_editor
Enable finer grained control when creating polygon with UV Editor
parents
3f4e39e6
69d0d892
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
polygon_2d_editor_plugin.cpp
editor/plugins/polygon_2d_editor_plugin.cpp
+2
-1
No files found.
editor/plugins/polygon_2d_editor_plugin.cpp
View file @
335faa10
...
...
@@ -485,7 +485,8 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
}
else
{
Vector2
tuv
=
mtx
.
affine_inverse
().
xform
(
snap_point
(
Vector2
(
mb
->
get_position
().
x
,
mb
->
get_position
().
y
)));
if
(
points_prev
.
size
()
>
2
&&
tuv
.
distance_to
(
points_prev
[
0
])
<
8
)
{
// Close the polygon if selected point is near start. Threshold for closing scaled by zoom level
if
(
points_prev
.
size
()
>
2
&&
tuv
.
distance_to
(
points_prev
[
0
])
<
(
8
/
uv_draw_zoom
))
{
undo_redo
->
create_action
(
TTR
(
"Create Polygon & UV"
));
undo_redo
->
add_do_method
(
node
,
"set_uv"
,
node
->
get_uv
());
undo_redo
->
add_undo_method
(
node
,
"set_uv"
,
uv_create_uv_prev
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment