浏览代码

Changelog, Assembly Type load Fixes and final API doc adjustments

/main
Thomas ICHÉ 5 年前
当前提交
8479b188
共有 6 个文件被更改,包括 85 次插入16 次删除
  1. 24
      Editor/Common/Canvas/VFXToolboxCanvas.cs
  2. 31
      Editor/ImageSequencer/ImageSequencerCanvas.cs
  3. 26
      Editor/ImageSequencer/ProcessingNodeStack.cs
  4. 4
      LICENSE.md
  5. 9
      CHANGELOG.md
  6. 7
      CHANGELOG.md.meta

24
Editor/Common/Canvas/VFXToolboxCanvas.cs


namespace UnityEditor.VFXToolbox
{
/// <summary>
/// An Editor UI Canvas that enables previsualizing an image. Derive from this class to implement your own.
/// </summary>
public abstract class VFXToolboxCanvas
{
internal Rect displayRect

private int m_MipMap = 0;
private bool m_bShowGrid = true;
protected Rect m_Rect;
private Rect m_Rect;
private Shader m_Shader;
private Material m_Material;

m_bNeedRedraw = m_bNeedRedraw | needRedraw;
}
/// <summary>
/// Handle Setting the Texture to the canvas
/// </summary>
/// <param name="tex">The texture to display</param>
/// <summary>
/// Handle Getting the Texture displayed on the canvas
/// </summary>
/// <returns>The displayed texture</returns>
/// <summary>
/// Returns the count of the currently set texture
/// </summary>
/// <returns></returns>
protected virtual int GetMipMapCount()
{
if (texture != null)

}
}
/// <summary>
/// Handles common Keyboard events to perform navigation
/// </summary>
protected virtual void HandleKeyboardEvents()
{
if(Event.current.type == EventType.KeyDown)

);
}
/// <summary>
/// Draws a line grid around the texture
/// </summary>
protected virtual void DrawGrid()
{
Vector2 src, dst;

31
Editor/ImageSequencer/ImageSequencerCanvas.cs


namespace UnityEditor.VFXToolbox.ImageSequencer
{
/// <summary>
/// A VFXToolboxCanvas component used in Image Sequencer
/// </summary>
public class ImageSequencerCanvas : VFXToolboxCanvas
{
internal bool showExtraInfo

m_ImageSequencerWindow.Invalidate();
}
/// <summary>
/// As texture display is handled by the processing stack, this function is not used.
/// </summary>
/// <param name="tex">A texture</param>
// Never should Happen
// Should Never Happen
/// <summary>
/// Gets the current frame from the current processing node in the processing stack.
/// </summary>
/// <returns>Currently displayed texture</returns>
protected override sealed Texture GetTexture()
{
if (currentFrame != null)

return null;
}
/// <summary>
/// Returns how many mip-maps are stored in the currently displayed texture object.
/// </summary>
/// <returns>mip map count</returns>
protected override sealed int GetMipMapCount()
{
if (currentFrame != null)

}
/// <summary>
/// Handles all the Common VFXToolboxCanvas Keyboard events plus all required ones from Image Sequencer
/// </summary>
protected override sealed void HandleKeyboardEvents()
{
base.HandleKeyboardEvents();

}
}
/// <summary>
/// Draws the grid around the texture, and all Flipbook frame subdivisions
/// </summary>
protected override sealed void DrawGrid()
{
int GridNumU = m_PreviewSequence.numU;

OnGUI();
// Processor extra info
GUI.BeginGroup(m_Rect);
GUI.BeginGroup(displayRect);
if (editor.currentProcessingNode != null && editor.currentProcessingNode.Enabled && m_bShowExtraInfo && editor.sidePanelViewMode == ImageSequencer.SidePanelMode.Processors)
editor.currentProcessingNode.OnCanvasGUI(this);
GUI.EndGroup();

GUI.Label(new RectOffset(24,24,24,24).Remove(m_Rect), procName , styles.largeLabel);
GUI.Label(new RectOffset(24,24,64,24).Remove(m_Rect), GetDebugInfoString() , styles.label);
GUI.Label(new RectOffset(24,24,24,24).Remove(displayRect), procName , styles.largeLabel);
GUI.Label(new RectOffset(24,24,64,24).Remove(displayRect), GetDebugInfoString() , styles.label);
//EditorGUI.DrawRect(m_Rect, Color.red);
// Play Controls

#region STYLES
public new class Styles
internal new class Styles
{
public GUIStyle miniLabel
{

26
Editor/ImageSequencer/ProcessingNodeStack.cs


{
settingsDefinitions = new Dictionary<Type, ProcessorAttribute>();
var assembly = Assembly.GetAssembly(typeof(ProcessorBase));
var types = assembly.GetTypes();
var allProcessorTypes = types
.Where(t => t.IsClass
&& !t.IsAbstract
&& t.IsSubclassOf(processorType)
&& t.IsDefined(attrType, false));
Type[] allProcessorTypes = new Type[0];
foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies() )
{
try
{
allProcessorTypes = allProcessorTypes.Concat(assembly.GetTypes().Where(t =>
t.IsClass
&& !t.IsAbstract
&& t.IsSubclassOf(processorType)
&& t.IsDefined(attrType, false)
)).ToArray();
}
catch (Exception e)
{
UnityEngine.Debug.LogException(e);
}
}
settingsDefinitions.Add(type, attr);
}
}

4
LICENSE.md


Copyright © 2018 Unity Technologies ApS
com.unity.vfx-toolbox copyright © 2020 Unity Technologies ApS
Licensed under the Unity Companion License for Unity-dependent projects--see [Unity Companion License](http://www.unity3d.com/legal/licenses/Unity_Companion_License).
Licensed under the Unity Companion License for Unity-dependent projects--see [Unity Companion License](http://www.unity3d.com/legal/licenses/Unity_Companion_License).
Unless expressly provided otherwise, the Software under this license is made available strictly on an “AS IS” BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. Please review the license for details on these and other terms and conditions.

9
CHANGELOG.md


# Changelog
All notable changes to this package are documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [1.0.0-preview] - 2020-01-07
* Initial Version

7
CHANGELOG.md.meta


fileFormatVersion: 2
guid: 9ad57f86e7dfbfa4a95870ba31a6686a
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存