Maya
コード ブロック | ||||||
---|---|---|---|---|---|---|
| ||||||
import json from AtomsMaya.hostbridge.atomsnode import MayaAtomsNodeHostBridge #importing scene json data file = open("/path/to/scene/data.json", 'r') data = json.load(file) file.close() MayaAtomsNodeHostBridge.merge_data(data) #exporting scene json data data = MayaAtomsNodeHostBridge.get_json_data() file = open("/path/to/scene/data.json", 'w') json.dump(data, file) file.close() #import variation json data file = open("/path/to/variation.json", 'r') data_string = jsonfile.loadread(file) file.close() MayaAtomsNodeHostBridge.merge_variation_datastring(data_string) #export variation json data data_string = MayaAtomsNodeHostBridge.get_variation_datastring() file = open("/path/to/variation.json", 'w') jsonfile.dumpwrite(data, file_string) file.close() |
Houdini
コード ブロック | ||||||
---|---|---|---|---|---|---|
| ||||||
import json from AtomsHoudini.hostbridge.atomsnode import HoudiniAtomsNodeHostBridge #importing scene json data file = open("/path/to/scene/data.json", 'r') data = json.load(file) file.close() HoudiniAtomsNodeHostBridge.merge_data(data) #exporting scene json data data = HoudiniAtomsNodeHostBridge.get_json_data() file = open("/path/to/scene/data.json", 'w') json.dump(data, file) file.close() #import variation json data file = open("/path/to/variation.json", 'r') data_string = jsonfile.loadread(file) file.close() HoudiniAtomsNodeHostBridge.merge_variation_datastring(data_string) #export variation json data data_string = HoudiniAtomsNodeHostBridge.get_variation_datastring() file = open("/path/to/variation.json", 'w') jsonfile.dumpwrite(data, file_string) file.close() |