FRBDK/Glue/Glue/Plugins/ExportedImplementations/CommandInterfaces/ProjectCommands.cs
/// <summary>
/// Updates the presence of the RFS in the main project.  If the RFS has project specific files, then those
/// files are updated in the appropriate synced project.  
/// </summary>
/// <remarks>
/// This method does not update synced projects if the synced projects use the same file.  The reason is because
/// this is taken care of when the projects are saved later on.
/// </remarks>
/// <param name="referencedFileSave">The RFS representing the file to update membership on.</param>
/// <returns>Whether anything was added to any projects.</returns>
Updates the presence of the RFS in the main project.  If the RFS has project specific files, then those
files are updated in the appropriate synced project.
Updates the presence of the RFS in the main project . If the RFS has project specific files then those files are updated in the appropriate synced project .
public bool UpdateFileMembershipInProject(ReferencedFileSave referencedFileSave)
        {
            var assetTypeInfo = referencedFileSave.GetAssetTypeInfo();
            bool shouldSkip = assetTypeInfo != null && assetTypeInfo.ExcludeFromContentProject;
            bool wasAnythingAdded = false;
            if (!shouldSkip)
            {
                bool useContentPipeline = referencedFileSave.UseContentPipeline || (assetTypeInfo != null && assetTypeInfo.MustBeAddedToContentPipeline);
                wasAnythingAdded = UpdateFileMembershipInProject(GlueState.Self.CurrentMainProject, referencedFileSave.GetRelativePath(), useContentPipeline, false);
                foreach (ProjectSpecificFile projectSpecificFile in referencedFileSave.ProjectSpecificFiles)
                {
                    wasAnythingAdded |= UpdateFileMembershipInProject(ProjectManager.GetProjectByName(projectSpecificFile.ProjectName), projectSpecificFile.FilePath, useContentPipeline, true);
                }
                if (wasAnythingAdded)
                {
                    int m = 3;
                }
            }
            return wasAnythingAdded;
        }
public bool UpdateFileMembershipInProject ( ReferencedFileSave referencedFileSave ) { var assetTypeInfo = referencedFileSave . GetAssetTypeInfo ( ) ; bool shouldSkip = assetTypeInfo != null && assetTypeInfo . ExcludeFromContentProject ; bool wasAnythingAdded = false ; if ( ! shouldSkip ) { bool useContentPipeline = referencedFileSave . UseContentPipeline || ( assetTypeInfo != null && assetTypeInfo . MustBeAddedToContentPipeline ) ; wasAnythingAdded = UpdateFileMembershipInProject ( GlueState . Self . CurrentMainProject , referencedFileSave . GetRelativePath ( ) , useContentPipeline , false ) ; foreach ( ProjectSpecificFile projectSpecificFile in referencedFileSave . ProjectSpecificFiles ) { wasAnythingAdded |= UpdateFileMembershipInProject ( ProjectManager . GetProjectByName ( projectSpecificFile . ProjectName ) , projectSpecificFile . FilePath , useContentPipeline , true ) ; } if ( wasAnythingAdded ) { int m = 3 ; } } return wasAnythingAdded ; }
Updates the presence of the RFS in the main project.
Updates the presence of the RFS in the main project .
Whether anything was added to any projects.
Whether anything was added to any projects .
referencedFileSave
ReferencedFileSave
The RFS representing the file to update membership on.
The RFS representing the file to update membership on .
remarks
This method does not update synced projects if the synced projects use the same file.  The reason is because
this is taken care of when the projects are saved later on.
This method does not update synced projects if the synced projects use the same file . The reason is because this is taken care of when the projects are saved later on .