File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -117,14 +117,24 @@ def setup_project(self, artella_local_root_path):
117117 :param str artella_local_root_path: current user Artella local root path
118118 """
119119
120+ if not artella_local_root_path :
121+ logger .warning ('No Project Path to setup. Skipping setup project ...' )
122+ return
123+
124+ artella_local_root_path = utils .clean_path (artella_local_root_path )
125+ if utils .is_python2 ():
126+ artella_local_root_path = artella_local_root_path .decode ('utf-8' )
120127 artella_local_root_path = cmds .encodeString (artella_local_root_path )
121- mel .eval ('setProject "%s"' % artella_local_root_path .replace ('\\ ' , '\\ \\ ' ))
128+ mel .eval ('setProject "%s"' % artella_local_root_path .replace ('\\ ' , '/ ' ))
122129 cmds .workspace (directory = artella_local_root_path )
123130 cmds .workspace (fileRule = ['sourceImages' , '' ])
124131 cmds .workspace (fileRule = ['scene' , '' ])
125132 cmds .workspace (fileRule = ['mayaAscii' , '' ])
126133 cmds .workspace (fileRule = ['mayaBinary' , '' ])
127- logger .info ('Set Maya Workspace Path: {}' .format (artella_local_root_path ))
134+ if utils .is_python2 ():
135+ logger .info ('Set Maya Workspace Path: {}' .format (artella_local_root_path .encode ('utf-8' )))
136+ else :
137+ logger .info ('Set Maya Workspace Path: {}' .format (artella_local_root_path ))
128138
129139 def validate_environment_for_callback (self , callback_name ):
130140 """
You can’t perform that action at this time.
0 commit comments