Giter Club home page Giter Club logo

Comments (6)

BigRoy avatar BigRoy commented on August 27, 2024

This seems to be something with QtCore.QUrl

url = QtCore.QUrl("E:/test/asset.usd")
print url.path()
# /test/asset.usd

url = QtCore.QUrl("file:E:/test/asset.usd")
print url.path()
#  E:/test/asset.usd

It seems here the value is still good, e.g. C:/Users/Roy/Desktop/usdAsset.usd but then here the path is wrong: C:C:/Users/Roy/Desktop/usdAsset.usd.

from usdmanager.

mds-dwa avatar mds-dwa commented on August 27, 2024

I'm not on a computer where I can test this right now, but I wonder what happens if we change line 2672 from link.setPath(fileStr) to link.setPath(QtCore.QUrl.fromLocalFile(fileStr).toString())? That's a little ugly, but there's a chance that would keep the QUrl extras we want like query strings, while converting E:/... to file:///E:/... so that it is properly found. It will probably take some more work in other places the current QUrl objects are used, but it might be a place to start!

from usdmanager.

mds-dwa avatar mds-dwa commented on August 27, 2024

I've made a slight tweak to how the logger is initialized so that your method of launching will work. Previously, it was always getting set back to logging.WARNING as a default unless you launched from the command line and gave flags for argparse to use. If you need something short-term, just delete the logger.setLevel(logging.WARNING) line in the _set_log_level method in __init__.py.

I've also got a probable fix for the file:// situation (definitely more involved than my initial one-line suggestion), but I won't be able to test it on a Windows machine until next week.

from usdmanager.

mds-dwa avatar mds-dwa commented on August 27, 2024

Release version 0.10.0 addresses the logging note and some other minor maintenance. The Windows file path issue is much more involved and may not be fully resolved yet. I have an alpha version you can test here: https://github.com/dreamworksanimation/usdmanager/tree/issue/17. Feedback and dev contributions are very welcome.

from usdmanager.

agelosc avatar agelosc commented on August 27, 2024

I'm leaving a small workaround here for this issue in case it helps someone.

you can create a windows batch file for usdmanager that changes the directory to the usd file path before loading the usdmanager python file with something like this:

cd /D %~dp1
py -2.7 usdmanager %~1

I'm under the impression that if a usdmanager.cmd file exists in the same scripts folder, windows will automatically pick that instead of the one without an extension when a usdmanager command is issued. I think Pixar has done something similar to this for its USD/bin folder.

Here's the complete batch file that worked for me:

@echo off
setlocal ENABLEDELAYEDEXPANSION
set USD_MANAGER_ROOT=C:/path/to/usdmanager/root
set USD_INSTALL_ROOT=C:/path/to/usd/root
set PYTHONPATH=%PYTHONPATH%;%USD_INSTALL_ROOT%\lib\python
set PATH=%PATH%;%USD_INSTALL_ROOT%\bin;%USD_INSTALL_ROOT%\lib;%USD_MANAGER_ROOT%\build\lib

cd /D %~dp1
py -2.7 %USD_MANAGER_ROOT%\scripts\usdmanager %~1
endlocal

from usdmanager.

mds-dwa avatar mds-dwa commented on August 27, 2024

I think the original issue here should be resolved by version 0.11.0 if you want to give it a try. (dev branch)

from usdmanager.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.