This file contains 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
[['BlendingMode.ADD','5220'], | |
['BlendingMode.ALPHA_ADD','5244'], | |
['BlendingMode.CLASSIC_COLOR_BURN','5219'], | |
['BlendingMode.CLASSIC_COLOR_DODGE','5225'], | |
['BlendingMode.CLASSIC_DIFFERENCE','5234'], |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
const Button = document.getElementById("targetButton") | |
const clickEvent = (function() { | |
if ('ontouchstart' in document.documentElement === true) | |
return 'touchstart'; | |
else | |
return 'click'; | |
})(); | |
Button.addEventListener(clickEvent, e => { |
This file contains 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
<filter id="displacement" filterUnits="objectBoundingBox"> | |
<feTurbulence type="turbulence" baseFrequency="0.01" numOctaves="2" result="turb"/> | |
<feColorMatrix in="turb" result="huedturb" type="hueRotate" values="90"> | |
<animate attributeType="XML" attributeName="values" values="0;180;360" dur="6s" repeatCount="indefinite"/> | |
</feColorMatrix> | |
<feDisplacementMap in="SourceGraphic" in2="huedturb" scale="20" result="displace" xChannelSelector="B"/> | |
<feOffset dx="-5" dy="-5" in="displace" result="unoffsetdisplace"/> | |
</filter> |
This file contains 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
# 根据图片大小建立平面并赋予贴图 | |
# xixi@bigxixi.com | |
import os | |
import c4d | |
from c4d import documents, plugins, bitmaps | |
# 区分 win 和 mac 文件地址 | |
osSlash = '/' | |
if os.name == 'nt': | |
osSlash = '\\' | |
# 选择一个文件夹 |
This file contains 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
//本脚本用于将图片转为binary编码 | |
if(!app.preferences.getPrefAsLong("Main Pref Section", "Pref_SCRIPTING_FILE_NETWORK_SECURITY")){ | |
alert("请勾选 ‘首选项’->'常规'->'允许脚本写入文件和访问网络'。"); | |
app.executeCommand(2359); | |
}else{ | |
alert("选择要转换的文件,完成后会弹出对话框显示代码,另有一份存储在图片文件位置,文件名为图片名+.txt","图片转Binary编码 by Bigxixi"); | |
var myImageFileURI = File("~/Desktop/").openDlg("选择要转换的文件"); | |
var myFile = new File(myImageFileURI); | |
myFile.encoding="BINARY"; | |
myFile.open(); |
This file contains 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
//加marker | |
var mk= new MarkerValue("comment content"); | |
//mk.xxx=xxx | |
app.project.activeItem.layers[2].marker.setValueAtTime(0,mk); |
This file contains 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
(function drawUI(thisObj) | |
{ | |
function UI(thisObj){ | |
var win = (thisObj instanceof Panel) ? thisObj : new Window("palette","Run Script",[0,0,500,450],{resizeable:true,}); | |
if(win != null){ | |
var btn = win.add("button",[180,415,330,435],"Run"); | |
var script = win.add("edittext",[5,5,505,405] ,"Paste your code here, and run to test.",{readonly:0,noecho:0,borderless:0,multiline:1,enterKeySignalsOnChange:0}); | |
btn.onClick = function(){ | |
if(!app.preferences.getPrefAsLong("Main Pref Section", "Pref_SCRIPTING_FILE_NETWORK_SECURITY")){ | |
alert("Please check this option:\n'Preferences->General->Allow Scripts to Write Files and Access Network'"); |