There were reasons I gave up on going deeply into RL Python:
Lack of time, poorly written documentation and most annoying - inconsistency in sample snippets!
It may not be so bad for those who develop for living, but for the rest of us....
Just sample the code which could be tested by copy/paste right away! :crazy:
Not just some random lines where we have to figure how to put it all together and clear the syntax errors and misplaced variables in a way!Sorry for the rant, I hope this is what you've been looking to get....
:)import RLPy
rl_plugin_info = {"ap": "iClone", "ap_version": "8.0"}
def get_all_content_folders(_folder, all_content_folders):
content_folders = RLPy.RApplication.GetContentFoldersInFolder(_folder)
for sub_folder in content_folders:
all_content_folders.append(sub_folder)
print("sub_folder :"+sub_folder)
real_files = RLPy.RApplication.GetContentFilesInFolder(sub_folder)
for files in real_files:
print("files :"+files )
get_all_content_folders(sub_folder, all_content_folders)
content_key = RLPy.ETemplateRootFolder_Props
def_folder = RLPy.RApplication.GetDefaultContentFolder(content_key)
print(def_folder)
all_content_folders = []
get_all_content_folders(def_folder, all_content_folders)