Ah, I'm sorry that wasn't clear! Yeah we only work on windows, but have recently started sending renders to the cloud.. all linux so all fixes happen in advance of cloud submission.
On Mon, Nov 7, 2016 at 10:31 AM Justin Israel <[email protected]> wrote: > Oh you are always running this on windows? I thought you said it was meant > to run on linux to fix paths? Then I assume it only works on Windows > because Windows doesn't care about case when you glob anything and having > at least any wild card or character sets in your string just causes the > matching to happen. > > Basically that code won't work on Linux or osx > > On Tue, 8 Nov 2016, 6:39 AM Chad_Fox <[email protected]> wrote: > > Hey Justin, > > I wish I knew more to explain it, I also thought the regex shouldn't work > this way. Here's a screen grab of it working in maya. > > > https://drive.google.com/file/d/0BwpWBSTYSuJmN19jNVMzNzVOLTg/view?usp=sharing > > > > On Friday, October 28, 2016 at 12:39:13 PM UTC-7, Chad_Fox wrote: > > Hi all, > > I'd like to confirm if the paths written in maya (on windows) has the > correct character case. In otherwords I need to verify the path is good for > use on Linux. > > I have the following solution, but glob is ... not very fast. > > Would like to know if anyone here has come accross an effective/fast > solution for this problem. > > import glob > import re > import os > > def fix_path_case( path ): > case_on_disk_path = glob.glob( re.sub( r'([^:])(?=[/\\]|$)', r'[\1]' , > path ) )[0] > slash_fixed_path = os.path.realpath(case_on_disk_path ) > return slash_fixed_path > > # Real path on disk is ''W:/Shows/Proj/Pub/TEX/Proj_skin_DIF.1001.TIF' > bad_case_texture_path = 'W:/shOws/PRoj/PUB/tex/proj_skin_DIF.1001.tif' > #path in maya > > fixed_path = fix_path_case( path = bad_case_texture_path ) > > > > Thanks! > > Chad > > -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/0a696299-5319-436d-8fc9-bbee21e93565%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/0a696299-5319-436d-8fc9-bbee21e93565%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3Y12MpPbQj3n%2BEFpB7Xmn98Uuei%2BKokiEraKi840bjsw%40mail.gmail.com > <https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3Y12MpPbQj3n%2BEFpB7Xmn98Uuei%2BKokiEraKi840bjsw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAJ4oLs6yWMAk6cXNU3u_PfBJbfACk3uBsGXB-KkMExFe4O0QBg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
