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
# Copyright (C) 2024 Alex Telford | |
# http://minimaleffort.tech | |
# This work is licensed under the Creative Commons Attribution 4.0 International License. | |
# To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/ or send a letter to Creative Commons, | |
# PO Box 1866, Mountain View, CA 94042, USA. | |
# Distributed without any warranty or liability, use at your own risk | |
# This is an example of deffering code using Qt event loops | |
try: | |
from PySide6 import QtCore, QtWidgets |
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
''' | |
Template class for docking a Qt widget to maya 2017+. | |
Author: Lior ben horin | |
12-1-2017 | |
''' | |
import weakref | |
import maya.cmds as cmds | |
import maya.OpenMayaUI as omui |
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
import maya.cmds as mc | |
def _null(*args): | |
pass | |
class _shelf(): | |
'''A simple class to build shelves in maya. Since the build method is empty, | |
it should be extended by the derived class to build the necessary shelf elements. |
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
''' | |
mayaScene.uv | |
namespace for uv manipulation and queries | |
''' | |
import maya.cmds as cmds | |
def get_names(obj): |
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
import fbx | |
import sys | |
import math | |
############################################################### | |
# Helper Function(s). # | |
############################################################### | |
def makeMaterial( pScene, materialName, **kwargs ): | |
global fbxManager |
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
// https://gist.github.com/garrett-eclipse/78e1008c5a857bd8fb6b#file-woocommerce_emails_attach_downloadables-php | |
// Add Downloadable Products to Woocommerce Completed Order & Invoice Emails as Attachments | |
function woocommerce_emails_attach_downloadables($attachments, $status, $order) { | |
if ( ! is_object( $order ) || ! isset( $status ) ) { | |
return $attachments; | |
} | |
if ( empty( $order ) ) { | |
return $attachments; |
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
for k=1 to 3 where not (bit.isFinite v[k]) do v[k] = 0 |
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
clearListener() | |
try (destroyDialog ::rlGroupsList) Catch() | |
rollout rlGroupsList "Groups" | |
( | |
local Groups = #("test","candy","mike") | |
local index = undefined | |
button uiAdd "Add" | |
multilistbox uiGroupsList "" | |
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
delete objects | |
tp = Teapot radius:5 pos:[40,0,0] | |
pt = Point pos:[20,0,0] size:5 wirecolor:red | |
fn mirrorMatrixFn | |
axis:"x" --Axis to mirror over | |
flip:"x" --Axis to flip | |
tm:(matrix3 1) --Matrix to mirror | |
pivotTm:(matrix3 1) --Matrix to mirror around | |
= |
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
plugin simpleObject IntegratedMesh | |
name:"IntegratedMesh" | |
category:"Standard Primitives" | |
classID:#(0x512e8ff9, 0x51aefc78) | |
( | |
parameters main rollout:rltParams | |
( | |
enableTube type:#boolean default:false ui:uiEnableTube | |
tubeRadius type:#worldUnits default:6 ui:uiTubeRadius |
NewerOlder