3DCoat  3D-COAT 4.9.xx
3DCoat is the one application that has all the tools you need to take your 3D idea from a block of digital clay all the way to a production ready, fully textured organic or hard surface model.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ui_definition.h File Reference

Macros

#define ui_tool_context(B)   auto_keep(ui_menu_item::ContextTool); ui_set_tool_context(B);
 set context for next tools declaration More...
 

Functions

ui_pool * ui_root ()
 get the ui_pool pointer. More...
 
template<class F , class... Args>
void ui_element (const char *ID, F &&f, Args &&...args)
 Create the UI element to be used in script. More...
 
void ui_create (const char *ID, std::function< void(BaseWidget *)> fn, std::function< void()> onclick=[]{})
 Create custom UI element with own controls. Second parameter is the function to call when the hotkey pressed. More...
 
void ui_property (const char *ID, std::function< bool()> fn)
 define the property to be referred in script using menu_property(...), More...
 
void ui_comment (const char *id)
 Add comment to the list of tools/menu items definition. More...
 
void ui_keys (int Key, bool shift, bool ctrl, bool alt)
 Set default hotkeys for this elemeny. More...
 
void ui_export ()
 The item performs export, so should be disabled in expired trial version. More...
 
void ui_pro ()
 The feature is only for the Pro version. More...
 
void ui_beta ()
 This is beta feature. More...
 
void ui_bool (bool &b)
 Make the previously defined menu_item to be checkbox. More...
 
void ui_bool (std::function< bool &()> fn)
 Make the previously defined menu_item to be checkbox, pointer to the boolean variable is dynamic. More...
 
void ui_group (int g)
 define radio-button, specify the group of radio buttons More...
 
void ui_intethalon (int &item, int ethalon)
 Specify the radio button with integer variable, box checked if item == ethalon. More...
 
void ui_icon (int icon)
 set icon for the item More...
 
void ui_icon (const char *icon)
 set the texture for the item, name should be from the material.io More...
 
void ui_set_tool_context (BasicTool *B)
 set context for next tools declaration More...
 
template<class F , class... Args>
void reg_tool_button (const char *ID, F &&f, Args &&...args)
 define the button in the toolset that does something More...
 
void reg_tool_activation (const char *ID, int index)
 register tool activation. Tools becomes active, UI of the tool becomes active. More...
 
void reg_surface_tool (const char *ID, int index)
 register tool for the surface mode only More...
 
void reg_voxel_tool (const char *ID, int index)
 register the tool for the voxels only More...
 
void menu_item (const cstring &id)
 add the menu item More...
 
TextWidget * menu_item_code (const cstring &id)
 Not for the sctipt, it creates the menu item in the current context, returns TextWidget to be precessed. Usually it should be called within the ui_create lambda. More...
 
void menu_sort ()
 sort items alphabetically in current menu context. More...
 
void menu_item_script (const cstring &id, const cstring &functionOrFile)
 add item defined within the script, pressing the item will call the script function More...
 
void menu_hotkey (const cstring &id, int Shift, int Ctrl, int Alt)
 set the default hotkey for this item More...
 
void menu_submenu (const cstring &id)
 add submenu section, end the section with menu exit() More...
 
void iconic_submenu (const cstring &id, int size)
 submenu as icon (like the camera menu), size is the icon size More...
 
void menu_separator ()
 separator in the menu More...
 
void menu_insert_extensions (const cstring &id)
 insert all extensions of the given type into the menu More...
 
void start_main_menu (const cstring &id)
 add the item to the root of the main menu More...
 
void menu_exit ()
 end the submenu More...
 
void tools_item (const cstring &id)
 add the tool to the tool panel. More...
 
void tools_section (const cstring &id)
 Stern new tools section. More...
 
void insert_extensions ()
 insert extensions that are suitable to this page More...
 
bool is_new_scene ()
 is it new scene? More...
 
bool is_steam_app ()
 Is it steam application? More...
 
bool is_ppp ()
 Is there object imported for PPP? More...
 
bool is_ptex ()
 Is there object imported for Ptex painting? More...
 
bool is_mv ()
 Is there object imported for microvertex painting? More...
 
bool dicom_supported ()
 Is dicom supported? More...
 
bool is_medical ()
 Is it medical application? More...
 
bool is_printing ()
 Is it 3d-printing version? More...
 
int tex_approach ()
 returns current texturing approach More...
 
bool lock_ui_changes ()
 lock UI changes, so that user will not be able to hide/restore UI elements (deprecated) More...
 
void use_round_space_panel (bool colorsinside)
 use round space panel for this room. More...
 
void use_colors_in_toolset ()
 Use color switcher in the toolset. More...
 
