From ef7b384861d59e566badf1adf28c8b56255c912e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 21 Sep 2018 15:34:11 +0200 Subject: [PATCH] doc: Misc formatting fixes --- doc/classes/EditorImportPlugin.xml | 1 + doc/classes/EditorScenePostImport.xml | 47 ++++++++++--------- doc/classes/Image.xml | 9 ---- .../opensimplex/doc_classes/SimplexNoise.xml | 13 ++--- 4 files changed, 29 insertions(+), 41 deletions(-) diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml index b21d402468a3..fdc204605e02 100644 --- a/doc/classes/EditorImportPlugin.xml +++ b/doc/classes/EditorImportPlugin.xml @@ -41,6 +41,7 @@ return FAILED var mesh = Mesh.new() + # Fill the Mesh with data read in 'file', left as exercise to the reader var filename = save_path + "." + get_save_extension() ResourceSaver.save(filename, mesh) diff --git a/doc/classes/EditorScenePostImport.xml b/doc/classes/EditorScenePostImport.xml index 09cae25403c6..76c105dd25c7 100644 --- a/doc/classes/EditorScenePostImport.xml +++ b/doc/classes/EditorScenePostImport.xml @@ -4,44 +4,45 @@ Post process scenes after import - The imported scene can be automatically modified right after import by specifying a 'custom script' that inherits from this class. The [method post_import]-method receives the imported scene's root-node and returns the modified version of the scene + Imported scenes can be automatically modified right after import by setting their [i]Custom Script[/i] Import property to a [code]tool[/code] script that inherits from this class. + The [method post_import] callback receives the imported scene's root node and returns the modified version of the scene. Usage example: + [codeblock] + tool # needed so it runs in editor + extends EditorScenePostImport + + # This sample changes all node names + + # Called right after the scene is imported and gets the root node + func post_import(scene): + # change all node names to "modified_[oldnodename]" + iterate(scene) + return scene # remember to return the imported scene + + func iterate(node): + if node != null: + node.name = "modified_"+node.name + for child in node.get_children(): + iterate(child) + [/codeblock] - http://docs.godotengine.org/en/latest/learning/workflow/assets/importing_scenes.html?highlight=post%20import + http://docs.godotengine.org/en/latest/getting_started/workflow/assets/importing_scenes.html#custom-script - [codeblock] -tool # needed so it runs in editor -extends EditorScenePostImport - -# This sample changes all node names - -# get called right after the scene is imported and gets the root-node -func post_import(scene): - # change all node names to "modified_[oldnodename]" - iterate(scene) - return scene # remember to return the imported scene - -func iterate(node): - if node!=null: - node.name = "modified_"+node.name - for child in node.get_children(): - iterate(child) -[/codeblock] - Returns the source-file-path which got imported (e.g. [code]res://scene.dae[/code] ) + Returns the source file path which got imported (e.g. [code]res://scene.dae[/code]). - Returns the resource-folder the imported scene-file is located in + Returns the resource folder the imported scene file is located in. @@ -50,7 +51,7 @@ func iterate(node): - Gets called after the scene got imported and has to return the modified version of the scene + Gets called after the scene got imported and has to return the modified version of the scene. diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index 8d89f192c4c1..56accdcd9efe 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -488,7 +488,6 @@ OpenGL texture format RGB with three components, each with a bitdepth of 8. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. - OpenGL texture format RGBA with four components, each with a bitdepth of 8. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. @@ -528,15 +527,12 @@ The S3TC texture format that uses Block Compression 1, and is the smallest variation of S3TC, only providing 1 bit of alpha and color data being premultiplied with alpha. More information can be found at https://www.khronos.org/opengl/wiki/S3_Texture_Compression. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. - The S3TC texture format that uses Block Compression 2, and color data is interpreted as not having been premultiplied by alpha. Well suited for images with sharp alpha transitions between translucent and opaque areas. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. - The S3TC texture format also known as Block Compression 3 or BC3 that contains 64 bits of alpha channel data followed by 64 bits of DXT1-encoded color data. Color data is not premultiplied by alpha, same as DXT3. DXT5 generally produces superior results for transparency gradients than DXT3. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. - Texture format that uses Red Green Texture Compression, normalizing the red channel data using the same compression algorithm that DXT5 uses for the alpha channel. More information can be found here https://www.khronos.org/opengl/wiki/Red_Green_Texture_Compression. @@ -546,7 +542,6 @@ Texture format that uses BPTC compression with unsigned normalized RGBA components. More information can be found at https://www.khronos.org/opengl/wiki/BPTC_Texture_Compression. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. - Texture format that uses BPTC compression with signed floating-point RGB components. @@ -556,7 +551,6 @@ Texture format used on PowerVR-supported mobile platforms, uses 2 bit color depth with no alpha. More information on PVRTC can be found here https://en.wikipedia.org/wiki/PVRTC. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. - Same as PVRTC2, but with an alpha component. @@ -584,15 +578,12 @@ Ericsson Texture Compression format 2 variant RGB8, which is a followup of ETC1 and compresses RGB888 data. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. - Ericsson Texture Compression format 2 variant RGBA8, which compresses RGBA8888 data with full alpha support. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. - Ericsson Texture Compression format 2 variant RGB8_PUNCHTHROUGH_ALPHA1, which compresses RGBA data to make alpha either fully transparent or fully opaque. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. - diff --git a/modules/opensimplex/doc_classes/SimplexNoise.xml b/modules/opensimplex/doc_classes/SimplexNoise.xml index 5b3af1cd6744..e5e0c15b3c25 100644 --- a/modules/opensimplex/doc_classes/SimplexNoise.xml +++ b/modules/opensimplex/doc_classes/SimplexNoise.xml @@ -4,9 +4,7 @@ Noise generator based on Open Simplex. - This resource allows you to configure and sample a fractal noise space. - - Here is a brief usage example that configures a SimplexNoise and gets samples at various positions and dimensions: + This resource allows you to configure and sample a fractal noise space. Here is a brief usage example that configures a SimplexNoise and gets samples at various positions and dimensions: [codeblock] var noise = SimplexNoise.new() @@ -102,8 +100,7 @@ - Generate a tileable noise image, based on the current noise parameters. - Generated seamless images are always square ([code]size[/code] x [code]size[/code]). + Generate a tileable noise image, based on the current noise parameters. Generated seamless images are always square ([code]size[/code] x [code]size[/code]). @@ -115,12 +112,10 @@ Number of Simplex noise layers that are sampled to get the fractal noise. - Period of the base octave. - A lower period results in a higher-frequency noise (more value changes across the same distance). + Period of the base octave. A lower period results in a higher-frequency noise (more value changes across the same distance). - Contribution factor of the different octaves. - A [code]persistence[/code] value of 1 means all the octaves have the same contribution, a value of 0.5 means each octave contributes half as much as the previous one. + Contribution factor of the different octaves. A [code]persistence[/code] value of 1 means all the octaves have the same contribution, a value of 0.5 means each octave contributes half as much as the previous one. Seed used to generate random values, different seeds will generate different noise maps.