CreateNewとFindOrOpenの違い
ipynbFile FindOrOpen__CreateNewとFindOrOpenの違い.ipynb
In [1]:
In [2]:
| sample = Sdf.Layer.CreateNew('./sample.usda')
|
In [4]:
In [5]:
| sampleB = Sdf.Layer.FindOrOpen('./sample.usda')
|
In [6]:
| # FindOrOpenした場合は、 identifierをOpenするか、指定のidentifierのLayerを返す
# 同じidentifier なので、FindOrOpenすると、 sample と同じLayerを取得できる
id(sampleB)
|
In [7]:
In [27]:
| # ContextにSearchPathを指定
context = Ar.DefaultResolverContext(["D:/hoge"])
binder = Ar.ResolverContextBinder(context)
resolver = Ar.GetResolver()
|
In [29]:
| hasattr(Ar.Resolver,'CreateIdentifier')
|