bool menu_property (const cstring &id)
 return the value of some pre-defined property. More...
 
void show_space_panel (const cstring &Subset, int NumColumns)
 show the space panel, if Subset is empty, all tools will be shown, othervice only particular subsections will be shows. The section will be shown if it's name (including*) is substring of Subset More...
 
void start_rmb_panel ()
 start making RMB panel. Pay attention, if you started with start_rmb_panel(), you should finish it with show_rmb_panel() More...
 
void show_rmb_panel ()
 finishmaking rmb panel and show it to user More...
 
bool voxtree_object_picked ()
 returns true if vox tree element picked - on screen or in VoxTree More...
 
void pass_filename (const cstring &id)
 executing UI commands substitute the filename into the next file dialog More...
 
void execute_item (const cstring &id)
 execute UI item More...
 
bool is_surface ()
 Is the current object in surface mode? More...
 
bool is_proxy ()
 Is the current object in proxy mode? More...
 
bool RequiresRoundSpacePanel ()
 Call it from the tools definition script if current context requires round space panel. More...
 
bool RequiresColorsPaletteInSpacePanel ()
 Call it from the tools definition script if current context requires color palette in the round space panel. More...
 
bool RequiresColorsInToolset ()
 returns true if the toolset requires the color switcher More...
 
int GetCurrentToolMode ()
 Returns current tool integer identifier. More...
 
const cstring GetCurrentTool ()
 return the name of the current tool More...
 
int GetCurrentToolSubmode (const cstring &id)
 return additional sub-mode of the current tool. Like verts/edges/faces/object in retopo/select More...
 
void PureIconic ()
 call from script to set round space panel + color switcher + palette in space panel More...
 
void default_tool (const cstring &tool)
 set the default tool for the current toolset, it should be called in the toolset definition script More...
 
void set_space_panel_columns_count (int num)
 set the columns count in the space panel More...
 
void page_suffix (const cstring &tool)
 set additioanl page suffix to distinguish principally different toolsets. It is usually [V] for object in voxel mode and [S] for surface. More...
 
cStr GetExtendedPage ()
 return the page name with the suffix if applicable More...
 
void IndicateToolChange ()
 called intenally to indicate that new default tool shoul be assigned to the current context More...
 
void empty ()
 just do nothing More...
 
void ClearRequirements ()
 don't need round space panel, colors in space panel, colors in toolset More...
 

Macro Definition Documentation

#define ui_tool_context (   B)    auto_keep(ui_menu_item::ContextTool); ui_set_tool_context(B);

set context for next tools declaration

Function Documentation

void ClearRequirements ( )

don't need round space panel, colors in space panel, colors in toolset

void default_tool ( const cstring &  tool)

set the default tool for the current toolset, it should be called in the toolset definition script

References GetExtendedPage().

bool dicom_supported ( )

Is dicom supported?

void execute_item ( const cstring &  id)

execute UI item

const cstring GetCurrentTool ( )

return the name of the current tool

References ui_root().

Referenced by IndicateToolChange().

int GetCurrentToolMode ( )

Returns current tool integer identifier.

int GetCurrentToolSubmode ( const cstring &  id)

return additional sub-mode of the current tool. Like verts/edges/faces/object in retopo/select

cStr GetExtendedPage ( )

return the page name with the suffix if applicable

Referenced by default_tool(), and IndicateToolChange().

void iconic_submenu ( const cstring &  id,
int  size 
)

submenu as icon (like the camera menu), size is the icon size

References mat_icon().

void IndicateToolChange ( )

called intenally to indicate that new default tool shoul be assigned to the current context

References GetCurrentTool(), and GetExtendedPage().

void insert_extensions ( )

insert extensions that are suitable to this page

References VolumeObject::InCache.

bool is_medical ( )

Is it medical application?

bool is_mv ( )

Is there object imported for microvertex painting?

bool is_new_scene ( )

is it new scene?

bool is_ppp ( )

Is there object imported for PPP?

bool is_printing ( )

Is it 3d-printing version?

bool is_proxy ( )

Is the current object in proxy mode?

References VolumeObject::InCache.

bool is_ptex ( )

Is there object imported for Ptex painting?

bool is_steam_app ( )

Is it steam application?

bool is_surface ( )

Is the current object in surface mode?

bool lock_ui_changes ( )

lock UI changes, so that user will not be able to hide/restore UI elements (deprecated)

void menu_exit ( )

end the submenu

void menu_hotkey ( const cstring &  id,
int  Shift,
int  Ctrl,
int  Alt 
)

set the default hotkey for this item

void menu_insert_extensions ( const cstring &  id)

insert all extensions of the given type into the menu

void menu_item ( const cstring &  id)

