Prevent save on patch

Hi, i need to prevent patch from saving, and to suppress save dialog on that patch.

Mark as readonly did’t help for some reason, patch just getting overwritten without readonly flag anymore…

Any more ideas?

This is dirty as hell but what if you set the readonly flag from a C# plugin ? Just for testing purposes, definitely not a proper solution :)

#region usings
using System;
using System.ComponentModel.Composition;

using VVVV.PluginInterfaces.V1;
using System.IO;
using VVVV.PluginInterfaces.V2;
using VVVV.Utils.VColor;
using VVVV.Utils.VMath;

using VVVV.Core.Logging;
#endregion usings

namespace VVVV.Nodes
	#region PluginInfo
	[PluginInfo(Name = "SetReadonly", Category = "File", AutoEvaluate = true)]
	#endregion PluginInfo
	public class FileSetReadonlyNode : IPluginEvaluate
		#region fields & pins
		[Input("Path", StringType = StringType.Filename)]
		public ISpread<string> FPathIn;
		[Input("Set Readonly")]
		public ISpread<bool> FSetIn;

		public ISpread<double> FOutput;

		public ILogger FLogger;
		#endregion fields & pins

		//called when data for any output pin is requested
		public void Evaluate(int SpreadMax)
			FOutput.SliceCount = SpreadMax;
				File.SetAttributes(FPathIn[0], FileAttributes.ReadOnly);
				File.SetAttributes(FPathIn[0], ~FileAttributes.ReadOnly);

Works here !

Self (VVVV) should help with this.

Hmm seems Query Save 0 on self node did actually started to prevent patch from saving even without SetReadonly flag

The plug makes file hidden without way to unhide it hehe

the answer was quite plane easy hehe

Query Save disable only prevents the save dialog popping up, forceful saving still overwrites though

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.