Browse Source

Merge pull request #3759 from rgson/patch-1

Update enum usage in "Import plugins"
Rémi Verschelde 5 years ago
parent
commit
728ed05a9f
1 changed files with 3 additions and 3 deletions
  1. 3 3
      tutorials/plugins/editor/import_plugins.rst

+ 3 - 3
tutorials/plugins/editor/import_plugins.rst

@@ -178,7 +178,7 @@ good practice to use an enum so you can refer to them using names.
     tool
     tool
     extends EditorImportPlugin
     extends EditorImportPlugin
 
 
-    enum Presets { PRESET_DEFAULT }
+    enum Presets { DEFAULT }
 
 
     ...
     ...
 
 
@@ -199,7 +199,7 @@ now, but we can make this method future-proof by returning the size of our
 
 
     func get_preset_name(preset):
     func get_preset_name(preset):
         match preset:
         match preset:
-            PRESET_DEFAULT:
+            Presets.DEFAULT:
                 return "Default"
                 return "Default"
             _:
             _:
                 return "Unknown"
                 return "Unknown"
@@ -222,7 +222,7 @@ you do this you have to be careful when you add more presets.
 
 
     func get_import_options(preset):
     func get_import_options(preset):
         match preset:
         match preset:
-            PRESET_DEFAULT:
+            Presets.DEFAULT:
                 return [{
                 return [{
                            "name": "use_red_anyway",
                            "name": "use_red_anyway",
                            "default_value": false
                            "default_value": false