Commit graph

244 commits

Author SHA1 Message Date
Rémi Verschelde
1f61d47766
Merge pull request #64339 from YuriSizov/core-multilevel-validate-property 2022-08-22 21:39:48 +02:00
Yuri Sizov
1a24c9e14b Make _validate_property a multilevel method 2022-08-22 18:35:11 +03:00
Aaron Franke
8893b2bdb4
Clean up mesh include code and comments 2022-08-20 13:24:40 -05:00
Max Hilbrunner
92bdeb7eb5 Unexpose ProxyTexture 2022-08-19 03:01:47 +02:00
Juan Linietsky
d4433ae6d3 Remove Signal connect binds
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind().
Changed all uses of it to Callable.bind()
2022-07-29 16:26:13 +02:00
Rémi Verschelde
0f6028378f
Merge pull request #63127 from KoBeWi/raise_from_picture 2022-07-20 22:34:05 +02:00
FireForge
84431bd782 Use integer types in Image and ImageTexture methods
- Image.blit_rect()
- Image.blit_rect_mask()
- Image.blend_rect()
- Image.blend_rect_mask()
- Image.fill_rect()
- Image.get_used_rect()
- Image.get_rect()
- ImageTexture.set_size_override()
2022-07-18 19:43:32 -05:00
kobewi
e8288ac9ab Clarify create_from_image() usage 2022-07-18 13:01:04 +02:00
Hendrik Brucker
655e2935cf Automatically create a Gradient resource when creating a GradientTexture1D 2022-07-17 04:04:57 +02:00
kobewi
d2900429e8 Add static methods for creating Image and ImageTexture 2022-07-08 13:40:47 +02:00
Dylan Conway
78ca147c8a Changed valid check to null check, added error messages 2022-07-07 11:11:47 -07:00
FireForge
4678736a39 Add suffixes to all nodes and resources 2022-06-11 09:41:05 -05:00
Kamay Xutax
d8f1ee66d7 Fix for ImageTexture imported
Someone apparently forgot to return true ...
on ImageTexture::_set/_get
2022-06-09 00:08:07 +02:00
kobewi
80025171cd Re-add internal image field to ImageTexture 2022-06-08 00:57:03 +02:00
kobewi
c519a667ad Remove image property of ImageTexture 2022-06-07 16:30:54 +02:00
kobewi
855a1ff61f Increase maximum size of gradient textures 2022-06-05 18:20:26 +02:00
Haoyu Qiu
fc3b845c07 Add dedicated macros for property name extraction
* Replace case-by-case extraction with PNAME & GNAME
* Fix group handling when group hint begins with property name
* Exclude properties that are PROPERTY_USAGE_NO_EDITOR
* Extract missing ADD_ARRAY*, ADD_SUBGROUP* macros
2022-05-19 14:08:47 +08:00
Rémi Verschelde
b239275989
Merge pull request #60583 from reduz/placeholder-assets 2022-05-03 16:43:13 +02:00
Rémi Verschelde
931838b330
Merge pull request #60627 from aaronfranke/rename-elements
Rename Transform2D and Basis `elements` to `columns` and `rows` respectively
2022-05-03 14:40:01 +02:00
Hugo Locurcio
180e5d3028
Remove RES and REF typedefs in favor of spelled out Ref<>
These typedefs don't save much typing compared to the full `Ref<Resource>`
and `Ref<RefCounted>`, yet they sometimes introduce confusion among
new contributors.
2022-05-03 01:43:50 +02:00
Aaron Franke
b831fb0a54
Rename Transform2D "elements" to "columns" 2022-04-29 08:02:39 -05:00
reduz
b02c7387c7 Implement placeholder assets
* Placeholder textures
* Placeholder meshes
* Placeholder material

This PR is the first step towards implementing https://github.com/godotengine/godot-proposals/issues/2756
It adds an asset type that uses no resources, which can be used to replace the existing ones on export for using on the upcoming server export.
2022-04-28 12:19:01 +02:00
Hendrik Brucker
39a4036aa2 Fix GradientTexture2D update after setting the gradient 2022-04-19 19:51:49 +02:00
bruvzg
9381acb6a4
Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03:00
Rémi Verschelde
b78aa4fe19 Style: Apply clang-tidy to current code, add readability-redundant-member-init 2022-04-04 21:49:51 +02:00
reduz
45f74ceb85 Add PortableCompressedTexture
* Resource that allows saving textures embedded in scenes or standalone.
* Supports only formats that are portable: Lossy, Lossles or BasisUniversal

This is something I wanted to add for a long time. I made it now because @fire
requires it for importing GLTF2 files with embedded textures, but also this
will allow saving Godot scenes as standalone binary files that will run
in all platforms (because textures will load everywhere).

