mgear.animbits.cache_manager.mayautils module
- mgear.animbits.cache_manager.mayautils.check_gpu_plugin()
Check for the gpuCache plugin load
- mgear.animbits.cache_manager.mayautils.create_cache_manager_preference_file()
Creates the Animbits cache manager preference file
- Returns:
- Path to the preference file if existing or created one.
None if failed
- Return type:
str or None
- mgear.animbits.cache_manager.mayautils.delete_cache_file(file_path)
Deletes the given file
- Parameters:
file_patj (str) – path and name to the file
- mgear.animbits.cache_manager.mayautils.generate_gpu_cache(geo_node, cache_name, start, end, rig_node, lock=False)
Generates a GPU representation for shapes found under the geo_node
- Parameters:
geo_node (str) – geometry group transform node containing the shapes to cache
cache_name (str) – file name to use for the gpu cache file
start (float) – start frame to use
end (float) – end frame to use
rig_node (str) – Rig root node containing the geo_node
lock (bool) – Whether or not the gpu cache node should be locked
- mgear.animbits.cache_manager.mayautils.install_script_job(function)
Adds a script job for file read and scene opened
- mgear.animbits.cache_manager.mayautils.kill_script_job(name)
Finds the given script job name and deletes it
- Parameters:
name (str) – the name for the script job to kill
- mgear.animbits.cache_manager.mayautils.kill_ui(name)
Deletes an already created widget
- Parameters:
name (str) – the widget object name
- mgear.animbits.cache_manager.mayautils.load_gpu_cache(node_name, gpu_file, rig_node, lock)
Generic method to load gpu cache files into a Maya scene
- Parameters:
node_name (str) – gpu cache node name to be use
gpu_file (str) – file name to use for the gpu cache file
rig_node (str) – Rig root node containing the geo_node
lock (bool) – Whether or not the gpu cache node should be locked
- Returns:
the gpu cache node created
- Return type:
str
- mgear.animbits.cache_manager.mayautils.load_rig(rig_node)
Brings back the rig
- Parameters:
rig_node (str) – The rig root node name
- mgear.animbits.cache_manager.mayautils.mute_and_hide_node(node)
Mutes the visibility attribute on the given node and hides it
- Parameters:
node (str) – node to mute and hide
- mgear.animbits.cache_manager.mayautils.set_gpu_color_override(model_group, color)
Creates a Maya render layer to override GPU caches display color
- mgear.animbits.cache_manager.mayautils.set_preference_file_cache_destination(cache_path)
Sets the Cache Manager cache destination path into the preference file
- Parameters:
cache_path (str) – The folder path for the cache files
- mgear.animbits.cache_manager.mayautils.set_preference_file_model_group(model_group)
Sets the Cache Manager model group name into the preference file
- Parameters:
model_group (str) – The model group name
- mgear.animbits.cache_manager.mayautils.set_preference_file_setting(setting, value)
Generic method to save data into the preference file
- Parameters:
setting (str) – name of the setting to store
value (str / bool) – value for the setting
- mgear.animbits.cache_manager.mayautils.set_preference_file_unload_method(value)
Sets the Cache Manager unload method into the preference file
- Parameters:
value (bool) – whether or not the rig is unloaded or hidden
- mgear.animbits.cache_manager.mayautils.unload_rig(rig_node, method)
Hides or unloads the given rig
Hiding method is using the visibility attribute. We would like to transport it to the lodVisibility attribute but using this one does not trigger correctly the visibility evaluator causing slow-downs due to rig still been computed even if hidden.
- Parameters:
rig_node (str) – The rig root node name
method (int) – 0=hide, 1=unload
- mgear.animbits.cache_manager.mayautils.unmute_and_show_node(node)
Un-mutes the visibility attribute on the given node and show it
- Parameters:
node (str) – node to unmute and show