add the menu item

References ui_root().

TextWidget* menu_item_code ( const cstring &  id)

Not for the sctipt, it creates the menu item in the current context, returns TextWidget to be precessed. Usually it should be called within the ui_create lambda.

void menu_item_script ( const cstring &  id,
const cstring &  functionOrFile 
)

add item defined within the script, pressing the item will call the script function

References ui_root().

bool menu_property ( const cstring &  id)

return the value of some pre-defined property.

See Also
ui_property

References ui_root().

void menu_separator ( )

separator in the menu

void menu_sort ( )

sort items alphabetically in current menu context.

void menu_submenu ( const cstring &  id)

add submenu section, end the section with menu exit()

void page_suffix ( const cstring &  tool)

set additioanl page suffix to distinguish principally different toolsets. It is usually [V] for object in voxel mode and [S] for surface.

void pass_filename ( const cstring &  id)

executing UI commands substitute the filename into the next file dialog

void PureIconic ( )

call from script to set round space panel + color switcher + palette in space panel

void reg_surface_tool ( const char *  ID,
int  index 
)

register tool for the surface mode only

References ui_root().

void reg_tool_activation ( const char *  ID,
int  index 
)

register tool activation. Tools becomes active, UI of the tool becomes active.

References ui_root().

template<class F , class... Args>
void reg_tool_button ( const char *  ID,
F &&  f,
Args &&...  args 
)

define the button in the toolset that does something

References ui_root().

void reg_voxel_tool ( const char *  ID,
int  index 
)

register the tool for the voxels only

References ui_root().

bool RequiresColorsInToolset ( )

returns true if the toolset requires the color switcher

bool RequiresColorsPaletteInSpacePanel ( )

Call it from the tools definition script if current context requires color palette in the round space panel.

bool RequiresRoundSpacePanel ( )

Call it from the tools definition script if current context requires round space panel.

void set_space_panel_columns_count ( int  num)

set the columns count in the space panel

void show_rmb_panel ( )

finishmaking rmb panel and show it to user

void show_space_panel ( const cstring &  Subset,
int  NumColumns 
)

show the space panel, if Subset is empty, all tools will be shown, othervice only particular subsections will be shows. The section will be shown if it's name (including*) is substring of Subset

void start_main_menu ( const cstring &  id)

add the item to the root of the main menu

void start_rmb_panel ( )

start making RMB panel. Pay attention, if you started with start_rmb_panel(), you should finish it with show_rmb_panel()

int tex_approach ( )

returns current texturing approach

void tools_item ( const cstring &  id)

add the tool to the tool panel.

tools_in_script Toolset commands to be used in the script.

References ui_root().

void tools_section ( const cstring &  id)

Stern new tools section.

void ui_beta ( )

This is beta feature.

void ui_bool ( bool &  b)

Make the previously defined menu_item to be checkbox.

void ui_bool ( std::function< bool &()>  fn)

Make the previously defined menu_item to be checkbox, pointer to the boolean variable is dynamic.

void ui_comment ( const char *  id)

Add comment to the list of tools/menu items definition.

References ui_root().

Referenced by PopupWindow::Register().

void ui_create ( const char *  ID,
std::function< void(BaseWidget *)>  fn,
std::function< void()>  onclick = []{} 
)

Create custom UI element with own controls. Second parameter is the function to call when the hotkey pressed.

References ui_root().

template<class F , class... Args>
void ui_element ( const char *  ID,
F &&  f,
Args &&...  args 
)

Create the UI element to be used in script.

References ui_root().

Referenced by PopupWindow::Register().

void ui_export ( )

The item performs export, so should be disabled in expired trial version.

void ui_group ( int  g)

define radio-button, specify the group of radio buttons

void ui_icon ( int  icon)

set icon for the item

void ui_icon ( const char *  icon)

set the texture for the item, name should be from the material.io

References mat_icon().

void ui_intethalon ( int &  item,
int  ethalon 
)

Specify the radio button with integer variable, box checked if item == ethalon.

void ui_keys ( int  Key,
bool  shift,
bool  ctrl,
bool  alt 
)

Set default hotkeys for this elemeny.

void ui_pro ( )

The feature is only for the Pro version.

void ui_property ( const char *  ID,
std::function< bool()>  fn 
)

define the property to be referred in script using menu_property(...),

See Also
menu_property

References ui_root().

void ui_set_tool_context ( BasicTool *  B)

set context for next tools declaration

void use_colors_in_toolset ( )

Use color switcher in the toolset.

void use_round_space_panel ( bool  colorsinside)

use round space panel for this room.

bool voxtree_object_picked ( )

returns true if vox tree element picked - on screen or in VoxTree