Commit Graph

234 Commits

Author SHA1 Message Date
Rémi Verschelde 3a2ca68af3 SCons: Build thirdparty code in own env, disable warnings
Also remove unnecessary `Export('env')` in other SCsubs,
Export should only be used when exporting *new* objects.
2018-09-28 14:07:39 +02:00
Rémi Verschelde cdc411fd54 Fix various warnings: [-Waddress], [-Wpointer-arith], [-Wwrite-strings], [-Wreturn-local-addr] and more
Fixes the following GCC 5 warnings:
```
core/os/file_access.cpp:49:19: warning: the address of 'FileAccess::create_func' will always evaluate as 'true' [-Waddress]
servers/audio_server.cpp:192:70: warning: comparison with string literal results in unspecified behaviour [-Waddress]

drivers/gles2/rasterizer_storage_gles2.cpp:4095:90: warning: NULL used in arithmetic [-Wpointer-arith]

modules/gdnative/register_types.cpp:237:3: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
platform/android/export/export.cpp:207:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

modules/gdscript/gdscript.h:150:67: warning: returning reference to temporary [-Wreturn-local-addr]
servers/physics_2d/collision_object_2d_sw.h:119:56: warning: returning reference to temporary [-Wreturn-local-addr]
servers/physics_2d/collision_object_2d_sw.h:123:56: warning: returning reference to temporary [-Wreturn-local-addr]
servers/physics_2d/collision_object_2d_sw.h:127:50: warning: returning reference to temporary [-Wreturn-local-addr]
servers/physics_2d/collision_object_2d_sw.h:131:52: warning: returning reference to temporary [-Wreturn-local-addr]

editor/plugins/skeleton_editor_plugin.cpp:34:36: warning: extra tokens at end of #include directive
modules/bullet/bullet_types_converter.cpp:31:9: warning: #pragma once in main file

editor/import/editor_scene_importer_gltf.cpp:1996:51: warning: name lookup of 'i' changed
modules/visual_script/visual_script_property_selector.cpp:402:45: warning: name lookup of 'E' changed
scene/gui/tree.cpp:1268:25: warning: name lookup of 'i' changed
scene/resources/visual_shader.cpp:808:32: warning: name lookup of 'i' changed
```
2018-09-27 16:33:52 +02:00
cyclopsian 45ba58c123 Check for absolute paths in OBJ loader 2018-09-16 22:23:40 -04:00
Rémi Verschelde 1a16dabfb5
Merge pull request #21982 from luzpaz/misc-typos
Misc. typos
2018-09-13 10:59:00 +02:00
luz.paz 08bde5b2de Misc. typos
Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
2018-09-12 21:39:17 -04:00
Rémi Verschelde cc5ab22204
Merge pull request #21935 from goodyttoor/gltf_cubic
Fix cubic spline interpolation in glTF importer
2018-09-12 14:12:32 +02:00
Rémi Verschelde 277b24dfb7 Make core/ includes absolute, remove subfolders from include path
This allows more consistency in the manner we include core headers,
where previously there would be a mix of absolute, relative and
include path-dependent includes.
2018-09-12 09:52:22 +02:00
Vivatchai Kaveeta 463ead1eb7 Fix cubic spline interpolation in glTF importer
Should solve #21001 #14636
2018-09-10 20:02:39 +07:00
Guilherme Felipe 4356af2a68 [Texture Import] Fix invert color 2018-09-02 11:35:48 -03:00
Rémi Verschelde 9eb4d4ab2d Add missing copyright headers 2018-08-29 22:41:17 +02:00
elasota 084cbdefa2 Fix BPTC and fix importing HDR images with LDR compression 2018-08-27 23:05:04 -04:00
K. S. Ernest (iFire) Lee fa62037ff6 In the GLTF importer normalize Quaternions after every operation and when reading from the format. 2018-08-27 14:59:28 -07:00
Juan Linietsky 0565adb20f Removed fallback system and merged bptc into s3tc 2018-08-27 13:47:35 -03:00
elasota 02d3d4c2ce Fix crash when importing layered textures 2018-08-26 20:21:27 -04:00
Rémi Verschelde 52466d57e9 Make some debug prints verbose-only, remove others 2018-08-24 14:59:01 +02:00
elasota 7ad1ca525e Hide "no BPTC if RGB" and "HDR Mode" options when not using "Video RAM" import. 2018-08-22 18:31:12 -04:00
elasota 35f6ba5c5d BPTC support 2018-08-21 22:56:04 -04:00
Poommetee Ketson ec68822cd7 Fix crash while importing corrupted wav
Line 199 does division with 'bits per sample' but the check for
0 is missing.
2018-08-21 02:06:22 +07:00
Guilherme Felipe 72104161db [Texture Importer] Add option to invert color 2018-08-17 13:55:33 -03:00
Juan Linietsky 5b70ad9d34 Respect process order for out of order skeleton bones (fixes GLTF2 import issues). 2018-08-06 22:35:09 -03:00
Juan Linietsky 00c573c255 Several fixes to GLTF2 importer 2018-08-06 18:41:37 -03:00
Juan Linietsky edde52c8de Added proper import support for 3D and Array textures 2018-08-06 14:56:06 -03:00
Juan Linietsky 5a5614e8ad Add support for line continuations (wtf) in obj format, fixes #7974 2018-07-29 21:37:55 -03:00
Juan Linietsky 317dee95de It is now possible to import images as a separate resource, closes #5738 and likely many others 2018-07-29 16:45:23 -03:00
Rémi Verschelde 91d6fa817e
Merge pull request #15967 from Gamblify/AudioRecordingModule
Audio Recording from godot
2018-07-26 15:37:19 +02:00
Gustav Lund cd2070c684 Audio Recording module
Implements an Audio bus effect that outputs the audio from the bus into a wav file

