public void OnEnable() { skinMap = (ObiTriangleSkinMap)target; barycentricWeight = serializedObject.FindProperty("barycentricWeight"); normalAlignmentWeight = serializedObject.FindProperty("normalAlignmentWeight"); elevationWeight = serializedObject.FindProperty("elevationWeight"); paintBrush = new ObiRaycastBrush(skinMap.slave, () => { // As RecordObject diffs with the end of the current frame, // and this is a multi-frame operation, we need to use RegisterCompleteObjectUndo instead. Undo.RegisterCompleteObjectUndo(skinMap, "Paint skin channel"); }, () => { SceneView.RepaintAll(); }, () => { EditorUtility.SetDirty(skinMap); }); currentProperty = new ObiSkinMapChannel(this); paintBrush.brushMode = new ObiMasterSlavePaintBrushMode(currentProperty); Selection.selectionChanged += OnSelectionChange; }
public void OnEnable() { skinMap = (ObiTriangleSkinMap)target; availableChannels = new string[32]; for (int i = 0; i < 32; ++i) { availableChannels[i] = i.ToString(); } }
public void OnEnable() { skinMap = (ObiTriangleSkinMap)target; availableChannels = new string[32]; for (int i = 0; i < 32; ++i) { availableChannels[i] = i.ToString(); } SceneView.onSceneGUIDelegate += this.OnSceneGUI; }