Skip to content

Instantly share code, notes, and snippets.

Avatar

Cecile Muller cecilemuller

View GitHub Profile
View nimlot_hair_to_poly.mcr
macroScript nimlot_hair_to_poly
category:"Nimlot"
tooltip:"Hair to Poly"
(
disableSceneRedraw()
local collapsed = Editable_Mesh name:(uniquename "HairGeometry")
convertToPoly collapsed
collapsed.wirecolor = [140, 255, 25]
@cecilemuller
cecilemuller / main.ts
Last active Jan 27, 2021
Typescript Webworker
View main.ts
/* eslint-env browser */
import type {IRequestWorker} from "./worker.ts";
const worker = new Worker(new URL("./worker.ts", import.meta.url)) as IRequestWorker;
// Receive from the worker
worker.onmessage = ({data: {myresponse}}) => {
console.log(myresponse);
};
@cecilemuller
cecilemuller / example.yml
Created Oct 20, 2020
Run Docker Compose + in Github Action
View example.yml
name: Test
on:
push:
branches:
- main
- features/**
- dependabot/**
pull_request:
branches:
@cecilemuller
cecilemuller / launch.json
Created Jun 16, 2020
Run nodemon in the VSCode debugger
View launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Nodemon for Typescript",
"type": "node",
"request": "launch",
"runtimeExecutable": "nodemon",
"cwd": "${workspaceFolder}",
@cecilemuller
cecilemuller / now.newer-properties.json
Last active Mar 17, 2020
Zeit Now: Long expiration date for static assets
View now.newer-properties.json
{
"version": 2,
"trailingSlash": true,
"headers": [
{
"source": "/(.*)\\.(js|css|map|json|ico)",
"headers" : [
{
"key" : "Cache-Control",
"value" : "public, max-age=31536000, immutable"
@cecilemuller
cecilemuller / tasks.json
Last active Jul 14, 2019
VSCode: Compile Typescript on file save
View tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "Delete Output Folder",
"type": "shell",
"options": {
"cwd": "${workspaceRoot}"
@cecilemuller
cecilemuller / cubemap.bat
Created May 1, 2019
Generate a DDS cubemap from 6 JPEG images
View cubemap.bat
texassemble cube -w 1024 -h 1024 -o cubemap.dds px.jpg nx.jpg py.jpg ny.jpg pz.jpg nz.jpg
texconv cubemap.dds -m 0 -y -f BC1_UNORM
@cecilemuller
cecilemuller / activeshade.ms
Last active Feb 6, 2020
Maxscript: ActiveShade
View activeshade.ms
-- Open activeshade floater
actionMan.executeAction 0 "40701"
-- Close activeshade floater
-- https://help.autodesk.com/view/3DSMAX/2016/ENU/?guid=__files_GUID_DF068975_00B6_4CF9_B240_50B032C1B960_htm
CloseActiveShade()
-- Close activeshade floater (old version)
-- local children = UIAccessor.GetPopupDialogs()
-- for child in children do (
View photoshop-functions.js
/* eslint-env photoshop */
/**
* New 3D Layer from File.
* @param {String} modelFilepath Absolute path to the 3D file
*
* Examples:
* `addLayer3D('C:\\example\\scene.wrl');`
* `addLayer3D('C:\\example\\scene.dae');`
* `addLayer3D('C:\\example\\scene.obj');`
@cecilemuller
cecilemuller / getShaderId.py
Created Jan 5, 2019
Marmoset Toolbag: Get Shader ID
View getShaderId.py
# There is no easy way to identify a shader from a MaterialSubroutine,
# so this tries to guess from the list of fields.
#
# However it cannot distinguish between:
# - "Lambertian" or "Unlit"
# - "Horizon Occlusion" or "Mirror" or "Blinn-Phong"
def getShaderId(material, subroutineId):
subroutine = material.getSubroutine(subroutineId)