From c721f1c624e297b3ca9c5e0088c7d9b9041f0233 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Fri, 4 Apr 2025 02:16:21 -0700 Subject: [PATCH 1/2] Document how to opt out of name suffix customization in 3D import --- .../node_type_customization.rst | 43 +++++++++++++++++-- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/tutorials/assets_pipeline/importing_3d_scenes/node_type_customization.rst b/tutorials/assets_pipeline/importing_3d_scenes/node_type_customization.rst index a5a9f4999..22c64d8c1 100644 --- a/tutorials/assets_pipeline/importing_3d_scenes/node_type_customization.rst +++ b/tutorials/assets_pipeline/importing_3d_scenes/node_type_customization.rst @@ -20,11 +20,33 @@ will detect suffixes in object names and will perform actions automatically. All the suffixes described below can be used with ``-``, ``$``, and ``_`` and are **case-insensitive**. -Remove nodes (-noimp) ---------------------- +Opting out +---------- -Objects that have the ``-noimp`` suffix will be removed at import-time no matter -what their type is. They will not appear in the imported scene. +If you do not want Godot to perform any of the actions described below, you +can set the ``nodes/use_node_type_suffixes`` import option to ``false``. +This will disable all node type suffixes, which keeps nodes the same type +as the original file indicated. However, the ``-noimp`` suffix will still +be respected, as well as non-node suffixes like ``-vcol`` or ``-loop``. + +Alternatively, you can completely opt out of all name suffixes by setting +the ``nodes/use_name_suffixes`` import option to ``false``. This will +completely stop the general scene import code from looking at name suffixes. +However, the format-specific import code may still look at name suffixes, +such as the glTF importer checking for the ``-loop`` suffix. + +Disabling these options makes editor-imported files more similar to the +original files, and more similar to importing files at runtime. +For an import workflow that works at runtime, gives more predictable +results, and only has explicitly defined behavior, consider setting these +options to ``false`` and using :ref:`class_GLTFDocumentExtension` instead. + +Remove nodes and animations (-noimp) +------------------------------------ + +Nodes and animations that have the ``-noimp`` suffix will be removed at +import time no matter what their type is. They will not appear in the +imported scene. This is equivalent to enabling **Skip Import** for a node in the Advanced Import Settings dialog. @@ -132,3 +154,16 @@ will be imported as a Godot :ref:`class_Animation` with the loop flag set. In Blender, this requires using the NLA Editor and naming the Action with the ``loop`` or ``cycle`` prefix or suffix. + +Material alpha (-alpha) +----------------------------------------------- + +A material with the ``-alpha`` suffix will be imported with the +:ref:`TRANSPARENCY_ALPHA` transparency mode. + +Material vertex color (-vcol) +----------------------------------------------- + +A material with the ``-vcol`` suffix will be imported with the +:ref:`FLAG_ALBEDO_FROM_VERTEX_COLOR` and +:ref:`FLAG_SRGB_VERTEX_COLOR` flags set. From f2110357a27c20e5ef745093a08c4f178edaae7b Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Thu, 10 Apr 2025 01:08:00 +0200 Subject: [PATCH 2/2] Apply suggestions from code review --- .../importing_3d_scenes/node_type_customization.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorials/assets_pipeline/importing_3d_scenes/node_type_customization.rst b/tutorials/assets_pipeline/importing_3d_scenes/node_type_customization.rst index 22c64d8c1..bd8ce6a83 100644 --- a/tutorials/assets_pipeline/importing_3d_scenes/node_type_customization.rst +++ b/tutorials/assets_pipeline/importing_3d_scenes/node_type_customization.rst @@ -156,13 +156,13 @@ In Blender, this requires using the NLA Editor and naming the Action with the `` ``cycle`` prefix or suffix. Material alpha (-alpha) ------------------------------------------------ +----------------------- A material with the ``-alpha`` suffix will be imported with the :ref:`TRANSPARENCY_ALPHA` transparency mode. Material vertex color (-vcol) ------------------------------------------------ +----------------------------- A material with the ``-vcol`` suffix will be imported with the :ref:`FLAG_ALBEDO_FROM_VERTEX_COLOR` and