Hello,
I am trying to export the context options from the button in the context option panel, but the file results empty therefore I tried to export with the python command:
contextoptions.exportJson("/path/on/disk/options.json")
and I am getting an error:
File "/tmp/.mount_houdinpMineO/opt/hfs/houdini/python3.7libs/contextoptions.py", line 2620, in _export_json_file
self.exportJson(filepath)
File "/tmp/.mount_houdinpMineO/opt/hfs/houdini/python3.7libs/contextoptions.py", line 2650, in exportJson
exportJson(filepath, model=self._model)
File "/tmp/.mount_houdinpMineO/opt/hfs/houdini/python3.7libs/contextoptions.py", line 2712, in exportJson
json.dump(data, f, encoding="utf8")
File "/tmp/.mount_houdinpMineO/opt/hfs/python/lib/python3.7/json/__init__.py", line 176, in dump
default=default, sort_keys=sort_keys, **kw).iterencode(obj)
TypeError: __init__() got an unexpected keyword argument 'encoding'
does it tell anything helpful?
Cheers
R.
ps. I am on h19.0.589
export context options
832 1 0- Ruspa
- Member
- 30 posts
- Joined: Feb. 2021
- Offline
- Ruspa
- Member
- 30 posts
- Joined: Feb. 2021
- Offline
also I am trying this to set a json string, it does not seem doing anything:
how should I set it?
Cheers
R.
configs = """{'type': 'string_menu', 'order':2, menu_items: "[['shot001', '001'], ['shot002', '002']]"}""" hou.setContextOptionConfig(opt="my_shots", config=configs)
how should I set it?
Cheers
R.
Edited by Ruspa - May 23, 2022 11:40:49
-
- Quick Links