This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import bpy | |
| import bmesh | |
| import numpy as np | |
| obj = bpy.context.active_object | |
| bpy.ops.object.mode_set(mode='EDIT') | |
| bm = bmesh.from_edit_mesh(obj.data) | |
| bm.faces.ensure_lookup_table() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from PIL import Image | |
| import numpy as np | |
| img = Image.open("./testdata.bmp").convert("RGBA") | |
| arr = np.array(img) | |
| R = arr[:,:,0] | |
| G = arr[:,:,1] | |
| B = arr[:,:,2] | |
| A = arr[:,:,3] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import bpy | |
| import timeit | |
| import numpy as np | |
| def test01(n): | |
| '''image.pixelsにそのままアクセスして超遅いパターン''' | |
| img = bpy.data.images.new("test01-"+(str(n).zfill(4)), n, n, alpha=True) | |
| img.generated_type = "COLOR_GRID" | |
| for i in range(0, n*n*4, 4): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ##### BEGIN GPL LICENSE BLOCK ##### | |
| # | |
| # This program is free software; you can redistribute it and/or | |
| # modify it under the terms of the GNU General Public License | |
| # as published by the Free Software Foundation; either version 2 | |
| # of the License, or (at your option) any later version. | |
| # | |
| # This program is distributed in the hope that it will be useful, | |
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @set SCRIPTDIR=%~dp0 | |
| @set PATH=%SCRIPTDIR%\python-3.6.8-embed-amd64;%PATH% | |
| @set USDROOT=%SCRIPTDIR%\USD_NV | |
| @set PATH=%USDROOT%\bin;%USDROOT%\lib;%PATH% | |
| @rem Appended ..\USD_NV\lib\python to pth instead of | |
| @rem set PYTHONPATH=%USDROOT%\lib\python | |
| @rem See: python-3.6.8-embed-amd64\python36._pth |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "flag" | |
| "net" | |
| "net/http" | |
| "net/http/fcgi" | |
| "os" | |
| "github.com/labstack/echo/v4" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "flag" | |
| "fmt" | |
| "log" | |
| "net" | |
| "net/http" | |
| "net/http/fcgi" | |
| "os" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import bpy | |
| bpy.types.Object.gltf_export_name = bpy.props.StringProperty( | |
| name="Name", default="", | |
| description="glTF出力時のオブジェクト名(ノード名)\n空のときはオブジェクト名を使用\n他と重複してもよい") | |
| def __gather_name(blender_object, export_settings): | |
| #print(">>>", blender_object) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| if [ "$(tmux show-options -gv mouse)" = "off" ]; then | |
| tmux set-option -g mouse on && echo "mouse ON" | |
| else | |
| tmux set-option -g mouse off && echo "mouse OFF" | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # minimalist tmux conf | |
| set-window-option -g mode-keys vi | |
| #set-option -g escape-time 100 | |
| set-option -g base-index 1 | |
| set-option -g pane-base-index 1 | |
| set-option -g renumber-windows on | |
| set-option -g status-interval 1 |