ill giv it a try in the morning :D
On Tue, May 2, 2017 at 8:35 PM, Michael Boon <[email protected]> wrote:
> If you run "p4 info" in a subprocess, you can then look up "Client root".
> Something like this:
> info = subprocess.check_output('p4 info')
> info = info.splitlines()
> info = [L.split(':', 1) for L in info]
> info = dict(info)
> p4Root = info['Client root']
>
> You can then compare p4Root to the paths you're interested in, something
> like:
>
> p4Root = os.path.normcase(os.path.normpath(p4Root))
> path = os.path.normcase(os.path.normpath(path))if not path.startswith(p4Root):
> raise WhateverError()
>
>
>
>
> On Wednesday, 3 May 2017 06:39:25 UTC+10, [email protected] wrote:
>>
>> got an interesting issue at work.
>>
>> we use perforce for source control on all art assets. and do to a lack
>> in guidance, almost everyone on the art team has their perforce installs
>> done in different locations and paths
>>
>> ie :
>> D:/p4, E:/PROJECTS, C:/p4, et al
>>
>> Anyone have suggestions on how to setup the project paths so that it
>> would strip out the drive and root and just use the perforce directories as
>> teh root for the project? ...in our case, Interactive
>>
>> thanks
>> -todd
>>
>> --
>> Todd Widup
>> Creature TD / Technical Artist
>> [email protected]
>>
> --
> 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/89e8d241-1e5e-4c2d-bc46-
> 83f85d68df6f%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/89e8d241-1e5e-4c2d-bc46-83f85d68df6f%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
Todd Widup
Creature TD / Technical Artist
[email protected]
--
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/CABBPk35Nn3Qz5uCsEUhOf3KvrJDB8rFHu5cEXM5g%2B%2BHrZXOKqQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.