Now channels audio recording into an AudioStreamSample instead of saving to wav
2018-07-26 14:14:29 +02:00
Hein-Pieter van Braam 0e29f7974b Reduce unnecessary COW on Vector by make writing explicit
This commit makes operator[] on Vector const and adds a write proxy to it.  From
now on writes to Vectors need to happen through the .write proxy. So for
instance:

Vector<int> vec;
vec.push_back(10);
std::cout << vec[0] << std::endl;
vec.write[0] = 20;

Failing to use the .write proxy will cause a compilation error.

In addition COWable datatypes can now embed a CowData pointer to their data.
This means that String, CharString, and VMap no longer use or derive from
Vector.

_ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug
builds. This is a lot faster for Vector in the editor and while running tests.
The reason why this difference used to exist is because force-inlined methods
used to give a bad debugging experience. After extensive testing with modern
compilers this is no longer the case.
2018-07-26 00:54:16 +02:00
K. S. Ernest (iFire) Lee ac541f5d16 Bones are now named and their parents are correct. 2018-07-24 15:29:53 -07:00
Max Hilbrunner 43a2e9e669
Merge pull request #15881 from dertom95/EditorScenePostImport
EditorScenePostImport: added get_source_folder() and get_source_file(…
2018-07-05 02:27:26 +02:00
Juan Linietsky e179bf0726 Ensure, if a texture meant for a normal map is imported and size limit exists, that it's renormalized after resize. 2018-07-03 10:56:31 -03:00
Juan Linietsky c02d8be59d further fixes to tag detection on importer 2018-07-02 05:54:58 -03:00
Juan Linietsky beebd0b9de Add a condition to detect duplicates objects, so cases like object-col.323, common in blender, is still detected as collision. 2018-07-02 02:02:32 -03:00
Juan Linietsky 896e250f2b -Fix in animationplayback, sound would be cut on loop
-Fix on scene importer, keeping changes to animation tracks was not working
2018-07-01 17:45:19 -03:00
Juan Linietsky b3627e29f0 -Fixes to OBJ importer, option to disable optimization
-Fixes to script language, PlaceHolder can now get and check methods
2018-06-30 19:59:16 -03:00
Juan Linietsky ad4666f8e0
Merge pull request #19193 from tagcup/quat_norm
Fixed Basis -> Quat conversions, added a few safety checks.
2018-06-25 10:58:04 -03:00
Rodolfo Ribeiro Gomes 01b01209a3 fix default glTF metallic & roughness factor values
The glTF 2.0 spec says that these pbrMetallicRoughness material
properties should be set as 1.0 by default.
In fact, KhronosGroup's official Blender Exporter does not even write
down those parameters if they are set as 1.0.

However, Godot import them as 0.0.

https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#pbrmetallicroughness

Fixes: #19613 https://github.com/godotengine/godot/issues/19613
2018-06-21 00:00:58 -03:00
Pedro J. Estébanez 4810eae03b Import morph target names from glTF
If mesh.extras.targetNames is available. Keep the former naming pattern as fallback.
2018-06-14 00:25:22 +02:00
Thomas Trocha 48e3ff0c8a EditorScenePostImport: added get_source_folder() and get_source_file() methods 2018-05-31 03:23:42 +02:00
tagcup 9d41161596 Fixed Basis -> Quat conversions, added a few safety checks.
Fixes #19027.
2018-05-27 14:15:47 -04:00
volzhs 9d5e1228ea Fix updating mesh when reimporting 2018-05-22 19:58:28 +09:00
Guilherme Felipe 35024d4e7b Add missing copyright headers 2018-05-16 14:50:44 -03:00
Yaakuro 9a50a4442d Use mimetype according to glTF spec. 2018-05-10 23:21:05 +02:00
Juan Linietsky 6244b9e2e1 Add option to renormalize mipmaps when generating them for normalmaps.
Reduces some aliasing.
2018-04-29 21:52:21 -03:00
Hugo Locurcio 1c419531a0 Change ".." punctuation for "..." in editor strings (#16507) 2018-04-22 19:36:01 +02:00
Juan Linietsky b67bfa3328
Merge pull request #16297 from lpn/master
Fixed wave file importer's broken resampling.
2018-04-08 18:41:46 -03:00
Juan Linietsky 829c455a48
Merge pull request #17840 from Dimonasdf/master
Fix Collada material roughness import function
2018-04-07 16:19:11 -03:00
Pedro J. Estébanez d8765dd103 Fix skeleton import from glTF
For some glTF files, the order of bones in the skeleton array wasn't matching the joints array in the meshes.

Fixes #17808.
2018-04-06 22:22:59 +02:00
Dmitriy Romanov 0812468d05
Fix Collada material roughness import function 4
Made import conversion linear.
2018-04-03 22:05:13 +03:00
Dmitriy Romanov 0e844f6c91 Fix Collada material roughness import function 3
Improved readability and further tweaking of function
2018-03-31 13:44:46 +03:00
Dmitriy Romanov 3b29e85257
Fix Collada material roughness import function 2
Fix minus space.
2018-03-29 12:47:24 +03:00
Dmitriy Romanov 89f4e71679
Fix Collada material roughness import function
Fixes NaN roughness in Godot when hardness in Blender is set to more than 255.
Also corrects dependency: more hardness = more roughness (it says shininess, but it actually is hardness).
2018-03-28 18:54:33 +03:00
Pedro J. Estébanez 1f26da0ad1 Fix animation length from glTF not correctly set 2018-03-19 00:27:14 +01:00
Pedro J. Estébanez adbe749513 Fix glTF not accepting VEC3 colors
Aside from the colors themselves, the rejection was adding somes issues later in the mesh import process.
2018-03-19 00:27:14 +01:00
luz.paz 612ab4bbc6 Fix typos with codespell
Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt`
Whitelist consists of:
```
ang
doubleclick
lod
nd
que
te
unselect
```
2018-02-21 19:46:06 +01:00
Florian Zwoch 1abf464b59 gltf: improve embedded data discovery
Some editors seems to use the image resource's mime type (e.g. "image/png") for data embedded uris instead of "application/octet-stream".
2018-02-21 12:18:52 +01:00
Rémi Verschelde 691d5d807c
Merge pull request #16583 from ShyRed/obj-import-scale
Add import option "scale_mesh" to obj file importer
2018-02-19 20:55:23 +01:00
George Marques 95f7879923
Fix infinite recursion with editor import plugins 2018-02-18 16:24:50 -03:00
George Marques c68948fdfa
Expose priority and order for custom import plugins 2018-02-13 11:59:56 -02:00
ShyRed 291c1d0f45 Add import option "scale_mesh" to obj file importer
The new import option "scale_mesh" allows setting a scale that is applied to the mesh's vertices during import.
2018-02-12 11:36:40 +01:00
L. Nikko 51d0f630d9 Fixed wave file importer's broken resampling. 2018-02-02 00:12:36 +02:00
Juan Linietsky 1322ca6fb2 Ability to import .escn files, which is just a .tscn but with forced import.
This works together with the new Blender to Godot exporter.
2018-01-30 11:04:22 -03:00
Rémi Verschelde 9f479f096c Fix typos in code and docs with codespell
Using v1.11.0 from https://github.com/lucasdemarchi/codespell
2018-01-18 22:01:42 +01:00
Rémi Verschelde 0edca99361
Merge pull request #15377 from mrcdk/wav_correct_loop
Fixed loop mode values when importing a wav file.
2018-01-08 14:52:19 +01:00
Poommetee Ketson 3c6dfbfea5 Fix imported BitMap dimension flip 2018-01-08 16:43:47 +07:00
Juan Linietsky 50b975548d Removed PBM bitmap loader, added abiliy to importi mages as bitmap. Fixes #14828 2018-01-06 16:38:36 -03:00
MrCdK 864b064def Fixed loop mode values when importing a wav file.
Importing a wav file that was exported with a custom loop type was causing it being imported with loop mode ping-pong
2018-01-05 22:29:37 +01:00
Juan Linietsky bb2341e813 Make sure .import folder exists before importing, in case user deleted it manually. Fixes #15315 2018-01-05 17:30:29 -03:00
Juan Linietsky 380ee87e80 Fixed problem with missing uninitialized last byte on waveform trip, closes #15316 2018-01-05 16:28:08 -03:00
Juan Linietsky a8a3d5c835 Fixes to GLTF2 importer skeleton positioning, though vertex bone indices still look broken somehow.. 2018-01-05 09:53:40 -03:00
Rémi Verschelde e4213e66b2 Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
Rémi Verschelde b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Juan Linietsky f11a138505 Added more hacks to GLTF2 importer to support crap exporter (MakeHuman in this case), fixes #13393 2017-12-28 16:07:45 -03:00
Juan Linietsky 3de20641f5 Property install export templates when downloaded from http
added a scale parameter for scene import
2017-12-17 15:48:24 -03:00
Juan Linietsky fa8a1fc420 Fixes how transform is applied to geometry in UV unwrap 2017-12-17 12:04:54 -03:00
Rémi Verschelde 8f25a2dc11 Cleanup some #if 0'd code 2017-12-17 15:40:24 +01:00
Juan Linietsky f3ad14224e -Add lightmapper
-Fixes to unwrapper (remove degenerates), makes Thekla not crash
-Added optional cancel button in EditorProgress
-Added function to force processing of events (needed for cancel button)
2017-12-14 09:01:27 -03:00
Rémi Verschelde a845411454 Style: Re-apply clang-format over recent invalid additions 2017-12-10 01:27:02 +01:00
Rémi Verschelde 58e8da57de
Merge pull request #14479 from Web-eWorks/gltf-fixes
Fix importing GLTF meshes as external files.
2017-12-10 00:13:01 +01:00
Webster Sheets 74b68d2e71 Fix importing GLTF meshes as external files. 2017-12-09 17:40:48 -05:00
Juan Linietsky 65fb961b8b -Ability to and unwrap lightmap coordinates on import
-Added unwrap functionality to Mesh
-Ability to display and debug mesh UVs
-Added multiline draw, so it's easier and faster to draw UVs
-Many fixes to SurfaceTool
-Fixes to Thekla Unwrap, but it's a piece of ass and it keeps crashing. Will have to go away
2017-12-09 14:18:14 -03:00
Juan Linietsky 209cb3830c Exposed EditorSceneImporter to script. Added APIs to use intermediate converters more easily. 2017-12-07 15:44:20 -03:00
Juan Linietsky 5614902611 ability to keep user tracks when importing animations, closes #12801 2017-12-07 10:19:35 -03:00
Rémi Verschelde 13c2ff9320 Style: Apply new clang-format 5.0 style to all files 2017-12-07 08:02:00 +01:00
Juan Linietsky 9738ebcda0 -Fixed height fog (was broken)
-Make sure materials are named in OBJ importer, so they can be saved outside as resources.
2017-11-25 12:32:41 -03:00
Juan Linietsky 66a8a07c2c Add importer option to make meshes bakeable by default. 2017-11-25 01:29:35 -03:00
Juan Linietsky bc2e8d99e5 Made Vector::ptrw explicit for writing, compiler was sometimes using the wrong function,
leading to unnecesary copy on writes and reduced performance.
2017-11-25 00:09:40 -03:00
Rémi Verschelde 91349290dc
Merge pull request #12717 from NathanWarden/material_import_fix
Fixed a bug where materials and/or meshes weren't assigned to scene on first import.
2017-11-20 09:13:36 +01:00
Daniel J. Ramirez 5e56366eba Fix import obj as scene. 2017-11-19 13:51:05 -06:00
Ferenc Arn d28763a4c1 Rename Rect3 to AABB.
Fixes #12973.
2017-11-17 11:01:41 -05:00
Rémi Verschelde 2070b80fc0
Merge pull request #12966 from SaracenOne/convcol
Added 'convcol' flag for importing meshes as convex collision
2017-11-16 16:38:38 +01:00
Saracen f8a95499bd Added 'convcol' flag for importing meshes as convex collision and completed code
for parsing collision flags to mesh data.
2017-11-16 13:06:30 +00:00
Webster Sheets 05dce362d5 Fix for #12056, though GTLF import of that file is still incorrect. 2017-11-12 23:47:51 -05:00
Nathan Warden 400db80d25 Fixed a bug where materials weren't assigned to scene on first import. 2017-11-07 00:06:11 -05:00
Saracen ef90965883 Restores functionality of the use_compression flag in the Collada importer. 2017-11-01 00:01:24 +00:00
Rémi Verschelde 6361e24f29 Cleanup unnecessary debug prints 2017-10-21 20:41:07 +02:00
Juan Linietsky f494470005 Restored ability to import OBJ files as meshes directly. Finally closes #9445. 2017-09-29 20:38:27 -03:00
Leon Krause 0899b5029c Correct spelling SEPERATE -> SEPARATE to fix build 2017-09-21 03:29:26 +02:00
Juan Linietsky 423ca9bcaf Fix import order, so scenes are imported after textures.
Also fix bugs when meshes are always generated.
2017-09-20 21:04:20 -03:00
letheed 5ad9be4c24 Rename pos to position in user facing methods and variables
Rename user facing methods and variables as well as the corresponding
C++ methods according to the folloming changes:

* pos -> position
* rot -> rotation
* loc -> location

C++ variables are left as is.
2017-09-20 13:11:10 +02:00
Indah Sylvia 13b630eb0c Fixed Typo: 'Seperate' to 'Separate' 2017-09-19 15:51:00 +07:00