private bool RendererFilter(ICmpRenderer r) { GameObject obj = (r as Component).GameObj; DesignTimeObjectData data = CorePluginRegistry.GetDesignTimeData(obj); return(!data.IsHidden); }
public static HelpInfo FromMember(MemberInfo member) { if (member == null) { return(null); } XmlCodeDoc.Entry doc = CorePluginRegistry.GetXmlCodeDoc(member); if (doc != null) { HelpInfo info = new HelpInfo(); info.id = member.GetMemberId(); info.topic = member.Name; info.desc = ""; if (doc.Summary != null) { info.desc += doc.Summary; } if (doc.Remarks != null) { info.desc += "\n\n" + doc.Remarks; } return(info); } return(CreateNotAvailable(member.Name)); }
private IEnumerable <RigidBody> QueryVisibleColliders() { var allColliders = Scene.Current.FindComponents <RigidBody>(); return(allColliders.Where(r => r.Active && !CorePluginRegistry.GetDesignTimeData(r.GameObj).IsHidden&& this.IsCoordInView(r.GameObj.Transform.Pos, r.BoundRadius))); }
public override List <CamViewState.SelObj> PickSelObjIn(int x, int y, int w, int h) { HashSet <ICmpRenderer> picked = this.PickRenderersIn(x, y, w, h); return(picked .OfType <Component>() .Where(r => !CorePluginRegistry.GetDesignTimeData(r.GameObj).IsLocked) .Select(r => new SelGameObj(r.GameObj) as SelObj) .ToList()); }
protected bool RendererFilter(ICmpRenderer r) { GameObject obj = (r as Component).GameObj; if (obj.RigidBody == null || !(r as Component).Active) { return(false); } DesignTimeObjectData data = CorePluginRegistry.GetDesignTimeData(obj); return(!data.IsHidden); }
public override CamViewState.SelObj PickSelObjAt(int x, int y) { Component picked = this.PickRendererAt(x, y) as Component; if (picked != null && CorePluginRegistry.GetDesignTimeData(picked.GameObj).IsLocked) { picked = null; } if (picked != null) { return(new SelGameObj(picked.GameObj)); } return(null); }
protected override void OnKeyDown(KeyEventArgs e) { if (e.KeyCode == Keys.Return) { GameObject[] values = this.GetValue().Cast <GameObject>().ToArray(); var actions = CorePluginRegistry.GetEditorActions <GameObject>(CorePluginRegistry.ActionContext_OpenRes, values); var action = actions.FirstOrDefault(); if (action != null) { action.Perform(values); } e.Handled = true; } base.OnKeyDown(e); }
protected override void LoadPlugin() { base.LoadPlugin(); CorePluginRegistry.RegisterTypeImage(typeof(LightingTechnique), DynLightResCache.IconResLightingTechnique); CorePluginRegistry.RegisterTypeImage(typeof(LightingSpriteRenderer), DynLightResCache.IconCmpLightingSpriteRenderer); CorePluginRegistry.RegisterTypeImage(typeof(LightingAnimSpriteRenderer), DynLightResCache.IconCmpLightingSpriteRenderer); CorePluginRegistry.RegisterTypeImage(typeof(Light), DynLightResCache.IconLight); CorePluginRegistry.RegisterTypeCategory(typeof(LightingTechnique), GeneralRes.Category_Graphics); CorePluginRegistry.RegisterTypeCategory(typeof(LightingSpriteRenderer), GeneralRes.Category_Graphics); CorePluginRegistry.RegisterTypeCategory(typeof(LightingAnimSpriteRenderer), GeneralRes.Category_Graphics); CorePluginRegistry.RegisterTypeCategory(typeof(Light), GeneralRes.Category_Graphics); CorePluginRegistry.RegisterDataConverter <Component>(new LightingRendererFromMaterial()); }
protected override void LoadPlugin() { base.LoadPlugin(); CorePluginRegistry.RegisterTypeImage(typeof(DataNode), PluginRes.ResourceHackerResCache.IconPrimitive); CorePluginRegistry.RegisterTypeImage(typeof(ArrayNode), PluginRes.ResourceHackerResCache.IconArray); CorePluginRegistry.RegisterTypeImage(typeof(StructNode), PluginRes.ResourceHackerResCache.IconObject); CorePluginRegistry.RegisterTypeImage(typeof(ObjectRefNode), PluginRes.ResourceHackerResCache.IconObjectRef); CorePluginRegistry.RegisterTypeImage(typeof(TypeDataLayoutNode), PluginRes.ResourceHackerResCache.IconClass); CorePluginRegistry.RegisterTypeImage(typeof(MemberInfoNode), PluginRes.ResourceHackerResCache.IconMethod); CorePluginRegistry.RegisterTypeImage(typeof(DelegateNode), PluginRes.ResourceHackerResCache.IconDelegate); // Register PropertyEditor provider CorePluginRegistry.RegisterPropertyEditorProvider(new PropertyEditors.PropertyEditorProvider()); }
protected override void LoadPlugin() { base.LoadPlugin(); // Register conversion actions CorePluginRegistry.RegisterEditorAction(new EditorAction <Pixmap> (EditorBaseRes.ActionName_CreateTexture, CoreRes.IconResTexture, this.ActionPixmapCreateTexture, EditorBaseRes.ActionDesc_CreateTexture), CorePluginRegistry.ActionContext_ContextMenu); CorePluginRegistry.RegisterEditorAction(new EditorAction <Texture> (EditorBaseRes.ActionName_CreateMaterial, CoreRes.IconResMaterial, this.ActionTextureCreateMaterial, EditorBaseRes.ActionDesc_CreateMaterial), CorePluginRegistry.ActionContext_ContextMenu); CorePluginRegistry.RegisterEditorAction(new EditorGroupAction <AudioData> (EditorBaseRes.ActionName_CreateSound, CoreRes.IconResSound, this.ActionAudioDataCreateSound, EditorBaseRes.ActionDesc_CreateSound), CorePluginRegistry.ActionContext_ContextMenu); CorePluginRegistry.RegisterEditorAction(new EditorGroupAction <AbstractShader> (EditorBaseRes.ActionName_CreateShaderProgram, CoreRes.IconResShaderProgram, this.ActionShaderCreateProgram, EditorBaseRes.ActionDesc_CreateShaderProgram), CorePluginRegistry.ActionContext_ContextMenu); // Register open actions CorePluginRegistry.RegisterEditorAction(new EditorAction <Pixmap> (null, null, this.ActionPixmapOpenRes, EditorBaseRes.ActionDesc_OpenResourceExternal), CorePluginRegistry.ActionContext_OpenRes); CorePluginRegistry.RegisterEditorAction(new EditorAction <AudioData> (null, null, this.ActionAudioDataOpenRes, EditorBaseRes.ActionDesc_OpenResourceExternal), CorePluginRegistry.ActionContext_OpenRes); CorePluginRegistry.RegisterEditorAction(new EditorAction <AbstractShader> (null, null, this.ActionAbstractShaderOpenRes, EditorBaseRes.ActionDesc_OpenResourceExternal), CorePluginRegistry.ActionContext_OpenRes); CorePluginRegistry.RegisterEditorAction(new EditorAction <Prefab> (null, null, this.ActionPrefabOpenRes, EditorBaseRes.ActionDesc_InstantiatePrefab), CorePluginRegistry.ActionContext_OpenRes); CorePluginRegistry.RegisterEditorAction(new EditorAction <Scene> (null, null, this.ActionSceneOpenRes, EditorBaseRes.ActionDesc_OpenScene), CorePluginRegistry.ActionContext_OpenRes); CorePluginRegistry.RegisterEditorAction(new EditorAction <GameObject> (null, null, this.ActionGameObjectOpenRes, EditorBaseRes.ActionDesc_FocusGameObject, g => g.Transform != null), CorePluginRegistry.ActionContext_OpenRes); CorePluginRegistry.RegisterEditorAction(new EditorAction <Component> (null, null, this.ActionComponentOpenRes, EditorBaseRes.ActionDesc_FocusGameObject, c => c.GameObj.Transform != null), CorePluginRegistry.ActionContext_OpenRes); // Register data converters CorePluginRegistry.RegisterDataConverter <GameObject>(new DataConverters.GameObjFromPrefab()); CorePluginRegistry.RegisterDataConverter <GameObject>(new DataConverters.GameObjFromComponents()); CorePluginRegistry.RegisterDataConverter <Component>(new DataConverters.ComponentFromSound()); CorePluginRegistry.RegisterDataConverter <Component>(new DataConverters.ComponentFromMaterial()); CorePluginRegistry.RegisterDataConverter <Component>(new DataConverters.ComponentFromFont()); CorePluginRegistry.RegisterDataConverter <BatchInfo>(new DataConverters.BatchInfoFromMaterial()); CorePluginRegistry.RegisterDataConverter <Material>(new DataConverters.MaterialFromBatchInfo()); CorePluginRegistry.RegisterDataConverter <Material>(new DataConverters.MaterialFromTexture()); CorePluginRegistry.RegisterDataConverter <Texture>(new DataConverters.TextureFromMaterial()); CorePluginRegistry.RegisterDataConverter <Texture>(new DataConverters.TextureFromPixmap()); CorePluginRegistry.RegisterDataConverter <Pixmap>(new DataConverters.PixmapFromTexture()); CorePluginRegistry.RegisterDataConverter <Sound>(new DataConverters.SoundFromAudioData()); CorePluginRegistry.RegisterDataConverter <AudioData>(new DataConverters.AudioDataFromSound()); CorePluginRegistry.RegisterDataConverter <Prefab>(new DataConverters.PrefabFromGameObject()); // Register preview generators CorePluginRegistry.RegisterPreviewGenerator(new PreviewGenerators.PixmapPreviewGenerator()); CorePluginRegistry.RegisterPreviewGenerator(new PreviewGenerators.AudioDataPreviewGenerator()); CorePluginRegistry.RegisterPreviewGenerator(new PreviewGenerators.SoundPreviewGenerator()); CorePluginRegistry.RegisterPreviewGenerator(new PreviewGenerators.FontPreviewGenerator()); // Register file importers CorePluginRegistry.RegisterFileImporter(new PixmapFileImporter()); CorePluginRegistry.RegisterFileImporter(new AudioDataFileImporter()); CorePluginRegistry.RegisterFileImporter(new ShaderFileImporter()); CorePluginRegistry.RegisterFileImporter(new FontFileImporter()); }
public override List <CamViewState.SelObj> PickSelObjIn(int x, int y, int w, int h) { List <CamViewState.SelObj> result = new List <SelObj>(); RigidBody pickedCollider = null; ShapeInfo pickedShape = null; RigidBody[] visibleColliders = this.QueryVisibleColliders() .Where(r => !CorePluginRegistry.GetDesignTimeData(r.GameObj).IsLocked) .ToArray(); visibleColliders.StableSort(delegate(RigidBody c1, RigidBody c2) { return(MathF.RoundToInt(1000.0f * (c1.GameObj.Transform.Pos.Z - c2.GameObj.Transform.Pos.Z))); }); // Pick a collider foreach (RigidBody c in visibleColliders) { Vector3 worldCoord = this.GetSpaceCoord(new Vector3(x, y, c.GameObj.Transform.Pos.Z)); float scale = this.GetScaleAtZ(c.GameObj.Transform.Pos.Z); pickedShape = this.PickShapes(c, worldCoord.Xy, new Vector2(w / scale, h / scale)).FirstOrDefault(); if (pickedShape != null) { pickedCollider = c; result.Add(new SelBody(pickedCollider)); break; } else { pickedShape = null; } } // Pick shapes if (pickedCollider != null) { Vector3 worldCoord = this.GetSpaceCoord(new Vector3(x, y, pickedCollider.GameObj.Transform.Pos.Z)); float scale = this.GetScaleAtZ(pickedCollider.GameObj.Transform.Pos.Z); List <ShapeInfo> picked = this.PickShapes(pickedCollider, worldCoord.Xy, new Vector2(w / scale, h / scale)); if (picked.Count > 0) { result.AddRange(picked.Select(s => SelShape.Create(s) as SelObj)); } } return(result); }
protected override void OnEditedTypeChanged() { base.OnEditedTypeChanged(); System.Drawing.Bitmap iconBitmap = CorePluginRegistry.GetTypeImage(this.EditedType) as System.Drawing.Bitmap; ColorHsva avgClr = iconBitmap != null? iconBitmap.GetAverageColor().ToHsva() : Duality.ColorFormat.ColorHsva.TransparentWhite; if (avgClr.S <= 0.05f) { avgClr = new ColorHsva( 0.001f * (float)(this.EditedType.Name.GetHashCode() % 1000), 1.0f, 0.5f); } this.PropertyName = this.EditedType.GetTypeCSCodeName(true); this.HeaderIcon = iconBitmap; this.HeaderColor = ExtMethodsSystemDrawingColor.ColorFromHSV(avgClr.H, 0.2f, 0.8f); }
protected override void OnShown(EventArgs e) { base.OnShown(e); this.propertyGrid.RegisterEditorProvider(CorePluginRegistry.GetPropertyEditorProviders()); this.UpdateButtons(); // Add the global selection event once DualityEditorApp.SelectionChanged -= GlobalUpdateSelection; DualityEditorApp.SelectionChanged += GlobalUpdateSelection; DualityEditorApp.UpdatingEngine += this.EditorForm_AfterUpdateDualityApp; DualityEditorApp.ObjectPropertyChanged += this.EditorForm_ObjectPropertyChanged; FileEventManager.ResourceModified += this.EditorForm_ResourceModified; DualityEditorApp.Terminating += this.DualityEditorApp_Terminating; // Select something initially, if not done yet if (this.propertyGrid.Selection.Count() == 0) { this.UpdateSelection(DualityEditorApp.Selection, DualityEditorApp.SelectionActiveCategory); } }
public override CamViewState.SelObj PickSelObjAt(int x, int y) { RigidBody pickedCollider = null; ShapeInfo pickedShape = null; RigidBody[] visibleColliders = this.QueryVisibleColliders() .Where(r => !CorePluginRegistry.GetDesignTimeData(r.GameObj).IsLocked) .ToArray(); visibleColliders.StableSort(delegate(RigidBody c1, RigidBody c2) { return(MathF.RoundToInt(1000.0f * (c1.GameObj.Transform.Pos.Z - c2.GameObj.Transform.Pos.Z))); }); foreach (RigidBody c in visibleColliders) { Vector3 worldCoord = this.GetSpaceCoord(new Vector3(x, y, c.GameObj.Transform.Pos.Z)); // Do a physical picking operation pickedShape = this.PickShape(c, worldCoord.Xy); // Shape picked. if (pickedShape != null) { pickedCollider = c; break; } } if (pickedShape != null) { return(SelShape.Create(pickedShape)); } if (pickedCollider != null) { return(new SelBody(pickedCollider)); } return(null); }
private void buttonClone_Click(object sender, EventArgs e) { ObjectInspector objView = EditorBasePlugin.Instance.RequestObjView(true); this.CopyTo(objView); objView.buttonLock.Checked = true; DockPanel mainDoc = DualityEditorApp.MainForm.MainDockPanel; if (this.DockHandler.DockState.IsAutoHide()) { objView.Show(this.DockPanel, this.DockHandler.DockState); } else { objView.Show(this.DockHandler.Pane, DockAlignment.Bottom, 0.5d); } // Need it before showing because of instant-selection objView.propertyGrid.RegisterEditorProvider(CorePluginRegistry.GetPropertyEditorProviders()); objView.propertyGrid.SelectObjects(this.propertyGrid.Selection); objView.gridExpandState.ApplyTo(objView.propertyGrid.MainEditor); }
protected override void OnShown(EventArgs e) { this.propertyGrid.RegisterEditorProvider(CorePluginRegistry.GetPropertyEditorProviders()); base.OnShown(e); }
protected override void OnButtonPressed() { //base.OnButtonPressed(); // We don't want the base implementation // Is it safe to remove this Component? Component[] values = this.GetValue().Cast <Component>().NotNull().ToArray(); bool canRemove = true; Component removeConflict = null; foreach (Component c in values) { foreach (Component r in c.GameObj.GetComponents <Component>()) { if (!r.IsComponentRequirementMet(c)) { canRemove = false; removeConflict = r; break; } } if (!canRemove) { break; } } // Create a ContextMenu ContextMenuStrip contextMenu = new ContextMenuStrip(); Point menuPos = new Point(this.ButtonRectangle.Right, this.ButtonRectangle.Bottom); Point thisLoc = this.ParentEditor.GetChildLocation(this); menuPos.X += thisLoc.X; menuPos.Y += thisLoc.Y; // Default items ToolStripItem itemReset = contextMenu.Items.Add(Properties.EditorBaseRes.MenuItemName_ResetComponent, null, this.contextMenu_ResetComponent); ToolStripItem itemRemove = contextMenu.Items.Add(Properties.EditorBaseRes.MenuItemName_RemoveComponent, Properties.EditorBaseResCache.IconAbortCross, this.contextMenu_RemoveComponent); itemRemove.Enabled = canRemove; if (!canRemove) { itemRemove.ToolTipText = string.Format( Properties.EditorBaseRes.MenuItemDesc_CantRemoveComponent, values.First().GetType().Name, removeConflict.GetType().Name); } ToolStripSeparator itemDefaultSep = new ToolStripSeparator(); contextMenu.Items.Add(itemDefaultSep); // Custom actions var customActions = CorePluginRegistry.GetEditorActions( values.First().GetType(), CorePluginRegistry.ActionContext_ContextMenu, values) .ToArray(); foreach (var actionEntry in customActions) { ToolStripMenuItem actionItem = new ToolStripMenuItem(actionEntry.Name, actionEntry.Icon); actionItem.Click += this.contextMenu_CustomAction; actionItem.Tag = actionEntry; actionItem.ToolTipText = actionEntry.Description; contextMenu.Items.Add(actionItem); } if (customActions.Length == 0) { itemDefaultSep.Visible = false; } contextMenu.Closed += this.contextMenu_Closed; contextMenu.Show(this.ParentGrid, menuPos, ToolStripDropDownDirection.BelowLeft); }
protected override void LoadPlugin() { base.LoadPlugin(); CorePluginRegistry.RegisterDataConverter <Component>(new LightingRendererFromMaterial()); }
public static void LoadXmlCodeDoc(string file) { XmlCodeDoc xmlDoc = new XmlCodeDoc(file); CorePluginRegistry.RegisterXmlCodeDoc(xmlDoc); }
public static Image GetIcon(DataNode data) { return(CorePluginRegistry.GetTypeImage(data.GetType()) ?? CorePluginRegistry.GetTypeImage(typeof(DataNode))); }
protected override void LoadPlugin() { base.LoadPlugin(); // Register core resource lookups CorePluginRegistry.RegisterTypeImage(typeof(DrawTechnique), EditorBaseResCache.IconResDrawTechnique); CorePluginRegistry.RegisterTypeImage(typeof(FragmentShader), EditorBaseResCache.IconResFragmentShader); CorePluginRegistry.RegisterTypeImage(typeof(Material), EditorBaseResCache.IconResMaterial); CorePluginRegistry.RegisterTypeImage(typeof(Pixmap), EditorBaseResCache.IconResPixmap); CorePluginRegistry.RegisterTypeImage(typeof(Prefab), EditorBaseResCache.IconResPrefabFull, CorePluginRegistry.ImageContext_Icon + "_Full"); CorePluginRegistry.RegisterTypeImage(typeof(Prefab), EditorBaseResCache.IconResPrefabEmpty); CorePluginRegistry.RegisterTypeImage(typeof(RenderTarget), EditorBaseResCache.IconResRenderTarget); CorePluginRegistry.RegisterTypeImage(typeof(ShaderProgram), EditorBaseResCache.IconResShaderProgram); CorePluginRegistry.RegisterTypeImage(typeof(Texture), EditorBaseResCache.IconResTexture); CorePluginRegistry.RegisterTypeImage(typeof(VertexShader), EditorBaseResCache.IconResVertexShader); CorePluginRegistry.RegisterTypeImage(typeof(Scene), EditorBaseResCache.IconResScene); CorePluginRegistry.RegisterTypeImage(typeof(AudioData), EditorBaseResCache.IconResAudioData); CorePluginRegistry.RegisterTypeImage(typeof(Sound), EditorBaseResCache.IconResSound); CorePluginRegistry.RegisterTypeImage(typeof(Font), EditorBaseResCache.IconResFont); CorePluginRegistry.RegisterTypeImage(typeof(GameObject), EditorBaseResCache.IconGameObj); CorePluginRegistry.RegisterTypeImage(typeof(Component), EditorBaseResCache.IconCmpUnknown); CorePluginRegistry.RegisterTypeImage(typeof(SpriteRenderer), EditorBaseResCache.IconCmpSpriteRenderer); CorePluginRegistry.RegisterTypeImage(typeof(AnimSpriteRenderer), EditorBaseResCache.IconCmpSpriteRenderer); CorePluginRegistry.RegisterTypeImage(typeof(TextRenderer), EditorBaseResCache.IconResFont); CorePluginRegistry.RegisterTypeImage(typeof(Transform), EditorBaseResCache.IconCmpTransform); CorePluginRegistry.RegisterTypeImage(typeof(Camera), EditorBaseResCache.IconCmpCamera); CorePluginRegistry.RegisterTypeImage(typeof(SoundEmitter), EditorBaseResCache.IconResSound); CorePluginRegistry.RegisterTypeImage(typeof(SoundListener), EditorBaseResCache.IconCmpSoundListener); CorePluginRegistry.RegisterTypeImage(typeof(RigidBody), EditorBaseResCache.IconCmpRectCollider); CorePluginRegistry.RegisterTypeCategory(typeof(Transform), ""); CorePluginRegistry.RegisterTypeCategory(typeof(SpriteRenderer), GeneralRes.Category_Graphics); CorePluginRegistry.RegisterTypeCategory(typeof(AnimSpriteRenderer), GeneralRes.Category_Graphics); CorePluginRegistry.RegisterTypeCategory(typeof(TextRenderer), GeneralRes.Category_Graphics); CorePluginRegistry.RegisterTypeCategory(typeof(Camera), GeneralRes.Category_Graphics); CorePluginRegistry.RegisterTypeCategory(typeof(SoundEmitter), GeneralRes.Category_Sound); CorePluginRegistry.RegisterTypeCategory(typeof(SoundListener), GeneralRes.Category_Sound); CorePluginRegistry.RegisterTypeCategory(typeof(RigidBody), GeneralRes.Category_Physics); CorePluginRegistry.RegisterTypeCategory(typeof(Scene), ""); CorePluginRegistry.RegisterTypeCategory(typeof(Prefab), ""); CorePluginRegistry.RegisterTypeCategory(typeof(Pixmap), GeneralRes.Category_Graphics); CorePluginRegistry.RegisterTypeCategory(typeof(Texture), GeneralRes.Category_Graphics); CorePluginRegistry.RegisterTypeCategory(typeof(Material), GeneralRes.Category_Graphics); CorePluginRegistry.RegisterTypeCategory(typeof(Font), GeneralRes.Category_Graphics); CorePluginRegistry.RegisterTypeCategory(typeof(RenderTarget), GeneralRes.Category_Graphics); CorePluginRegistry.RegisterTypeCategory(typeof(DrawTechnique), GeneralRes.Category_Graphics); CorePluginRegistry.RegisterTypeCategory(typeof(ShaderProgram), GeneralRes.Category_Graphics); CorePluginRegistry.RegisterTypeCategory(typeof(VertexShader), GeneralRes.Category_Graphics); CorePluginRegistry.RegisterTypeCategory(typeof(FragmentShader), GeneralRes.Category_Graphics); CorePluginRegistry.RegisterTypeCategory(typeof(AudioData), GeneralRes.Category_Sound); CorePluginRegistry.RegisterTypeCategory(typeof(Sound), GeneralRes.Category_Sound); // Register conversion actions CorePluginRegistry.RegisterEditorAction(new EditorAction <Pixmap> (EditorBaseRes.ActionName_CreateTexture, EditorBaseRes.IconResTexture, this.ActionPixmapCreateTexture, EditorBaseRes.ActionDesc_CreateTexture), CorePluginRegistry.ActionContext_ContextMenu); CorePluginRegistry.RegisterEditorAction(new EditorAction <Texture> (EditorBaseRes.ActionName_CreateMaterial, EditorBaseRes.IconResMaterial, this.ActionTextureCreateMaterial, EditorBaseRes.ActionDesc_CreateMaterial), CorePluginRegistry.ActionContext_ContextMenu); CorePluginRegistry.RegisterEditorAction(new EditorAction <AudioData> (EditorBaseRes.ActionName_CreateSound, EditorBaseRes.IconResSound, this.ActionAudioDataCreateSound, EditorBaseRes.ActionDesc_CreateSound), CorePluginRegistry.ActionContext_ContextMenu); CorePluginRegistry.RegisterEditorAction(new EditorGroupAction <AbstractShader> (EditorBaseRes.ActionName_CreateShaderProgram, EditorBaseRes.IconResShaderProgram, this.ActionShaderCreateProgram, EditorBaseRes.ActionDesc_CreateShaderProgram), CorePluginRegistry.ActionContext_ContextMenu); // Register open actions CorePluginRegistry.RegisterEditorAction(new EditorAction <Pixmap> (null, null, this.ActionPixmapOpenRes, EditorBaseRes.ActionDesc_OpenResourceExternal), CorePluginRegistry.ActionContext_OpenRes); CorePluginRegistry.RegisterEditorAction(new EditorAction <AudioData> (null, null, this.ActionAudioDataOpenRes, EditorBaseRes.ActionDesc_OpenResourceExternal), CorePluginRegistry.ActionContext_OpenRes); CorePluginRegistry.RegisterEditorAction(new EditorAction <AbstractShader> (null, null, this.ActionAbstractShaderOpenRes, EditorBaseRes.ActionDesc_OpenResourceExternal), CorePluginRegistry.ActionContext_OpenRes); CorePluginRegistry.RegisterEditorAction(new EditorAction <Prefab> (null, null, this.ActionPrefabOpenRes, EditorBaseRes.ActionDesc_InstantiatePrefab), CorePluginRegistry.ActionContext_OpenRes); CorePluginRegistry.RegisterEditorAction(new EditorAction <Scene> (null, null, this.ActionSceneOpenRes, EditorBaseRes.ActionDesc_OpenScene), CorePluginRegistry.ActionContext_OpenRes); CorePluginRegistry.RegisterEditorAction(new EditorAction <GameObject> (null, null, this.ActionGameObjectOpenRes, EditorBaseRes.ActionDesc_FocusGameObject, g => g.Transform != null), CorePluginRegistry.ActionContext_OpenRes); CorePluginRegistry.RegisterEditorAction(new EditorAction <Component> (null, null, this.ActionComponentOpenRes, EditorBaseRes.ActionDesc_FocusGameObject, c => c.GameObj.Transform != null), CorePluginRegistry.ActionContext_OpenRes); // Register data converters CorePluginRegistry.RegisterDataConverter <GameObject>(new DataConverters.GameObjFromPrefab()); CorePluginRegistry.RegisterDataConverter <GameObject>(new DataConverters.GameObjFromComponents()); CorePluginRegistry.RegisterDataConverter <Component>(new DataConverters.ComponentFromSound()); CorePluginRegistry.RegisterDataConverter <Component>(new DataConverters.ComponentFromMaterial()); CorePluginRegistry.RegisterDataConverter <Component>(new DataConverters.ComponentFromFont()); CorePluginRegistry.RegisterDataConverter <BatchInfo>(new DataConverters.BatchInfoFromMaterial()); CorePluginRegistry.RegisterDataConverter <Material>(new DataConverters.MaterialFromBatchInfo()); CorePluginRegistry.RegisterDataConverter <Material>(new DataConverters.MaterialFromTexture()); CorePluginRegistry.RegisterDataConverter <Texture>(new DataConverters.TextureFromMaterial()); CorePluginRegistry.RegisterDataConverter <Texture>(new DataConverters.TextureFromPixmap()); CorePluginRegistry.RegisterDataConverter <Pixmap>(new DataConverters.PixmapFromTexture()); CorePluginRegistry.RegisterDataConverter <Sound>(new DataConverters.SoundFromAudioData()); CorePluginRegistry.RegisterDataConverter <AudioData>(new DataConverters.AudioDataFromSound()); CorePluginRegistry.RegisterDataConverter <Prefab>(new DataConverters.PrefabFromGameObject()); // Register preview generators CorePluginRegistry.RegisterPreviewGenerator(new PreviewGenerators.PixmapPreviewGenerator()); CorePluginRegistry.RegisterPreviewGenerator(new PreviewGenerators.AudioDataPreviewGenerator()); CorePluginRegistry.RegisterPreviewGenerator(new PreviewGenerators.SoundPreviewGenerator()); CorePluginRegistry.RegisterPreviewGenerator(new PreviewGenerators.FontPreviewGenerator()); // Register file importers CorePluginRegistry.RegisterFileImporter(new PixmapFileImporter()); CorePluginRegistry.RegisterFileImporter(new AudioDataFileImporter()); CorePluginRegistry.RegisterFileImporter(new ShaderFileImporter()); CorePluginRegistry.RegisterFileImporter(new FontFileImporter()); // Register PropertyEditor provider CorePluginRegistry.RegisterPropertyEditorProvider(new PropertyEditors.PropertyEditorProvider()); }