summaryrefslogtreecommitdiff
path: root/editor/import
AgeCommit message (Collapse)Author
2021-09-30Use range iterators for `Map`Lightning_A
2021-09-27Auto LOD fixes and improvementsjfons
* Fixed LODs for shadow meshes. * Added a merging step before simplification. This helps with tesselated meshes that were previously left untouched. The angle difference at wich edges ar considered "hard" can be tweaked as an import setting. * LODs will now start with the highest decimation possible and keep doubling (approximately) the number of triangles from there. This makes sure that very low triangle counts are included when possible. * Given more weight to normal preservation. * Modified MeshOptimizer to report distance-based error instead of including attributes in the reported metrics. * Added attribute transference between the original mesh and the various LODs. Right now only normals are taken into account, but it could be expanded to other attributes in the future.
2021-09-23Construct values only when necessary.Anilforextra
2021-09-22Update Font advanced import dialog character ranges to Unicode 14. Fix ↵bruvzg
character range selector column number.
2021-09-21Merge pull request #52878 from AnilBK/add-get-centerRémi Verschelde
2021-09-21Add Get Center Method for Rect2/Rect2i and AABB.Anilforextra
2021-09-20Merge pull request #42103 from dankan1890/import_atlas_fixRémi Verschelde
2021-09-20Import: Disable thread import for OBJ meshesRémi Verschelde
This can currently lead to deadlocks, possibly due to some race condition in the Vulkan renderer. Works around #48265.
2021-09-16Merge pull request #52681 from nekomatata/rename-rigid-bodyCamille Mohr-Daurat
Rename RigidBody to RigidDynamicBody and SoftBody to SoftDynamicBody
2021-09-16Rename RigidBody to RigidDynamicBody and SoftBody to SoftDynamicBodyPouleyKetchoupp
2021-09-15Merge pull request #52679 from nekomatata/world-boundary-shapeCamille Mohr-Daurat
Rename WorldMarginShape to WorldBoundaryShape
2021-09-14Clean convex hull decomposition codePouleyKetchoupp
Remove unnecessary conversion between triangle data and vertex data whenever possible.
2021-09-14Rename WorldMarginShape to WorldBoundaryShapePouleyKetchoupp
2021-09-14Merge pull request #52266 from AndreaCatania/collRémi Verschelde
2021-09-108 uvs for glTF2, URI decode and Vertex Custom api.Lyuma
Add glTF2 uri decode for paths. Add vertex custom apis. Add scene importer api. Change Color to float; add support for float-based custom channels in SurfaceTool and EditorSceneImporterMesh Co-authored-by: darth negative hunter <thenegativehunter2@users.noreply.github.com>
2021-09-08Improve collision generation usability in the new 3D scene import workflow.AndreaCatania
With this PR it's possible to add a collision during the Mesh import, directly in editor. To generate the shape is possible to chose between the following options: - Decompose Convex: The Mesh is decomposed in one or many Convex Shapes (Using the VHACD library). - Simple Convex: Is generated a convex shape that enclose the entire mesh. - Trimesh: Generate a trimesh shape using the Mesh faces. - Box: Add a primitive box shape, where you can tweak the `size`, `position`, `rotation`. - Sphere: Add a primitive sphere shape, where you can tweak the `radius`, `position`, `rotation`. - Cylinder: Add a primitive cylinder shape, where you can tweak the `height`, `radius`, `position`, `rotation`. - Capsule: Add a primitive capsule shape, where you can tweak the `height`, `radius`, `position`, `rotation`. It's also possible to chose the generated body, so you can create: - Rigid Body - Static Body - Area
2021-09-06Explicitly convert signed to unsigned valueKirill Diduk
2021-08-29Rename String::is_rel_path to String::is_relative_pathWilson E. Alvarez
2021-08-27Merge pull request #51908 from bruvzg/msdf_fonts2K. S. Ernest (iFire) Lee
Make FontData importable resource. Add multi-channel SDF font rendering.
2021-08-27Makes FontData importable resource.bruvzg
Adds multi-channel SDF font texture generation and rendering support. Adds per-font oversampling support. Adds FontData import plugins (for dynamic fonts, BMFonts and monospaced image fonts), font texture cache pre-generation and loading. Adds BMFont binary format and outline support.
2021-08-24Rename RayShape to SeparationRayShapePouleyKetchoupp
Makes it clearer that it's used for special cases when picking a collision shape.
2021-08-24Restore RayShape as a regular shape typePouleyKetchoupp
Partial revert from previously removing ray shapes completely, added back as a shape type but without the specific character controller code.
2021-08-22Implement set_surface_material and set_surface_name methods in ↵Lyuma
EditorSceneImporterMesh, and add documentation.
2021-08-22Replace BIND_VMETHOD by new GDVIRTUAL syntaxreduz
* New syntax is type safe. * New syntax allows for type safe virtuals in native extensions. * New syntax permits extremely fast calling. Note: Everything was replaced where possible except for `_gui_input` `_input` and `_unhandled_input`. These will require API rework on a separate PR as they work different than the rest of the functions. Added a new method flag METHOD_FLAG_OBJECT_CORE, used internally. Allows to not dump the core virtuals like `_notification` to the json API, since each language will implement those as it is best fits.
2021-08-19Merge pull request #48560 from SaracenOne/collada_semantic_fix_4_0Rémi Verschelde
2021-08-13Fix duplicate conditions.Anilforextra
2021-08-10Remove infinite inertia and ray shapes from CharacterBodyPouleyKetchoupp
Infinite inertia: Not needed anymore, since it's now possible to set one-directional collision layers in order for characters to ignore rigid bodies, while rigid bodies still collide with characters. Ray shapes: They were introduced as a work around to allow constant speed on slopes, which is now possible with the new property in CharacterBody instead.
2021-08-09Some work on double supportAaron Franke
2021-08-05Make animation reset do less spam.K. S. Ernest (iFire) Lee
2021-08-05Merge pull request #51285 from V-Sekai/reset-anim-spamK. S. Ernest (iFire) Lee
Reset baking should not spam on lack of animation players.
2021-08-05Merge pull request #50797 from AndreaCatania/AndreaCatania-patch-4K. S. Ernest (iFire) Lee
Fix Static & Rigid body generation on mesh import.
2021-08-05Reset baking should not spam on lack of animation players.K. S. Ernest (iFire) Lee
2021-07-30Bake RESET animation.K. S. Ernest (iFire) Lee
Co-authored-by: MMMaellon <mmmaellon@gmail.com> Co-authored-by: Eron <rufsketch1@gmail.com>
2021-07-26Use Ref<T> references as iterators where relevantRémi Verschelde
And const when possible.
2021-07-25Use const references where possible for List range iteratorsRémi Verschelde
2021-07-24Fix scene import following List iterator changesAaron Franke
2021-07-24Fix Static & Rigid body generation on mesh import.Andrea Catania
The function `_gen_shape_list` is using the resource `Res<Mesh>`, but during the import phase the resource used is instead `Ref<EditorSceneImporterMesh>`. Note: the `Ref<EditorSceneImporterMesh>` is an intermediate resource, that will be used to create a `Res<Mesh>` at the end of the import process. `Ref<EditorSceneImporterMesh>` and `Ref<Mesh>` are not inheriting each other, so the internal cast done by `Ref<>` during the assignment, is always null: ```c++ Ref<EditorSceneImporterMesh> import_mesh(/* Assume it's initialized */); CRASH_NOW(import_mesh.is_null()); Ref<Mesh> mesh = import_mesh; CRASH_NOW(mesh.is_null()); // <--- Here we have a crash, since it's impossible perform the above cast, and the `mesh` is always null. ``` Here the full list of call to `_gen_shape_list`, where we can notice that a `Ref<EditorSceneImporterMesh>` is passed: - https://github.com/AndreaCatania/godot/blob/master/editor/import/resource_importer_scene.cpp#L428 - https://github.com/AndreaCatania/godot/blob/master/editor/import/resource_importer_scene.cpp#L454-L458 - https://github.com/AndreaCatania/godot/blob/master/editor/import/resource_importer_scene.cpp#L512-L516 As you can notice, we always pass the following mesh: `Ref<EditorSceneImporterMesh> mesh = mi->get_mesh();`. We already have the function `_pre_gen_shape_list` that executes the exact same job but using the correct type; Since there is no further usage of the function `_gen_shape_list` in the code base, I think it's just some leftover code, so I removed it entirely to use the proper function.
2021-07-23Use C++ iterators for Lists in many situationsAaron Franke
2021-07-23Expose an ImportOrder enum in ResourceImporterHugo Locurcio
This avoids using magic numbers in code.
2021-07-18Optimize StringName usagereduz
* 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-07Options to clean/simplify convex hull generated from meshPouleyKetchoupp
Clean: remove duplicate and interior vertices (uses Bullet algorithm) Simplify: modify the geometry for further simplification (uses VHACD algorithm) In the editor, single convex hull now uses the clean option. Added a new editor entry to create a simplified convex hull, can be useful for creating convex hull from highly tessellated triangle meshes.
2021-06-30Fix editor suffixes and degrees conversionreduz
* Functions to convert to/from degrees are all gone. Conversion is done by the editor. * Use PROPERTY_HINT_ANGLE instead of PROPERTY_HINT_RANGE to edit radian angles in degrees. * Added possibility to add suffixes to range properties, use "min,max[,step][,suffix:<something>]" example "0,100,1,suffix:m" * In general, can add suffixes for EditorSpinSlider Not covered by this PR, will have to be addressed by future ones: * Ability to switch radians/degrees in the inspector for angle properties (if actually wanted). * Animations previously made will most likely break, need to add a way to make old ones compatible. * Only added a "px" suffix to 2D position and a "m" one to 3D position, someone needs to go through the rest of the engine and add all remaining suffixes. * Likely also need to track down usage of EditorSpinSlider outside properties to add suffixes to it too.
2021-06-28Implement Tree's internal minimum width calculationGilles Roudière
2021-06-20Fix for LOD is broken 49706K. S. Ernest (iFire) Lee
2021-06-20Merge pull request #49754 from aaronfranke/is-eq-approx-sub-optRémi Verschelde
Fix sub-optimal uses of is_equal_approx
2021-06-20Fix sub-optimal uses of is_equal_approxAaron Franke
2021-06-19Rename `instance()`->`instantiate()` when it's a verbLightning_A
2021-06-16ERR_FAIL_NULL check file accessK. S. Ernest (iFire) Lee
Null in ResourceImporterTexture::_save_stex
2021-06-14Merge pull request #49458 from JFonS/fix_unwrap_xformRémi Verschelde
Rename get_parent_spatial() to get_parent_node_3d()
2021-06-14Rename get_parent_spatial() to get_parent_node3d()jfons
Renames get_parent_spatial() to get_parent_node3d() and changes its implementation. Before it was not returning a correct pointer if the node wasn't added to a SceneTree. Now it uses the same implementation as CanvasItem, which will be correct even for nodes outside a SceneTree.