Skip to content

Instantly share code, notes, and snippets.

@MineClever
MineClever / getMaterial.py
Created January 1, 2023 11:54 — forked from cecilemuller/getMaterial.py
Marmoset Toolbag: find material/object by name
import mset
# Smarter "findMaterial": doesn't print a message in the console
# or throw an error when the object to find doesn't exist.
def getMaterial(name, createIfNotFound=False):
found = None
objs = mset.getAllMaterials()
for obj in objs:
if obj.name == name:
found = obj
@MineClever
MineClever / FixMaxFbxPbrParameters.cpp
Created October 6, 2022 08:18
it seems PBR material data is exported to the fbx file regardless of the warning message on the export process.
// Ref to :https://forums.autodesk.com/t5/fbx-forum/pbr-materials/td-p/7418493
FbxSurfaceMaterial* material = fbxNode.GetMaterial(materialIndex);
const FbxProperty topProp = material->FindProperty("3dsMax", false);
if (topProp.IsValid())
{
const FbxProperty props = topProp.Find("Parameters", false);
if (props.IsValid())
{
@MineClever
MineClever / normalWithVtxColor.py
Last active October 6, 2022 08:19
Help to process high mesh normal on low mesh~ for Maya
# coding=utf-8
# Script by MineClever, help to process high mesh normal on low mesh~
import maya.api.OpenMaya as api
import maya.cmds as cmds
class MSingleton(type):
"""metaclass for set singleton class"""
__debug = True
@MineClever
MineClever / setCustomTangent.py
Created October 2, 2022 18:24
a simple script for Marmoset Toolbag help to make a ui add custom tangent setting for selected mesh / mesh group
# _*_ coding=utf-8 _*_
# a simple script help to make a ui add custom tangent setting for selected mesh / mesh group
import mset
class MTangentType (object):
tangent_type = ("Custom",
"Marmoset",
"Mikk",
@MineClever
MineClever / 创建工程磁盘映射.bat
Last active September 9, 2022 20:18
从当前文件夹位置创建Windows磁盘映射
@echo off
:: 以GBK环境运行
chcp 963
cls
:: 入口
:Main
::添加本地变量
set inputDrive=M
set driverSymbol=%inputDrive%