Forgive me for perhaps missing a step here... but how do you detect the
fact that you close the scene, maya exists or maya crashes?
--- meaning, when to know to remove the lock file?


Fredrik



On Mon, Aug 4, 2014 at 11:24 AM, Chris Gardner <chr...@chris-g.net> wrote:

> Hi Marcus,
>
> Yeah, i'm an old softie, so i'm basically replicating that behavior inside
> maya.
>
> Thanks for your suggestions - i'll have a look and see what's
> applicable. I've used something similar to watchdog in another
> context.
>
> I'm working around it by storing a global var, as i have a callback on
> scene open as well, and that seems to do the trick. However, i'd
> prefer a more elegant way if possible.
>
> cheers,
> chrisg
>
>
> On 4 August 2014 17:30, Marcus Ottosson <konstrukt...@gmail.com> wrote:
> > Are you familiar with how Softimage does it?
> >
> > In a nutshell, whenever a user opens a file, a file with the same name
> and a
> > "LOCK" extension is looked up. If none is found, a new one is created and
> > the users workstation name is written into it, and if one is found, the
> user
> > is alerted with the contained workstation name.
> >
> > You should be able to accomplish the same using the method you described.
> >
> > Monitoring changes however is probably a different topic and may not be
> what
> > you're after, but there are generally two method of accomplishing it;
> > polling or grabbing a file handle. For polling, you could have a look at
> > Watchdog, a library for Python. It should help guide you through what it
> > means to monitor file-system changes.
>
> --
> 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 python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CAPoKtNfMe-A1sJJP8ZxYMEq0exVKmfJZzijscVaQYwH34UwyTg%40mail.gmail.com
> .
> 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 python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAD%3DwhWMJR5B9cNef_%3DKD2g-tDH7_jxaJf%2B_5MrL_2i1E%2BghsDQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to