Skip to content

Instantly share code, notes, and snippets.

import PySimpleGUI as sg
layout = [ [ sg.Text("ファイル選択"),sg.InputText(),sg.FileBrowse() ] ,
[sg.Text("文字入力") ,sg.InputText("ここに文字入力",key ="-TEXT-")],
[sg.Checkbox("チェックボックス",key="CHECK-BOX-")],
[sg.Button("ボタン", key="-SAMPLE-BUTTON-")] ,
[sg.Listbox(["Sample A","Sample B","Sample C"],size=(50,5))],
[sg.Combo(["Sample D","Sample E","Sample F"])],
[sg.ProgressBar(1000,orientation="h",size=(20,20),key="progbar")],
]
import os
filepath = 'Sample/sample'
#フォルダ作成(存在すれば作成しない)
if not os.path.isdir(filepath):
os.mkdir(filepath)
import bpy
import bmesh
bl_info = {
"name": "TomoG_Sample",
"author": "TomoG",
"version": (1, 0),
"blender": (2, 9, 0),
"location": "",
"description": "sample",
<div class="box">
<p id="res" class="res">まだクリック無し!</p>
<div class="btn-square">
<p id="btn">ボタン</p>
</div>
</div>
<script>// <![CDATA[
var Value = 0;
document.getElementById("btn").onclick = function() {
<script>
//実行したいJavaScriptを記載
</script>
<style>
/*実行したいCSSを記載*/
import bpy
bl_info = {
"name": "SampleAddon",
"author": "Your Name",
"version": (1, 0),
"blender": (2, 80, 2),
"location": "",
"description": "Sample",
"warning": "",
private void TimeNow()
{
DateTime now = DateTime.Now;
int year = now.Year;
//年
int month = now.Month;
//月
using UnityEditor;
private void CopyTexture()
{
private Sprite src_Picture;//元の画像
private Sprite dst_Picture;//コピー画像
//コピー先のパスを保存
private string dst_path = AssetDatabase.GetAssetPath(dst_Picture);
//ファイルのコピー
AssetDatabase.CopyAsset(AssetDatabase.GetAssetPath(src_Picture), dst_path);
private void ()
{
private Sprite Picture;//パスを確認したいファイル
string Path = AssetDatabase.GetAssetPath(Picture);
}