Pro_Pack : r9Data¶
ProPack r9Data object is a custom dict handler for Python that keeps sync with a file version of the data. This is how all the settings files in ProPack are maintained. It’s also a fully dot completable dict method
>>> # import statement for the module via the r9pro decompiler
>>> from Red9.pro_pack import r9pro
>>> r9pro.r9import('r9data')
>>> import r9data
Optmizer module for dealing with the health of a scene
Main Classes
R9dict ([value, path, write, ID]) |
|
-
class
R9dict
(value=None, path=None, write=True, ID=None)¶ Bases:
dict
Parameters: - value – expects a {} to be dotdictify
- path – location to a JSON file to be dotdictify and interactively store value changes
-
<<<<<<< HEAD
marker
= <object object at 0x0000000003F1AC60>¶
=======
marker
= <object object at 0x0000000003E0BC60>¶ >>>>>>> d7ab8a039c4da0838a07bf4a9ec3ad957667b21e-
dict_to_r9dict
(data, r9dict)¶
-
getID
()¶
-
setID
(ID=None)¶
-
getrootdata
()¶
-
writable
¶
-
set_write_state
(value)¶
-
filepath
¶ Returns: the self.r9filepath attr from the root of the dictionary, regardless of the dept of the dictionary key from where it is call if not self.r9filepath return None
-
set_filepath
(filepath)¶ inset filepat in self.__dict[‘filepath’]__ :param filepath: string: file path
-
cd
()¶ Returns: if self.r9filepath return the name of self.r9filepath current directory else None
-
write
(update=True)¶ write value changes if a path has been declare on creation
-
ensurekeys
(keys)¶ ensures that given list of keys exist in the dictionary, if files already exist it will preserve original values if not it will assign None value
Parameters: keys – list of key names Returns: None
-
deletefile
()¶ Delete file specify in dict.r9filepath ensure :return: bool: True if file has been deleted
-
clear
()¶
-
pop
(key)¶