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
4e0f31a6
Unverified
Commit
4e0f31a6
authored
Jun 18, 2020
by
Rémi Verschelde
Committed by
GitHub
Jun 18, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #39638 from mrushyendra/editor_preview
Fix editor texture preview for certain specific dimensions
parents
dfa5f88c
c7a8dc7b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
editor_preview_plugins.cpp
editor/plugins/editor_preview_plugins.cpp
+2
-1
No files found.
editor/plugins/editor_preview_plugins.cpp
View file @
4e0f31a6
...
@@ -127,7 +127,8 @@ Ref<Texture2D> EditorTexturePreviewPlugin::generate(const RES &p_from, const Siz
...
@@ -127,7 +127,8 @@ Ref<Texture2D> EditorTexturePreviewPlugin::generate(const RES &p_from, const Siz
if
(
new_size
.
y
>
p_size
.
y
)
{
if
(
new_size
.
y
>
p_size
.
y
)
{
new_size
=
Vector2
(
new_size
.
x
*
p_size
.
y
/
new_size
.
y
,
p_size
.
y
);
new_size
=
Vector2
(
new_size
.
x
*
p_size
.
y
/
new_size
.
y
,
p_size
.
y
);
}
}
img
->
resize
(
new_size
.
x
,
new_size
.
y
,
Image
::
INTERPOLATE_CUBIC
);
Vector2i
new_size_i
(
MAX
(
1
,
(
int
)
new_size
.
x
),
MAX
(
1
,
(
int
)
new_size
.
y
));
img
->
resize
(
new_size_i
.
x
,
new_size_i
.
y
,
Image
::
INTERPOLATE_CUBIC
);
post_process_preview
(
img
);
post_process_preview
(
img
);
...
...
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