Access and control various aspects and functionalities available within the integrated development environment context. All properties and functions listed below are accessible at all time using the global Ide
object. In addition, this module is only available within the editor and cannot be called by the client context or in a published project.
Name | Description |
Resize | Manually resize the Ide window (desktop version only). |
Declaration void Resize( int width, int height ) Parameters
width : New width in pixels.
height : New height in pixels.
|
AddLayout | Add a new Layout to the active workspace. |
Declaration Layout *AddLayout( void )
|
RemoveLayout | Remove an existing Layout workspace by index. |
Declaration bool RemoveLayout( unsigned char index ) Parameters
index : Index of the workspace to remove.
Return Value
false if the index is invalid; else return true if the workspace have been removed successfully.
|
GetLayout | Retrieve an existing workspace Layout by index. |
Declaration Layout *GetLayout( unsigned char index ) Parameters
index : Index of the workspace Layout to retrieve.
Return Value
Reference to the workspace Layout pointed by index; else return nil of the index is invalid.
|
ClearLayouts | Clear all workspace Layout. |
Declaration void ClearLayouts( void )
|
SetLayout | Manually focus a specific workspace Layout. |
Declaration void SetLayout( unsigned char index ) Parameters
index : Index of the workspace to focus.
Return Value
true on success; else return false if the index provided is currently selected or inexistent.
|
SplitLayout | Split a workspace Layout. |
Declaration Widget *SplitLayout( Layout *layout, const quad bounds ) Parameters
layout : Reference to the Layout to split.
bounds : Specifies the bounding rectangle that determine the split.
Return Value
nil if the Layout provided in parameter is invalid; else return the reference to the new Widget cell created.
|
AddTab | Add a new editor tab to a workspace layout cell. |
Declaration Button *AddTab( Widget *layout_cell, unsigned char editor_type ) Parameters
layout_cell : Reference to the Widget cell to add an editor to.
editor_type : The type of editor to add.
Editor Types
0 : Console.
1 : View3d.
2 : Properties.
3 : Outliner.
4 : Library.
5 : Code Editor.
6 : Timeline.
7 : Sequencer.
8 : Molecule Editor.
9 : Audio Mixer.
10 : Controller.
Return Value
nil if either the Layout cell reference is invalid or if the editor type is out of bounds; else return the reference to the newly create Button tab.
|
Info | Pop up an info. dialog. |
Declaration Widget *Info( const char *title, Icon *icon, const char *msg ) Parameters
|
Confirm | Create a confirmation dialog. |
Declaration Widget *Confirm( const char *title, Icon *icon, const char *msg ) Parameters
|
FileExplorer | Open up the File Explorer. |
Declaration Widget *FileExplorer( const char *mode, const char *search ) Parameters
mode : Open the file explorer using one of the mode listed below.
search : Provide an extension search filter pattern such as: .jpeg|.dae .
Modes
|
FileExplorerGetSelection | Return the active file explorer select as a string. |
Declaration char *FileExplorerGetSelection( const char *selection_ext ) Parameters
selection_ext : Optionally, provide a extension selection pattern.
Return Value
nil if nothing have been selected; else return the file/folder path selected.
- Note
- This function can only be used by the
confirm button of the file explorer.
|
ColorPicker | Open the Color Picker dialog. |
Declaration Widget *ColorPicker( Widget *hanger, const vec4 color, bool rgba, bool hdr, bool luminance ) Parameters
hanger : Reference to the widget that the color picker should be attached to.
color : Base color to use.
rgba : Specify to use either RGB or RGBA.
hdr : Enable the HDR color tab.
luminance : Determine if the luminance scroll should be enabled or not.
Return Value
Reference to the root Widget of the color picker.
|
CurvePicker | Open up the Curve Picker dialog. |
Declaration Widget *CurvePicker( Widget *hanger, Curve *curve, const char *curve_code ) Parameters
hanger : Reference to the widget that the curve picker should be attached to.
curve : Reference to the Curve that the picker should be editting.
curve_code : Specify the scripting line to use to access the Curve.
Return Value
Reference to the base Widget used to create the curve picker.
|
ColorRamp | Pop up the Color Ramp dialog usually associated to a color band Texture. |
Declaration Widget *ColorRamp( Widget *parent ) Parameters
parent : Reference to the Widget that should be used as parent.
Return Value
Base reference of the color ramp dialog.
|
ColorCurves | Create a new Color Curves dialog. |
Declaration Widget *ColorCurves( Widget *parent ) Parameters
parent : Reference to the Widget that should be used as parent.
Return Value
Base reference of the color curves dialog.
|
OpenURL | Open a browser and load a specific URL. |
Declaration void OpenURL( const char *url ) Parameters
url : URL to open using the default platform browser.
|
EncodeETC2 | Compress an existing Texture using ETC2. |
Declaration int EncodeETC2( Texture *texture, float quality, int error_metric, unsigned char mipmaps ) Parameters
texture : Reference to the Texture to compress.
quality : Specify the compression quality (from 0% to 100%).
error_metric : Determine the error metric that should be used for compression.
mipmaps : Maximum mipmap levels to generate.
Error Metrics
0 : None (Default)
1 : RGBA
2 : RGBX
3 : REC709
4 : NUMERIC
5 : NORMALXYZ
Return Value
0 if the Texture have been compressed successfully else return one of the error code listed below:
-1 : Cannot compress The Texture; it is either invalid or already compressed.
-2 : Unable to compress a depth or depth stencil Texture.
-3 : Unable to compress a 16 bits Texture.
-4 : 3D Texture compression is not supported.
-5 : The Texture does not contain any Texmap texel data.
-6 : If the Texmap associated to the Texture prevent overrides (fNoOverride ).
|
EncodeASTC | Compress an exsiting Texture using the ASTC format. |
Declaration int EncodeASTC( Texture *texture, float quality, int block_type, bool normalmap, unsigned char mipmaps ) Parameters
texture : Reference to the Texture to compress.
quality : Specify the compression quality (from 0% to 100%).
block_type : The type of the block to use for compression (see list below).
normalmap : Determine if the color component should be splitted or combined (see DXT).
mipmaps : Maximum mipmap levels to generate.
Quality
< 25% : Very fast (lowest).
< 50% : Fast.
< 75% : Medium.
< 100% : Slow.
= 100% : Very slow (best)
Block Types
0 : GL_COMPRESSED_RGBA_ASTC_4x4_KHR
1 : GL_COMPRESSED_RGBA_ASTC_5x5_KHR
2 : GL_COMPRESSED_RGBA_ASTC_6x6_KHR
3 : GL_COMPRESSED_RGBA_ASTC_8x6_KHR
4 : GL_COMPRESSED_RGBA_ASTC_8x8_KHR
5 : GL_COMPRESSED_RGBA_ASTC_10x8_KHR
6 : GL_COMPRESSED_RGBA_ASTC_10x10_KHR
7 : GL_COMPRESSED_RGBA_ASTC_10x12_KHR
8 : GL_COMPRESSED_RGBA_ASTC_12x12_KHR
Return Value
0 if the Texture have been compressed successfully else return one of the error code listed below:
-1 : Cannot compress The Texture; it is either invalid or already compressed.
-2 : Unable to compress a depth or depth stencil Texture.
-3 : Unable to compress a 16 bits Texture.
-4 : 3D Texture compression is not supported.
-5 : The Texture does not contain any Texmap texel data.
-6 : If the Texmap associated to the Texture prevent overrides (fNoOverride ).
|
EncodeDXT | Compress an exsiting Texture using the DXT (ST3C) format. |
Declaration int EncodeDXT( Texture *texture, bool dither, int refine_pass, bool normalmap, unsigned char mipmaps ); Parameters
texture : Reference to the Texture to compress.
quality : Amount of refine pass(es) that will be apply.
dither : Enable dithering, automatically turned off if encoding a normal map or the like.
normalmap : Force to encode the normal X in RGB and normal Y in A .
mipmaps : Maximum mipmap levels to generate.
Return Value
0 if the Texture have been compressed successfully else return one of the error code listed below:
-1 : Cannot compress The Texture; it is either invalid or already compressed.
-2 : Unable to compress a depth or depth stencil Texture.
-3 : Unable to compress a 16 bits or floating point Texture.
-4 : 3D Texture compression is not supported.
-5 : The Texture does not contain any Texmap texel data.
-6 : If the Texmap associated to the Texture prevent overrided (fNoOverride ).
|
AddFileSync | Add a source file (either Texture, Script or Shader) to synchronize with a specific Asset. |
Declaration bool AddFileSync( unsigned int uid, const char *filename, bool enabled, bool force_check ) Parameters
uid : Unique id of the Asset to synchronize.
filename : The filename to monitor for changes.
enabled : Enable or disable synchronization of the file.
force_check : Determine if a check should be run to insure that the Asset actually still exists avoiding monitoring a file that is associated to a broken Asset.
Return Value
true if added successfully to the file sync list; else return false .
|
RemoveFileSync | Remove file synchronization for a specific Asset using its unique id as key. |
Declaration bool RemoveFileSync( unsigned int uid ) Parameters
uid : Unique id of the Asset to remove file synchronization for.
Return Value
true if removed successfully; else return false .
|
ClearFileSync | Remove all Asset that are currently monitor by file sync. |
Declaration void ClearFileSync( void )
|
RegisterPackUtility | Register the Utility where the OnPack function is defined; allowing you to create custom packing rules and exclusion pattern. |
Declaration void RegisterPackUtility( Utility *utility ) Parameters
utility : The Utility that will respond to the OnPack function callback. To disconnect the active pack utility; set to nil .
Example
function OnPack( stage_id, platform_id, filename )
-- Print the current packing stage:
-- 0 - Pack Project
-- 1 - Sync Project (Client)
-- 2 - Publish Project
print( "stage_id::" .. stage_id )
-- Print the current targetted platform:
-- 0 - Windows
-- 1 - Linux
-- 2 - Android
-- 3 - iOS
-- 4 - MacOSX
-- -1 - All
print( "platform_id::" .. platform_id )
-- Print the current filename that is
-- about to be packed.
print( "filename::" .. filename )
-- Create a simple packing rule to avoid including
-- all emissive textures. Starting by including
-- the active file by default.
local include = true
-- Check if the asset name contain the term _emissive.
if string.find( filename, "_emissive" ) then
include = false -- Exclude the file.
-- Check if the current file is a texture external
-- data. If yes extract the uid of the texture asset
-- and check if its name contains the term _emissive
elseif string.find( filename, ".texmap" ) then
-- Get the file uid.
local uid = filename:match("(%d+)")
-- Lookup for the texture asset
local ast = Lib:GetAsset( uid, Asset.AssetType.kTexture )
-- Check if the texture asset is an emissive texture;
-- if it is excluded from the NRG pack.
if string.find( ast.name, "_emissive" ) then
include = false -- Exclude the file.
end
end
-- The return value determine wether or
-- not the file should be included in
-- the NRG pack. 1=Included, 0=Skipped
return include
end
-- Register the OnPack function globally so it can
-- be called from the various packing stages.
_G.OnPack=OnPack
|
AddPreset | Create a new material import Preset. |
Declaration void AddPreset( const char *name ) Parameters
name : A unique name to identify the Preset.
|
GetPreset | Return an existing Preset identified by the name parameter. |
Declaration void GetPreset( const char *name ) Parameters
name : The name of the Preset to fetch.
Return Value
The existing Preset; else return nil .
|
RenamePreset | Rename an existing Preset. |
Declaration void RenamePreset( Preset *preset, const char *name ) Parameters
preset : Reference to the Preset to rename.
name : A new unique name to identify the Preset.
|
RemovePreset | Remove an existing Preset from the list. |
Declaration bool RemovePreset( const unsigned char index ) Parameters
index : The index of the Preset to remove.
Return Value
true if the Preset at the index specified have been removed; false if the index if out of range.
|
GetPresetIndex | Return the internal index of an existing Preset. |
Declaration int GetPresetIndex( const Preset *preset ) Parameters
preset : A valid reference to an existing Preset.
Return Value
-1 if the Preset reference received as parameter does not exists; else return the index of the active Preset reference.
|
RemovePreset | Remove all existing Preset. |
Declaration void ClearPresets( void )
|
AddLayerPreset | Create a new render LayerPreset to use when importing objects. |
Declaration LayerPreset *AddLayerPreset( const char *name ) Parameters
Return Value
If the amount of existing LayerPreset present is less then MAX_UCHAR then the function will return a valid reference to a new LayerPreset structure; else return nil .
|
GetLayerPreset | Retrieve an existing LayerPreset using its index as key. |
Declaration LayerPreset *IdeGetLayerPreset( const unsigned char index ) Parameters
Return Value
On success return the LayerPreset reference else return nil .
|
GetLayerPresetIndex | Return the internal index of an existing LayerPreset reference. |
Declaration int GetLayerPresetIndex( const LayerPreset *layerpreset ) Parameters
Return Value
On success return the internal index of the layerpreset received in parameter; else return -1 .
|
RemoveLayerPreset | Remove a specific LayerPreset from the list. |
Declaration bool RemoveLayerPreset( const unsigned char index ) Parameters
Return Value
On success return true if the index provided was valid; else return false .
|
ClearLayerPresets | Clear all existing LayerPreset. |
Declaration void ClearLayerPresets( void )
|
AddTooltip | Add a custom tooltip to a specific widget. The tooltip will be displayed when the widget is hovered. |
Declaration void AddTooltip( Widget *widget, unsigned int reference, ScrollerType alignment, int level, const ivec2 offset ) Parameters
widget : Reference to the Widget to add a toolip to.
reference : Index of the coresponding tooltip located in the help.xml file.
alignment : Determine in which direction the tooltip should appear.
level : How many level down the root the tooltip should snap to.
offset : The offset in pixel to maintain while diplaying the tooltip.
|
CompressorEncodeETC2 | Compress an existing Texture to the ETC2 format. |
Declaration int CompressorEncodeETC2( Texture *texture, float quality, int error_metric, bool mipmaps ) Parameters
texture : Reference to an existing Texture Asset.
quality : Quality percentage factor (from 0% to 100%).
error_metric : The type of error metric to use.
mipmaps : Determine whether or not mimaps should also be generated.
Error Metrics
0 : RGBA
1 : RGBX
2 : REC709
3 : NUMERIC
4 : NORMALXYZ
Return Value
Return 0 upon successfull compression else:
-1 : The texture is already compressed.
-2 : Unable to compress depth or depth stencil data.
-3 : Unable to compress 16 bits or floating point texel data.
-4 : 3d texture compression is not supported.
-5 : No texel data available.
-6 : The Texture options does not allow any override.
|
CompressorEncodeASTC | Compress a Texture using the ASTC compression scheme. |
Declaration int CompressorEncodeASTC( Texture *texture, float quality, int block_type, bool normalmap, bool mipmaps ) Parameters
texture : Reference to an existing Texture Asset.
quality : Quality ratio (a value from 0% to 100%).
block_type : The type of block size to use for compression.
normalmap : Specify that the output is a normal map.
mipmaps : Force to generate a full mipmap pyramid for the active Texture.
Quality
< 25% : Very Fast.
< 50% : Fast.
< 75% : Medium.
< 100% : Slow.
= 100% : Very Slow.
Block Type
0 : GL_COMPRESSED_RGBA_ASTC_4x4_KHR
1 : GL_COMPRESSED_RGBA_ASTC_5x5_KHR
2 : GL_COMPRESSED_RGBA_ASTC_6x6_KHR
3 : GL_COMPRESSED_RGBA_ASTC_8x6_KHR
4 : GL_COMPRESSED_RGBA_ASTC_8x8_KHR
5 : GL_COMPRESSED_RGBA_ASTC_10x8_KHR
6 : GL_COMPRESSED_RGBA_ASTC_10x10_KHR
7 : GL_COMPRESSED_RGBA_ASTC_10x12_KHR
8 : GL_COMPRESSED_RGBA_ASTC_12x12_KHR
Return Value
The function returns 0 upon success else:
-1 : The texture is already compressed.
-2 : Unable to compress depth or depth stencil data.
-3 : Unable to compress 16 bits for floating point texel data.
-4 : 3d texture compression is not supported.
-5 : No texel data available.
-6 : The Texture options does not allow any override.
|
CompressorEncodeDXT | Use DXT compression to compress a specific Texture. |
Declaration int CompressorEncodeDXT( Texture *texture, bool dither, int refine_pass, bool normalmap, bool mipmaps ) Parameters
texture : Reference to an existing Texture Asset.
dither : Enable or disable the use of dithering.
refine_pass : Amount of refinement passes.
normalmap : Specify that the output is a normal map.
mipmaps : Force to generate a full mipmap pyramid for the active Texture.
Return Value
The function returns 0 upon success else:
-1 : The texture is already compressed.
-2 : Unable to compress depth or depth stencil data.
-3 : Unable to compress 16 bits for floating point texel data.
-4 : 3d texture compression is not supported.
-5 : No texel data available.
-6 : The Texture options does not allow any override.
|
Provides an access to the reference of a material preset used by the COLLADA content pipeline. Presets are used to associated Material names to automatically link Shader and Script at import time.
Access to the global Server variable allowing you to broadcast to all devices currently connected and more.
HTTP Proxy configuration and settings allowing you to bypass the current network for user certificate authentication and software updates. Take note that theses settings does not affect your ScanConfig setup.
Structure that contains information about the current selection and resources that are currently in edit mode.