Skip to content

Instantly share code, notes, and snippets.

View gansaibow's full-sized avatar

Tatsuya Iwama gansaibow

  • 電子工作部
View GitHub Profile
@gansaibow
gansaibow / Program.cs
Created March 7, 2017 10:26
UE4ゲーム実行ファイルを外部から実行して停止する #UE4Study ref: http://qiita.com/gansaibow/items/045f1c7e85beea7dce9a
using System;
using System.Diagnostics;
using System.IO;
using System.Management;
namespace UE4ProcessManager
{
class Program
{
static void Main(string[] args)
@gansaibow
gansaibow / BPCreator.cpp
Last active March 6, 2017 20:19
カスタムブループリントクラスをNewする #UE4Study ref: http://qiita.com/gansaibow/items/d6514671c233485d6774
// Fill out your copyright notice in the Description page of Project Settings.
#include "BP_CPP.h"
#include "BPCreator.h"
void UBPCreator::Create(UClass *ObjectClass, UObject* &CreatedObject)
{
//NewNode = new ObjectType();
CreatedObject = NewObject<UObject>((UObject*)GetTransientPackage(), ObjectClass);
FReply OnAddKeyAllFrameClicked()
{
FSequencer& Sequencer = DisplayNode->GetSequencer();
TArray<float> allFrameTimes = Sequencer.GetAllFrameTimes();
for (float CurrentTime : allFrameTimes)
{
Sequencer.SetGlobalTime(CurrentTime);
@gansaibow
gansaibow / CalcCircleHueAverage.cs
Last active February 14, 2017 21:26
C# 色相(Hue)の平均値を取得する ref: http://qiita.com/gansaibow/items/e57f4211e9d51c7671b3
private void btnImageAverageHue_Click(object sender, EventArgs e)
{
//CalcSimpleHueAverage(@"D:\Projects\private\CSharp\Color\HueAverageTest.png");
Bitmap bmp = new Bitmap(@"D:\Projects\private\CSharp\Color\HueAverageTest.png");
List<double> HueList = new List<double>();
for (int y = 0; y < bmp.Height; y++)
{
@gansaibow
gansaibow / FileInfo.cpp
Created February 10, 2017 20:05
ファイルの中身をStringで返す #UE4 #CPP ref: http://qiita.com/gansaibow/items/bdedd06bd51d1e7993b7
// Fill out your copyright notice in the Description page of Project Settings.
#include "CPPSample.h"
#include "FileInfo.h"
FString UFileInfo::FileLoadStr(FString CompleteFilePath)
{
FString FileData = "";
FFileHelper::LoadFileToString(FileData, *CompleteFilePath);
return FileData;
@gansaibow
gansaibow / Form.cs
Created February 9, 2017 07:03
C# 4Kディスプレイの解像度を取得する ref: http://qiita.com/gansaibow/items/73a1a7119831c019af74
using System;
using System.Drawing;
using System.Windows.Forms;
namespace Disp4KComfirm
{
public partial class Form1 : Form
{
public Form1()
{
@gansaibow
gansaibow / oscP5sendReceive.pde
Created May 20, 2016 09:13
送信したOSCメッセージの確認する受信処理を用意する ref: http://qiita.com/gansaibow/items/fcae51cff691b6b84905
/**
* oscP5sendreceive by andreas schlegel
* example shows how to send and receive osc messages.
* oscP5 website at http://www.sojamo.de/oscP5
*/
import oscP5.*;
import netP5.*;
OscP5 oscP5;
import maya.cmds
# Get Info
animStart = cmds.playbackOptions(query=True,animationStartTime=True)
animEnd = cmds.playbackOptions(query=True,animationEndTime=True)
min = cmds.playbackOptions(query=True,min=True)
max = cmds.playbackOptions(query=True,max=True)
import maya.cmds
import maya.mel as mel
def SetFPS(fps):
unit = 'ntscf'
if fps == 15:
unit = 'game'
elif fps == 24:
unit = 'film'
elif fps == 25:
# .v4p backup files
*~.xml
# Dynamic plugins .dll
bin/