diff --git a/openpype/hosts/maya/startup/userSetup.py b/openpype/hosts/maya/startup/userSetup.py index 87025637b6..a2f6405980 100644 --- a/openpype/hosts/maya/startup/userSetup.py +++ b/openpype/hosts/maya/startup/userSetup.py @@ -29,43 +29,6 @@ if bool(int(os.environ.get(key, "0"))): ) -# Setup Xgen save callback. -def xgen_on_save(): - """Increments the xgen side car files .xgen and .xgd - - Only works when incrementing to the same directory. - """ - - file_path = current_file() - current_dir = os.path.dirname(file_path) - basename = os.path.basename(file_path).split(".")[0] - attrs = ["xgFileName", "xgBaseFile"] - for palette in cmds.ls(type="xgmPalette"): - for attr in attrs: - source = os.path.join( - current_dir, cmds.getAttr(palette + "." + attr) - ) - if not os.path.exists(source): - continue - - destination_basename = "{}__{}{}".format( - basename, - palette.replace(":", "_"), - os.path.splitext(source)[1] - ) - destination = os.path.join(current_dir, destination_basename) - - if source == destination: - continue - - shutil.copy(source, destination) - cmds.setAttr( - palette + "." + attr, destination_basename, type="string" - ) - - -register_event_callback("save", xgen_on_save) - # Build a shelf. settings = get_project_settings(os.environ['AVALON_PROJECT']) shelf_preset = settings['maya'].get('project_shelf') diff --git a/website/docs/artist_hosts_maya_xgen.md b/website/docs/artist_hosts_maya_xgen.md index 3f47428abe..fc75959f2b 100644 --- a/website/docs/artist_hosts_maya_xgen.md +++ b/website/docs/artist_hosts_maya_xgen.md @@ -27,10 +27,6 @@ Importing XGen Collections... # Error: XGen: Failed to import collection from file P:/PROJECTS/OP01_CG_demo/shots/sh040/work/Lighting/cg_ball_xgenMain_v035__ball_rigMain_01___collection.xgen # ``` -### Workfile Incremental Save - -When you increment the Maya workfile to a new version, all `.xgen` and `.xgd` files referenced by the Xgen collection in the workspace is incremented as well. - ## Create Create an Xgen instance to publish. This needs to contain only **one Xgen collection**.