Scripting_DAZ_Importer_Functions - Diffeomorphic/import_daz GitHub Wiki
FUNCTIONS IN import_daz
clear_selection ()
Deprecated. Clear the active file selection to be loaded by consecutive operators.
get_absolute_path ()
Get the absolute filepath corresponding to the given relative filepath.
** Returns: ** The corresponding absolute path if it exist.
** Arguments: **
path: Path or reference relative to the DAZ root paths.
get_absolute_paths ()
Get the absolute filepaths corresponding to the given relative filepaths.
** Returns: ** The corresponding absolute paths if they exist.
** Arguments: **
paths: Paths or references relative to the DAZ root paths.
get_canonical_filepath ( filepath )
Return a canonical form of the filepath, which can be used to index the return value dict.
** Returns: ** The canonical filepath, or None if this can not be constructed.
** Arguments: **
filepath: String which represents a filepath
get_error_message ()
Get the current error message.
** Returns: ** The error message from previous operator invokation if it raised an error, or the empty string if the operator exited without errors.
get_global_setting ( setting )
** Returns: ** The value of the global setting "setting", or None if that is missing.
** Arguments: **
setting: Name of the global setting
get_morphs ( ob, type, category=None, activeOnly=False )
Get all morph names and values of the specified type from the object.
** Returns: ** A dictonary of morph names - morph values for all morphs in the specified morphsets.
** Arguments: **
ob: Object (armature or mesh) which owns the morphs
type: Either a string in ["Units", "Expressions", "Visemes", "Facs", "Facsexpr", "Body", "Custom", "Jcms", "Flexions"], or a list of such strings, or the keyword "All" signifying all morphset in the list.
category (optional): The category name for Custom morphs.
activeOnly (optional): Active morphs only (default False).
get_return_value ()
Get value returned by previous operator.
** Returns: ** A dictonary of return values. For operators that import morphs, this dictionary is of the form {Lowercase filepath : Property name}.
get_root_paths ()
Get the DAZ root paths
** Returns: ** The list of DAZ root paths
get_selection ()
Deprecated. Get the active file selection to be loaded by consecutive operators.
** Returns: ** The active list of file paths (strings).
load_daz_file ( filepath )
Import a duf/dsf file (a gzipped json file).
** Returns: ** The content of the file as a Python dict.
** Arguments: **
filepath: File path
set_global_setting ( setting, value )
** Returns: ** Sets the value of the global setting "setting".
** Arguments: **
setting: Name of the global setting
value: New value of the global setting
set_selection ( files )
Deprecated. Set the active file selection to be loaded by consecutive operators.
** Arguments: **
files: A list of file paths (strings).
set_silent_mode ( value )
In silent mode, operators fail silently if they encounters an error. This is useful for scripting.
** Arguments: **
value: True turns silent mode on, False turns it off.
set_slider ( ob, prop, value )
Set slider value, like ob[prop] = value, but taking aliases into account.
** Arguments: **
ob: Object that owns slider
prop: Property name
value: Property value
update_drivers ()
Update drivers of the specified object
** Arguments: **
ob: Object