3DCoat Python API
The 3DCoat Python API documentation.
Loading...
Searching...
No Matches
coat.resource Class Reference

Public Member Functions

 __init__ (self, str id)
 
list listFolders (self)
 list folders of the resource type referred by this object
 
str currentFolder (self)
 get the current folder short name
 
str currentFolderFullPath (self)
 full path (relative to the 3DCoat's documents) to the current folder files
 
str rootPath (self)
 the root path (relative to the 3DCoat's documents) to the resource type referred by this object
 
list supportedExtensions (self)
 get the list of supported extensions for the resource type referred by this object
 
 setCurrentFolder (self, str folder)
 set the current folder (short name without the full path)
 
 createFolder (self, str folderName)
 create the folder and switch there
 
 removeFolder (self, str folderName)
 remove the folder and switch to the root folder if this is the current folder
 
list listCurrentFolderItems (self)
 get the list of all items in the current folder
 
 addItem (self, str itemPath)
 add the item to the current folder
 
 removeItem (self, str itemName)
 remove the item from the current folder
 
 selectItem (self, str itemName)
 select/activate the item in the current folder
 
 moveItemToFolder (self, str itemName, str destFolderName)
 move the item to another folder
 
str getCurrentItem (self)
 returns the current item name (if possible)
 

Static Public Member Functions

list listAllResourcesTypes ()
 list all available resources types
 

Constructor & Destructor Documentation

◆ __init__()

coat.resource.__init__ ( self,
str id )

Member Function Documentation

◆ addItem()

coat.resource.addItem ( self,
str itemPath )

add the item to the current folder

Parameters
itemPaththe path to the item (full or relative to the 3DCoat's documents)

◆ createFolder()

coat.resource.createFolder ( self,
str folderName )

create the folder and switch there

Parameters
folderNamethe folder name

◆ currentFolder()

str coat.resource.currentFolder ( self)

get the current folder short name

Returns
the name of current folder of the resource type referred by this object

◆ currentFolderFullPath()

str coat.resource.currentFolderFullPath ( self)

full path (relative to the 3DCoat's documents) to the current folder files

Returns
the path

◆ getCurrentItem()

str coat.resource.getCurrentItem ( self)

returns the current item name (if possible)

Returns
the string, current item name

◆ listAllResourcesTypes()

list coat.resource.listAllResourcesTypes ( )
static

list all available resources types

Returns
the list of resource types (any type may be passed to the resource constructor)

◆ listCurrentFolderItems()

list coat.resource.listCurrentFolderItems ( self)

get the list of all items in the current folder

Returns
the list of items (usually long names with the relative path)

◆ listFolders()

list coat.resource.listFolders ( self)

list folders of the resource type referred by this object

Returns
the list of folders (short names without the full path)

◆ moveItemToFolder()

coat.resource.moveItemToFolder ( self,
str itemName,
str destFolderName )

move the item to another folder

Parameters
itemNamethe item name as it is returned by listCurrentFolderItems()
destFolderNamethe short name of the destination folder

◆ removeFolder()

coat.resource.removeFolder ( self,
str folderName )

remove the folder and switch to the root folder if this is the current folder

Parameters
folderNamethe folder name

◆ removeItem()

coat.resource.removeItem ( self,
str itemName )

remove the item from the current folder

Parameters
itemNamethe item name as it is returned by listCurrentFolderItems()

◆ rootPath()

str coat.resource.rootPath ( self)

the root path (relative to the 3DCoat's documents) to the resource type referred by this object

Returns
the path

◆ selectItem()

coat.resource.selectItem ( self,
str itemName )

select/activate the item in the current folder

Parameters
itemNamethe item name as it is returned by listCurrentFolderItems()

◆ setCurrentFolder()

coat.resource.setCurrentFolder ( self,
str folder )

set the current folder (short name without the full path)

Parameters
folderthe folder name

◆ supportedExtensions()

list coat.resource.supportedExtensions ( self)

get the list of supported extensions for the resource type referred by this object

Returns
the list of strings with extensions

The documentation for this class was generated from the following file: