mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
replace 'fname' with 'filepath_from_context' (#5000)
This commit is contained in:
parent
a627615a61
commit
c9edd211af
6 changed files with 8 additions and 7 deletions
|
|
@ -18,7 +18,7 @@ class ModelAbcLoader(load.LoaderPlugin):
|
|||
def load(self, context, name=None, namespace=None, data=None):
|
||||
from pymxs import runtime as rt
|
||||
|
||||
file_path = os.path.normpath(self.fname)
|
||||
file_path = os.path.normpath(self.filepath_from_context(context))
|
||||
|
||||
abc_before = {
|
||||
c
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class FbxModelLoader(load.LoaderPlugin):
|
|||
def load(self, context, name=None, namespace=None, data=None):
|
||||
from pymxs import runtime as rt
|
||||
|
||||
filepath = os.path.normpath(self.fname)
|
||||
filepath = os.path.normpath(self.filepath_from_context(context))
|
||||
rt.FBXImporterSetParam("Animation", False)
|
||||
rt.FBXImporterSetParam("Cameras", False)
|
||||
rt.FBXImporterSetParam("Preserveinstances", True)
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class ObjLoader(load.LoaderPlugin):
|
|||
def load(self, context, name=None, namespace=None, data=None):
|
||||
from pymxs import runtime as rt
|
||||
|
||||
filepath = os.path.normpath(self.fname)
|
||||
filepath = os.path.normpath(self.filepath_from_context(context))
|
||||
self.log.debug("Executing command to import..")
|
||||
|
||||
rt.Execute(f'importFile @"{filepath}" #noPrompt using:ObjImp')
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ class ModelUSDLoader(load.LoaderPlugin):
|
|||
from pymxs import runtime as rt
|
||||
|
||||
# asset_filepath
|
||||
filepath = os.path.normpath(self.fname)
|
||||
filepath = os.path.normpath(self.filepath_from_context(context))
|
||||
import_options = rt.USDImporter.CreateOptions()
|
||||
base_filename = os.path.basename(filepath)
|
||||
filename, ext = os.path.splitext(base_filename)
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class PointCloudLoader(load.LoaderPlugin):
|
|||
"""load point cloud by tyCache"""
|
||||
from pymxs import runtime as rt
|
||||
|
||||
filepath = os.path.normpath(self.fname)
|
||||
filepath = os.path.normpath(self.filepath_from_context(context))
|
||||
obj = rt.tyCache()
|
||||
obj.filename = filepath
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue