Whay is the value of sceneNameToOpen? Have you tried it with forward
slashes?

On Wed, May 30, 2018, 7:07 AM gnn <tanue...@gmail.com> wrote:

> Hello all,
> i don't know why maya open a scene in python with this part of a script:
>
> # open maya scene:
> cmds.file( sceneNameToOpen, open=True, force=True, prompt=False )
> # result:"D:\scenePath\SceneName.ma"
>
> and didn't open it when i test without references and selective preload
> (it seems to delete slashes?!):
>
> # open maya scene without references:
> cmds.file( sceneNameToOpen, lrd = 'none' , buildLoadSettings=True
> ,open=True , force=True, prompt=False )
> cmds.optionVar(stringValue=('preloadRefEdTopLevelFile', sceneNameToOpen))
> mel.eval('PreloadReferenceEditor;')
> # Error: line 1: File not found: "D:scenePath SceneName.ma" //
>
> any idea is welcome :)
>
> --
> 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/ab927de3-813a-4abd-852d-9c170dfc287a%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/ab927de3-813a-4abd-852d-9c170dfc287a%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 python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3e-mW3Sa97b%2BRGGgN4qekeQqUCk0OwbVKfSFQONebQ_A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to