summaryrefslogtreecommitdiffstats
path: root/scene/3d/mesh_instance_3d.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fixed surface material overrides are not applied when the new mesh is setNong Van Tinh2022-08-301-1/+8
|
* Add dedicated macros for property name extractionHaoyu Qiu2022-05-191-1/+1
| | | | | | | * 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
* Replace most uses of Map by HashMapreduz2022-05-161-4/+4
| | | | | | | | | | | | * Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
* Discern between virtual and abstract class bindingsreduz2022-03-101-12/+0
| | | | | | | | | | | | | | * 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.
* Use `switch` consistently in `_notification` (`scene` folder)Rémi Verschelde2022-02-151-2/+4
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Remove node_hrcr hackkobewi2021-10-281-7/+7
|
* Implement Animation Blend Shape Tracksreduz2021-10-161-18/+56
| | | | | | | | | | * New track type BLEND_SHAPE * Blend shapes are imported via this new track type * Processing is more optimized (no longer relies on variants) * Modified the Blend Shape API in MeshInstance3D to use indices rather than StringNames (more optimizes) * Promo: Fixed a small bug in gizmo updating in Node3D that affected performance Dedicated BlendShape tracks are required for both optimization and eventually implementing them in animation compression.
* Remove REST transform influence in skeleton bonesreduz2021-10-131-1/+3
| | | | | | * Animations and Skeletons are now pose-only. * Rest transform is kept as reference (when it exists) and for IK * Improves 3D model compatibility (non uniform transforms will properly work, as well as all animations coming from Autodesk products).
* Merge pull request #53208 from timothyqiu/headless-crashRémi Verschelde2021-10-011-0/+2
|\
| * Fix crash in headless modeHaoyu Qiu2021-09-291-0/+2
| |
* | Use range iterators for `Map`Lightning_A2021-09-301-2/+2
|/
* Improve collision generation usability in the new 3D scene import workflow.AndreaCatania2021-09-081-1/+2
| | | | | | | | | | | | | | | | | 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
* Fix some unnecessary includesAaron Franke2021-08-131-2/+0
|
* Use const references where possible for List range iteratorsRémi Verschelde2021-07-251-1/+1
|
* Use C++ iterators for Lists in many situationsAaron Franke2021-07-231-2/+2
|
* Node3D gizmo improvementsjfons2021-07-231-2/+2
| | | | | | | | * Clean-up of node_3d_editor_plugin.{h,cpp}: removed unused code, fixed some bugs. * Moved node_3d_editor_gizmos.{h,cpp} to editor/plugins. * Added support for multiple gizmos per node. This means custom gizmos will no longer override the built-in ones and that multiple gizmos can be used in more complex nodes. * Added support for handle IDs. When adding handles to a gizmo, an ID can be specified for each one, making it easier to work with gizmos that have a variable number of handles. * Added support for subgizmos, selectable elements that can be transformed without needing a node of their own. By overriding _subgizmo_intersect_frustum() and/or _subgizmo_intersect_ray() gizmos can define which subgizmos should be selected on a region or click selection. Subgizmo transformations are applied using get/set/commit virtual methods, similar to how handles work.
* Options to clean/simplify convex hull generated from meshPouleyKetchoupp2021-07-071-5/+5
| | | | | | | | | | 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.
* Allow using ORMMaterial3D by using BaseMaterial3D as a resource hintHugo Locurcio2021-07-041-1/+1
| | | | | | | | Previously, only StandardMaterial3D could be defined as an alternative to ShaderMaterial. This also reorders the CanvasItemMaterial property hints to follow alphabetical order (which is enforced by the inspector).
* Rename `instance()`->`instantiate()` when it's a verbLightning_A2021-06-191-2/+2
|
* Fix accessing scene tree without checking: ↵kleonc2021-05-161-1/+1
| | | | MeshInstance3D::create_debug_tangents, GIProbe::bake
* Merge pull request #48050 from JFonS/occlusion_cullingRémi Verschelde2021-04-271-0/+1
|\
| * Implement occlusion cullingjfons2021-04-231-0/+1
| | | | | | | | | | | | | | | | | | Added an occlusion culling system with support for static occluder meshes. It can be enabled via `Project Settings > Rendering > Occlusion Culling > Use Occlusion Culling`. Occluders are defined via the new `Occluder3D` resource and instanced using the new `OccluderInstance3D` node. The occluders can also be automatically baked from a scene using the built-in editor plugin.
* | Expose creating multiple-convex-collision static bodies to GDScriptasheraryam2021-04-271-0/+37
|/
* Fix forgotten rename on surface material overrideBastiaan Olij2021-04-151-2/+2
|
* Rename get_surface_material to get_surface_override_materialclayjohn2021-04-141-22/+22
|
* add null check in MeshInstance::_mesh_changed()Angad Kambli2021-02-181-0/+1
|
* Merge pull request #45859 from Kayomn/masterRémi Verschelde2021-02-121-1/+1
|\ | | | | Accomodate blend shape ranges of -1 to +1 for Vulkan
| * Accomodate blend shape ranges of -1 to +1Kayomn2021-02-091-1/+1
| |
* | Removed _change_notifyreduz2021-02-101-2/+2
| | | | | | | | | | | | -For inspector refresh, the inspector now detects if a property change by polling a few times per second and then does update the control if so. This process is very cheap. -For property list refresh, a new signal (property_list_changed) was added to Object. _change_notify() is replaced by notify_property_list_changed() -Changed all objects using the old method to the signal, or just deleted the calls to _change_notify(<property>) since they are unnecesary now.
* | Initialize class variables with default values in scene/ [1/2]Rafał Mikrut2021-02-071-1/+0
|/
* Merge pull request #44814 from hoontee/fix-44714Rémi Verschelde2021-01-261-1/+0
|\ | | | | Do not clear materials when setting mesh
| * Do not clear materials when setting meshhoontee2020-12-301-1/+0
| |
* | Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
|/ | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-21/+40
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-26/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Fix get_active_material when a material is directly set on the meshPouleyKetchoupp2020-04-221-9/+12
| | | | | | | Makes MeshInstance3D::get_active_material consistent with the logic in the rendering system. Fixes #38108
* Replace NULL with nullptrlupoDharkael2020-04-021-4/+4
|
* Add a method to retrieve active material from MeshInstanceclayjohn2020-03-301-0/+18
|
* Renaming of servers for coherency.Juan Linietsky2020-03-271-5/+5
| | | | | | | | | | VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
* Renamed 2D and 3D nodes to make their types explicitJuan Linietsky2020-03-271-0/+421
Fixes #30736.