Skip to content

Commit d5e041c

Browse files
authored
Vertex painting (#63)
* Vertex painting: paint profiles, surface paint and the paint stream Paint profiles (ChiselPaintProfile) say what paint means to a shader: modes, each a Color or a named Value, written to a vertex attribute (Color or TexCoord2-7) in some of its components (xyzw, xyz, or one). A generator keeps its surfaces' paint (ChiselSurfacePaint): per surface and attribute a grid of values in the surface's plane, in its own space; the cells are also the surface's subdivision. ChiselPaintManager gives each model's tree its paint in the model's space (CSGTree.SetPaint) and rebuilds the brushes whose paint changed. A render mesh with painted surfaces takes the attributes painted on it in a second vertex stream; its unpainted surfaces take the default. A mesh without paint keeps its layout. The paint of a surface is part of its hash, so a mesh that changes only in paint is not kept. Test shaders and materials with their profiles: Chisel/Test/Paint Color (vertex color) and Chisel/Test/Paint Value (TexCoord2.x). * Vertex painting: painted surfaces subdivided at their grid Each grid point of a surface's paint inside the surface becomes a vertex (PaintSubdivision), so the paint has vertices to land on: it is inserted as in an incremental Delaunay triangulation, splitting the triangle it is in or the two on the edge it is on, and the edges round it are flipped until the triangles round it are Delaunay. Points on or near the outline, or near a vertex, are left out, so the outline isn't cut and the surfaces it touches get no T-junctions. Only surfaces in the grid's plane or parallel to it are subdivided, at most 4096 points each. * Vertex painting: the paint tool, fill, sample, channels, weight groups The Chisel Paint tool (Tools > Chisel > Paint) paints the surface under the mouse in a mode of the paint profile of its material's shader: a color, or a named value, with a round brush (radius, strength, hardness) that paints, adds, subtracts, smooths or erases. A surface painted for the first time gets a grid over it of the tool's cell size (ChiselPaintBrush). Only the hit surface is painted; a stroke is one undo. Fill Surface sets the whole surface, control-click samples the paint under the mouse, and the channel buttons copy, swap or invert components. Modes in one group (ChiselPaintMode.group) are weights that sum to one: painting one takes from the others in their proportion. * Paint tool: pick only on mouse events, panel without a GUI window Picking renders, and the tool picked on every event, also inside the scene view's layout and repaint ("GUI Window tried to begin rendering while something else had not finished rendering"). It now picks on mouse move, down and drag only, and draws what it last picked. The panel was a GUI window, which needs the scene view's BeginWindows; it is a plain area now, and shows the modes of the surface last painted on, so they stay while the mouse is over the panel. * Paint tool: its settings in a scene view overlay The settings were drawn straight into the scene view, see-through and not like the other tool windows. They are a Chisel Paint overlay now, shown while the tool is active. * Paint profiles: an inspector for their modes A mode shows what its kind uses: a color mode its default color, a value mode one default for its components, its range and its group; the components are toggles, named RGBA for the Color attribute. A profile says when it has no shader, and warns when two modes write one component of one attribute. Also: FindObjectsByType without the obsolete sort mode in the decal editor. * Paint: the outline cut at the grid too, and a not-paintable cursor A painted surface's outline is cut where the grid meets it (its points on it, and where its lines cross it), so the surface is the grid's cells right up to its edges instead of fans from its corners. A point is put on an outline edge within a twentieth of a cell, on an edge inside only when it is on it. Over a surface whose shader has no paint profile the tool shows no brush but a not-allowed cursor, with a solid tooltip saying why; the overlay keeps one width. * Paint: drawn only under a shader that takes it The profile registry (ChiselPaintProfiles) moved to the components, with profiles registered in code next to the project's profile assets. Paint of a surface whose material's shader has no profile with a mode in its attribute is kept on the generator, but doesn't subdivide the surface or reach its mesh; it comes back with a material that takes it. * Paint: spacing per surface, modes as toggles The spacing of the points a surface is painted at is the surface's Paint Spacing (ChiselSurface, beside its material: only painting reads it, so it stays out of the details every brush polygon carries), shown for materials whose shader has a paint profile. Changing it resamples the surface's paint onto a grid of the new spacing. The paint tool's overlay shows every mode of the project's profiles, by name, as wrapping toggle buttons; a surface takes the chosen mode when its shader's profile has one of that name. Over a surface that doesn't, the tooltip says why, on three lines. * Paint: one settings asset, a tool among the Chisel tools The paint profiles are plain data in one project asset (ChiselPaintSettings, Assets/Chisel/ChiselPaintSettings.asset), edited in Project Settings > Chisel > Paint: the shaders, each with its remove button, and the chosen one's modes. A material's Chisel section says whether its shader is paintable, and its Configure Paintability Of Shader button opens that page on the shader's profile, adding one when it has none. The package's per-shader profile assets are gone; a new settings asset starts with the test shaders. The paint tool is one of the Chisel tools, with a brush icon. Its overlay shows the operations as wrapping toggles with icons (Add and Subtract only for a value), swatches and the recently painted colors under the color, and a thumbnail of the blob a dab paints next to strength and hardness. * Paint overlay: swatches, icon operations, modes as a list The color's swatches are kept per user and wrap over as many rows as they need; the chosen one is outlined, each has a border, a drag reorders them and a middle-click removes one. The last cell, the current color with a plus over it, adds a swatch and opens Unity's color picker on it. The operations are icon toggles (named in their tooltips) under Operations; the Mode label is gone. The not-paintable cursor stays where the scene had the mouse, so it isn't shown over the overlays. The settings page lists a profile's modes as a list with a header instead of a foldout. * Paint overlay: the add-swatch cell is the current color, inset As in Unity's color picker: no plus, the current color drawn smaller than a swatch inside an empty cell. * Paint overlay: smaller swatches without gaps Swatches are 14 pixels and share their border with their neighbours; the chosen one is outlined inside its cell. * Paint overlay: swatches start where the labels' text does * Check that compiled code lays out brush blobs as managed code does Once per domain, before the first brush registration, the sizes and offsets of BrushMeshBlob.Polygon, InternalChiselSurface and SurfaceDetails are measured managed and in a Burst-compiled job; a difference is logged as one error naming the fields. Growing SurfaceDetails once left code compiled for the old layout writing blobs managed code misread (polygons 8 bytes short), which broke every brush. * Paint: fill as an operation; swatches without duplicates Fill is one of the operations (a bucket icon): clicking a surface sets all of it to the color or value, and a stroke fills each surface it goes over once. The brush settings are disabled while it is chosen; the Fill Surface button is gone. Swatches hold a color once, compared as they are kept (8 bits a component): adding the current color when a swatch has it already chooses that swatch, and a color picked into a new swatch that another swatch has takes that one. The add cell takes only a left click. A right click on a swatch opens a menu to delete it, for those without a middle mouse button. The swatch borders are more subtle. * Remove duplicate paint tool icons The icon script wrote them again under the old name with spaces; the tool loads paint_tool. * Paint spacing is drawn once, with the surface details The surface's own paintSpacing field showed again under the details drawer (and for surfaces that can't be painted). * Paint: the brush's entity once per brush buffer, shorter comments A surface render buffer kept the brush's entity with its painted surface index; the entity is now the brush buffer's, once, and a surface keeps only its index (-1 without paint). The paint lookup says whether there is any paint with a flag set when it is made, rather than asking its hash map for every surface. Comments that described removed parts (the Fill Surface button, the cell size, the profile assets) are brought up to date. * Paint: a paintable shader's attributes are always in its meshes A render mesh drawn with a material whose shader has a paint profile gets the profile's attributes, at their modes' defaults where nothing is painted, so the shader never reads an attribute the mesh lacks. Materials are registered as surfaces take them (ChiselPaintMaterials, as the hotspot store does); what their shaders take comes from the paint profiles, and a change to it rebuilds every brush once, before the next build. A surface's hash takes its material's paint attributes, so their meshes are written again. * Paint tool: no channels section Copying, swapping and inverting components of a surface's paint is gone from the overlay, and with it from the paint brush. * Paint: kept by the tree between updates, replaced per entity The tree keeps its paint with the ranges and hashes an update looks up, made when the paint changes rather than copied and hashed at every update; an update reads views of it. Paint is replaced one entity at a time: only that entity's layers are hashed, its old values are left behind until they are half of all values, then compacted. The materials' paint attributes are copied to the tree only when they change. * Paint subdivision: edges looked up, points located by walking The triangle across an edge comes from a map of edges kept with the triangles, and a point is found by walking from the triangle the last point went into (the grid's points come row by row), rather than by scanning every triangle for each; a point the walk doesn't find is still looked for in every triangle. A grid at the most points a surface gets is tested too. * Paint: a paint change builds the painted brush only Paint doesn't change a brush's shape, so its brushes are marked with a new surfaces-only flag (SetSurfacesDirty) instead of as reshaped: the brush is built again, the brushes touching it aren't. * Paint manager: only the generators whose paint changed A generator says its paint changed (PaintChanged, its paint set or removed, enabled, disabled, validated) and only those, and the painted generators that moved, are given to their trees again, one entity at a time (CSGTree.SetPaint with an entity). Every generator is looked at only when what shaders take may have changed. A generator that loses all of its paint, or is disabled, has its paint taken from the tree and its brushes built again. * Paint: values and mesh streams packed A grid point keeps only the components its paint has, in the generator's grid, in the tree's values and in what a vertex samples (x, y, z, w in that order), so the generator's values go to the tree as they are. In the render mesh the color is 4 bytes (UNorm8) and a texture coordinate has floats up to its last painted component; the materials' paint attributes carry their components for that. * Paint: a broken grid starts again; only painted generators held A surface whose grid isn't whole (its values didn't load) gets a new grid when it is painted, rather than the brush stopping at it. The paint manager only keeps the generators with paint, or whose paint a tree has, so a destroyed model's meshes aren't kept loaded through the others.
1 parent 5a07526 commit d5e041c

176 files changed

Lines changed: 10088 additions & 5 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Components/Components/Base/ChiselGeneratorComponent.cs‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,40 @@ public abstract class ChiselGeneratorComponent : ChiselNodeComponent, IChiselHas
185185
// Scenes saved before contents existed load as Solid.
186186
[SerializeField, HideInInspector] protected int contents; // NOTE: do not rename, name is directly used in editors
187187
[SerializeField] protected Vector3 pivotOffset = Vector3.zero;
188+
// The paint of the generator's surfaces, a grid per surface and vertex attribute (ChiselSurfacePaint)
189+
[SerializeField, HideInInspector] System.Collections.Generic.List<ChiselSurfacePaint> surfacePaint = new();
190+
191+
public System.Collections.Generic.IReadOnlyList<ChiselSurfacePaint> SurfacePaint => surfacePaint;
192+
193+
/// <summary>The paint of a surface in an attribute, or null</summary>
194+
public ChiselSurfacePaint GetSurfacePaint(int surfaceIndex, ChiselPaintAttribute attribute)
195+
{
196+
foreach (var paint in surfacePaint)
197+
{
198+
if (paint != null && paint.surfaceIndex == surfaceIndex && paint.attribute == attribute)
199+
return paint;
200+
}
201+
return null;
202+
}
203+
204+
/// <summary>Gives a surface this paint in its attribute, in place of what it had</summary>
205+
public void SetSurfacePaint(ChiselSurfacePaint paint)
206+
{
207+
if (paint == null)
208+
return;
209+
surfacePaint.RemoveAll(other => other == null || (other.surfaceIndex == paint.surfaceIndex && other.attribute == paint.attribute));
210+
surfacePaint.Add(paint);
211+
ChiselPaintManager.SetDirty(this);
212+
}
213+
214+
public void RemoveSurfacePaint(int surfaceIndex, ChiselPaintAttribute attribute)
215+
{
216+
if (surfacePaint.RemoveAll(other => other == null || (other.surfaceIndex == surfaceIndex && other.attribute == attribute)) > 0)
217+
ChiselPaintManager.SetDirty(this);
218+
}
219+
220+
/// <summary>Called after the values of a surface's paint were changed in place</summary>
221+
public void PaintChanged() => ChiselPaintManager.SetDirty(this);
188222

189223
public override CSGTreeNode TopTreeNode
190224
{
@@ -416,9 +450,16 @@ protected override void OnValidateState()
416450

417451
if (TopTreeNode.Dirty)
418452
ChiselNodeHierarchyManager.NotifyContentsModified(this);
453+
ChiselPaintManager.SetDirty(this);
419454
base.OnValidateState();
420455
}
421456

457+
protected override void OnEnable()
458+
{
459+
base.OnEnable();
460+
ChiselPaintManager.SetDirty(this);
461+
}
462+
422463
public override void UpdateTransformation()
423464
{
424465
// TODO: recalculate transformation based on hierarchy up to (but not including) model
@@ -444,6 +485,7 @@ protected override void OnDisable()
444485
{
445486
base.OnDisable();
446487
DestroyChildTreeNodes();
488+
ChiselPaintManager.SetDirty(this);
447489
}
448490

449491
[HideInInspector] int prevMaterialHash;

‎Components/Components/Paint.meta‎

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Components/Components/Paint/ChiselPaintBrush.cs‎

Lines changed: 321 additions & 0 deletions
Large diffs are not rendered by default.

‎Components/Components/Paint/ChiselPaintBrush.cs.meta‎

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using Chisel.Core;
4+
using UnityEngine;
5+
6+
namespace Chisel.Components
7+
{
8+
/// <summary>What a paint mode writes: a color the brush paints with, or a value per component</summary>
9+
public enum ChiselPaintKind : byte
10+
{
11+
/// <summary>A color, written to the mode's components (rgba, or rgb)</summary>
12+
Color = 0,
13+
/// <summary>A number (a height, wetness, a layer's weight): painted up or down with strength and falloff</summary>
14+
Value = 1
15+
}
16+
17+
/// <summary>One thing a shader takes from paint: what it is called, and where it goes in the vertices</summary>
18+
[Serializable]
19+
public struct ChiselPaintMode
20+
{
21+
public string name;
22+
public ChiselPaintKind kind;
23+
public ChiselPaintAttribute attribute;
24+
public ChiselPaintComponents components;
25+
/// <summary>What an unpainted surface has, in all four components</summary>
26+
public Vector4 defaultValue;
27+
/// <summary>A value mode's lowest and highest value</summary>
28+
public Vector2 range;
29+
/// <summary>Modes of one group (above 0), in components of one attribute, are weights that sum to one: painting
30+
/// one of them takes from the others (blending material layers)</summary>
31+
public int group;
32+
33+
public static ChiselPaintMode Color(string name, ChiselPaintAttribute attribute = ChiselPaintAttribute.Color,
34+
ChiselPaintComponents components = ChiselPaintComponents.XYZW)
35+
{
36+
return new ChiselPaintMode { name = name, kind = ChiselPaintKind.Color, attribute = attribute, components = components,
37+
defaultValue = Vector4.one, range = new Vector2(0, 1) };
38+
}
39+
40+
public static ChiselPaintMode Value(string name, ChiselPaintAttribute attribute, ChiselPaintComponents components,
41+
float defaultValue = 0, float min = 0, float max = 1)
42+
{
43+
return new ChiselPaintMode { name = name, kind = ChiselPaintKind.Value, attribute = attribute, components = components,
44+
defaultValue = new Vector4(defaultValue, defaultValue, defaultValue, defaultValue),
45+
range = new Vector2(min, max) };
46+
}
47+
}
48+
49+
/// <summary>
50+
/// What paint means to a shader: the modes a surface drawn with it can be painted in. The shader shows the paint;
51+
/// Chisel only writes it to the vertex attributes the modes name. Two modes don't write one component of one attribute.
52+
/// </summary>
53+
[Serializable]
54+
public sealed class ChiselPaintProfile
55+
{
56+
public Shader shader;
57+
public List<ChiselPaintMode> modes = new();
58+
59+
/// <summary>The components of the other modes in a mode's group (in its attribute); None when it has no group</summary>
60+
public ChiselPaintComponents GroupOf(int mode)
61+
{
62+
var result = ChiselPaintComponents.None;
63+
if (mode < 0 || mode >= modes.Count || modes[mode].group <= 0)
64+
return result;
65+
for (int i = 0; i < modes.Count; i++)
66+
{
67+
if (i != mode && modes[i].group == modes[mode].group && modes[i].attribute == modes[mode].attribute)
68+
result |= modes[i].components;
69+
}
70+
return result & ~modes[mode].components;
71+
}
72+
73+
/// <summary>The first two modes that write one component of one attribute; false when there are none</summary>
74+
public bool FindOverlap(out int first, out int second)
75+
{
76+
for (first = 0; first < modes.Count; first++)
77+
{
78+
for (second = first + 1; second < modes.Count; second++)
79+
{
80+
if (modes[first].attribute == modes[second].attribute &&
81+
(modes[first].components & modes[second].components) != 0)
82+
return true;
83+
}
84+
}
85+
first = second = -1;
86+
return false;
87+
}
88+
}
89+
}

‎Components/Components/Paint/ChiselPaintProfile.cs.meta‎

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
using System.Collections.Generic;
2+
using Chisel.Core;
3+
using UnityEngine;
4+
5+
namespace Chisel.Components
6+
{
7+
/// <summary>The project's paint profiles (<see cref="ChiselPaintSettings"/>), by the shader they are for</summary>
8+
public static class ChiselPaintProfiles
9+
{
10+
static Dictionary<Shader, ChiselPaintProfile> s_ByShader;
11+
// profiles registered in code, which come first
12+
static readonly List<ChiselPaintProfile> s_Registered = new();
13+
14+
public static void Register(ChiselPaintProfile profile)
15+
{
16+
if (profile != null && !s_Registered.Contains(profile))
17+
s_Registered.Add(profile);
18+
SetDirty();
19+
ChiselPaintManager.SetDirty();
20+
}
21+
22+
public static void Unregister(ChiselPaintProfile profile)
23+
{
24+
s_Registered.Remove(profile);
25+
SetDirty();
26+
ChiselPaintManager.SetDirty();
27+
}
28+
29+
/// <summary>Called when profiles may have been added, removed or changed</summary>
30+
public static void SetDirty()
31+
{
32+
s_ByShader = null;
33+
ChiselPaintMaterials.Changed();
34+
}
35+
36+
// The attributes a material's shader takes paint in, each with the defaults of its modes
37+
static void Resolve(Material material, List<ChiselPaintMaterialSlot> slots)
38+
{
39+
var profile = Find(material.shader);
40+
if (profile == null)
41+
return;
42+
foreach (var mode in profile.modes)
43+
{
44+
var index = slots.FindIndex(slot => slot.attribute == mode.attribute);
45+
if (index < 0)
46+
{
47+
slots.Add(new ChiselPaintMaterialSlot { attribute = mode.attribute });
48+
index = slots.Count - 1;
49+
}
50+
var slot = slots[index];
51+
slot.defaultValue = ChiselPaintLayer.Apply(mode.defaultValue, slot.defaultValue, mode.components);
52+
slot.components |= mode.components;
53+
slots[index] = slot;
54+
}
55+
}
56+
57+
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
58+
static void Hook()
59+
{
60+
ChiselPaintMaterials.Resolver = Resolve;
61+
ChiselPaintMaterials.Changed();
62+
}
63+
64+
public static ChiselPaintProfile Find(Shader shader)
65+
{
66+
if (shader == null)
67+
return null;
68+
foreach (var registered in s_Registered)
69+
{
70+
if (registered != null && registered.shader == shader)
71+
return registered;
72+
}
73+
Load();
74+
return s_ByShader.TryGetValue(shader, out var found) ? found : null;
75+
}
76+
77+
/// <summary>Every profile: those registered in code, then the project's (unless one in code is for its shader)</summary>
78+
public static IEnumerable<ChiselPaintProfile> All
79+
{
80+
get
81+
{
82+
foreach (var registered in s_Registered)
83+
{
84+
if (registered != null)
85+
yield return registered;
86+
}
87+
Load();
88+
foreach (var profile in s_ByShader.Values)
89+
{
90+
if (profile != null && Find(profile.shader) == profile)
91+
yield return profile;
92+
}
93+
}
94+
}
95+
96+
static void Load()
97+
{
98+
if (s_ByShader == null)
99+
{
100+
s_ByShader = new Dictionary<Shader, ChiselPaintProfile>();
101+
var settings = ChiselPaintSettings.Project;
102+
if (settings)
103+
{
104+
foreach (var profile in settings.profiles)
105+
{
106+
if (profile != null && profile.shader != null)
107+
s_ByShader.TryAdd(profile.shader, profile);
108+
}
109+
}
110+
}
111+
}
112+
113+
/// <summary>Whether surfaces drawn with this material take paint in this attribute: its shader's profile has a mode
114+
/// in it. Paint of a surface whose material doesn't is kept, but not drawn and not subdividing it.</summary>
115+
public static bool TakesPaint(Material material, ChiselPaintAttribute attribute)
116+
{
117+
var profile = material ? Find(material.shader) : null;
118+
if (profile == null)
119+
return false;
120+
foreach (var mode in profile.modes)
121+
{
122+
if (mode.attribute == attribute)
123+
return true;
124+
}
125+
return false;
126+
}
127+
128+
#if UNITY_EDITOR
129+
[UnityEditor.InitializeOnLoadMethod]
130+
static void Initialize()
131+
{
132+
Hook();
133+
UnityEditor.EditorApplication.projectChanged += () =>
134+
{
135+
SetDirty();
136+
ChiselPaintManager.SetDirty();
137+
};
138+
}
139+
#endif
140+
}
141+
}

‎Components/Components/Paint/ChiselPaintProfiles.cs.meta‎

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
using System.Collections.Generic;
2+
using UnityEngine;
3+
4+
namespace Chisel.Components
5+
{
6+
/// <summary>
7+
/// The project's paint profiles: one per shader whose surfaces can be painted, in one asset, edited in
8+
/// Project Settings > Chisel > Paint
9+
/// </summary>
10+
public sealed class ChiselPaintSettings : ScriptableObject
11+
{
12+
public const string kAssetPath = "Assets/Chisel/ChiselPaintSettings.asset";
13+
14+
public List<ChiselPaintProfile> profiles = new();
15+
16+
static ChiselPaintSettings s_Project;
17+
18+
/// <summary>The project's paint settings, null when it has none</summary>
19+
public static ChiselPaintSettings Project
20+
{
21+
get
22+
{
23+
#if UNITY_EDITOR
24+
if (!s_Project)
25+
{
26+
s_Project = UnityEditor.AssetDatabase.LoadAssetAtPath<ChiselPaintSettings>(kAssetPath);
27+
if (!s_Project)
28+
{
29+
foreach (var guid in UnityEditor.AssetDatabase.FindAssets("t:" + nameof(ChiselPaintSettings)))
30+
{
31+
s_Project = UnityEditor.AssetDatabase.LoadAssetAtPath<ChiselPaintSettings>(UnityEditor.AssetDatabase.GUIDToAssetPath(guid));
32+
if (s_Project)
33+
break;
34+
}
35+
}
36+
}
37+
#endif
38+
return s_Project;
39+
}
40+
set
41+
{
42+
s_Project = value;
43+
Changed();
44+
}
45+
}
46+
47+
/// <summary>The first profile for a shader, or null</summary>
48+
public ChiselPaintProfile Find(Shader shader)
49+
{
50+
if (!shader)
51+
return null;
52+
foreach (var profile in profiles)
53+
{
54+
if (profile != null && profile.shader == shader)
55+
return profile;
56+
}
57+
return null;
58+
}
59+
60+
/// <summary>Called after the profiles changed</summary>
61+
public static void Changed()
62+
{
63+
ChiselPaintProfiles.SetDirty();
64+
ChiselPaintManager.SetDirty();
65+
}
66+
67+
void OnEnable()
68+
{
69+
if (!s_Project)
70+
s_Project = this;
71+
Changed();
72+
}
73+
74+
void OnValidate() => Changed();
75+
}
76+
}

0 commit comments

Comments
 (0)