This is ideal when you want to distribute individual standalone assets online
in games that can be built from Godot scenes.
2022-03-30 10:39:41 +02:00
Bastiaan Olij
57e5a33623 Split dummy renderer classes into separate files
Split canvas_texture_storage and texture_storage from render_storage class
2022-03-16 17:43:10 +11:00
Rémi Verschelde
af9a60d5b3
Merge pull request #58965 from TechnoPorg/remove-stex-occurrences
Remove more occurrences of "stex"
2022-03-11 08:00:52 +01:00
TechnoPorg
f4bc9f5821 Remove more occurrences of "stex" 2022-03-10 18:31:48 -07:00
reduz
6f51eca1e3 Discern between virtual and abstract class bindings
* Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract".
* Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions.
* Converted a large amount of classes from "abstract" to "virtual" where it makes sense.

Most classes that make sense have been converted. Missing:

* Physics servers
* VideoStream
* Script* classes.

which will go in a separate PR due to the complexity involved.
2022-03-10 12:28:11 +01:00
reduz
ccd4cdfd8b Rename StreamTexture* to CompressedTexture*
* Its not and will not be used for streaming.
* Streaming will be implemented in 4.1 and it will work different.
* It makes more sense to be called CompressedTexture since it imports and compresses texture files.
2022-03-05 16:43:38 +01:00
jmb462
1ce81dc5f2 Add missing SNAME macro optimization in some function calls 2022-02-06 15:54:04 +01:00
Hugo Locurcio
34d382eab6
Clamp GradientTexture2D dimensions to 2048×2048 in the inspector
Larger sizes take up a lot of memory for little visual benefit.
They also take a while to initialize, which makes the inspector slow
to refresh when the texture needs to be regenerated.
2022-01-29 00:32:16 +01:00
kleonc
3f9e50505a Fix AtlasTexture nesting 2022-01-15 00:14:56 +01:00
Rémi Verschelde
fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Nathan Franke
49403cbfa0
Replace String comparisons with "", String() to is_empty()
Also:
- Adds two stress tests to test_string.h
- Changes to .empty() on std::strings
2021-12-09 04:48:38 -06:00
Yuri Roubinsky
4a32754e78
Merge pull request #54715 from goostengine/gradient-texture-1d-rename 2021-11-08 20:52:24 +03:00
Aaron Record
d3c3540329 Remove redundant texture flag setters/getters for CameraTexture 2021-11-07 12:35:10 -07:00
Andrii Doroshenko (Xrayez)
6742a338a8 Rename GradientTexture to GradientTexture1D
1. Explicit and unambiguous when comparing to `GradientTexture2D`
2. Consistent with other class names where 1D is used in the engine.
2021-11-07 15:11:04 +02:00
Haoyu Qiu
10818cfc10 Fix memory leak when using CurveTexture.set_texture_mode 2021-11-01 18:57:59 +08:00
Hendrik Brucker
cd37af4e4c Add GradientTexture2D
Co-authored-by: Mariano Javier Suligoy <marianognu.easyrpg@gmail.com>
Co-authored-by: Andrii Doroshenko <xrayez@gmail.com>
2021-10-12 16:22:30 +02:00
boruok
213612b44a Fix AtlasTexture get_data() crash 2021-09-30 22:30:05 +09:00
Rémi Verschelde
9556c3a30a
Merge pull request #53180 from boruok/4.0-fix-atlas-texture-return-null 2021-09-28 18:52:53 +02:00
boruok
2cc2adedaa 4.0 fix atlas texture return null 2021-09-28 23:54:47 +09:00
Haoyu Qiu
8cba772afc Remove unused ImageTexture functions
* `_resource_path_changed()` does nothing
* `_reload_hook()` has been unused since the beginning of GLES3 renderer
2021-09-14 10:04:26 +08:00
Hugo Locurcio
1d257d02db
Add an use_hdr property to GradientTexture to allow storing HDR colors
This is disabled by default to save some memory and preserve the existing
behavior of clamping colors.
2021-08-13 23:16:24 +02:00
bruvzg
8f70232a15 Add placeholder textures to ensure CameraTexture / CameraFeed always have valid RIDs. 2021-08-13 12:32:01 +03:00
Yuri Sizov
0ab661de63 Fix a crash when trying to load a WebP StreamTexture2D 2021-07-29 16:05:03 +03:00
reduz
6631f66c2a Optimize StringName usage
* Added a new macro SNAME() that constructs and caches a local stringname.
* Subsequent usages use the cached version.
* Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time.
* Replaced all theme usages by this new macro.
* Replace all signal emission usages by this new macro.
* Replace all call_deferred usages by this new macro.

This is part of ongoing work to optimize GUI and the editor.
2021-07-18 21:20:02 -03:00
Rémi Verschelde
536825d004
Rename Curve3Texture to CurveXYZTexture
Neither name is a perfect match but `Curve3Texture` looked too similar to
`CurveTexture` and `Curve3D`, which made things confusing when picking a
texture type or browsing the API reference.
2021-07-14 00:30:58 +02:00