Skip to content

Commit 3b59e12

Browse files
committed
Added vertical flip switch in CBRenderTexture editor to override default value
1 parent dc9be78 commit 3b59e12

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

source/FrameRecorder/Core/Editor/RecorderEditor.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public abstract class RecorderEditor : Editor
1515
SerializedProperty m_StartTime;
1616
SerializedProperty m_EndTime;
1717
SerializedProperty m_SynchFrameRate;
18+
SerializedProperty m_CaptureEveryNthFrame;
1819

1920
protected virtual void OnEnable()
2021
{
@@ -31,6 +32,7 @@ protected virtual void OnEnable()
3132
m_StartTime = pf.Find(x => x.m_StartTime);
3233
m_EndTime = pf.Find(x => x.m_EndTime);
3334
m_SynchFrameRate = pf.Find(x => x.m_SynchFrameRate);
35+
m_CaptureEveryNthFrame = pf.Find(x => x.m_CaptureEveryNthFrame);
3436
}
3537
}
3638

@@ -130,7 +132,7 @@ protected virtual void OnInputGui()
130132

131133
protected virtual void OnOutputGui()
132134
{
133-
EditorGUILayout.PropertyField(serializedObject.FindProperty<RecorderSettings>(x => x.m_CaptureEveryNthFrame), new GUIContent("Every n'th frame"));
135+
EditorGUILayout.PropertyField(m_CaptureEveryNthFrame, new GUIContent("Every n'th frame"));
134136
}
135137

136138
protected virtual void OnEncodingGui()

source/FrameRecorder/Inputs/CBRenderTexture/Editor/CBRenderTextureInputSettingsEditor.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public class CBRenderTextureInputSettingsEditor : Editor
1313
SerializedProperty m_CameraTag;
1414
SerializedProperty m_RenderSize;
1515
SerializedProperty m_RenderAspect;
16+
SerializedProperty m_FlipVertically;
1617

1718
protected void OnEnable()
1819
{
@@ -24,6 +25,7 @@ protected void OnEnable()
2425
m_CameraTag = pf.Find(w => w.m_CameraTag);
2526
m_RenderSize = pf.Find(w => w.m_RenderSize);
2627
m_RenderAspect = pf.Find(w => w.m_RenderAspect);
28+
m_FlipVertically = pf.Find(w => w.m_FlipVertical);
2729
}
2830

2931
public override void OnInspectorGUI()
@@ -58,6 +60,9 @@ public override void OnInspectorGUI()
5860
}
5961
}
6062

63+
EditorGUILayout.PropertyField(m_FlipVertically, new GUIContent("Flip image vertically"));
64+
65+
6166
serializedObject.ApplyModifiedProperties();
6267
}
6368
}

0 commit comments

Comments
 (0)