Skip to content

Instantly share code, notes, and snippets.

@MikeUdin
MikeUdin / woocommerce-remove-virtual-billing-fields.php
Last active April 24, 2019 13:33 — forked from BFTrick/woocommerce-remove-virtual-billing-fields.php
Remove the billing address fields for free virtual orders in WooCommerce
<?php
/**
* Plugin Name: WooCommerce Remove Billing Fields for Free Virtual Products
* Plugin URI: https://gist.github.com/BFTrick/7873168
* Description: Remove the billing address fields for free virtual orders
* Author: Patrick Rauland
* Author URI: http://patrickrauland.com/
* Version: 2.0
*
* This program is free software: you can redistribute it and/or modify
import c4d
from c4d import gui
# Welcome to the world of Python
def axe(objet, matrice, relatif = True) :
if relatif : m_obj = objet.GetMl()
else : m_obj = objet.GetMg()
m = ~matrice * m_obj
import c4d
def apply_axis(op,new_m):
loc_m = ~new_m * op.GetMg() #Get local matrix
op.SetAllPoints([loc_m.Mul(p) for p in op.GetAllPoints()])
op.SetMg(new_m)
op.Message(c4d.MSG_UPDATE)
@MikeUdin
MikeUdin / Create text file.py
Last active January 24, 2021 12:25
How to create text file, read and write info
import c4d
from os import path as p
from c4d import gui
# Welcome to the world of Python
# Author: Mike Udin,
# Tutorial here https://mikeudin.net/2016/10/06/cinema-4d-python-tips-working-with-text-files/
# 2016
def main():
import c4d,webbrowser
# Check tutorial and
# download project file here:
# https://mikeudin.net/?p=6900
#### 1 ####
#Python Tag placed User Data Button
def message(id,data):
if id == c4d.MSG_DESCRIPTION_CHECKUPDATE:
import c4d
from c4d import gui
#This script required Cinema 4D R20 and upper
def main():
objs = doc.GetActiveObjects(0)
if not objs:
import c4d
"""
Cinema 4D XPresso Python Node.
Resize Spline to two point separated segments.
Required ports:
SegmentCount(Integer)
Spline(Link)
"""
def main():
"""
How to connect bezier spline points to objects
and control tangents with Python Tag in Cinema 4D.
View tutorial and get project files here
https://mikeudin.net/?p=7503
Author : Mike Udin
Web-site : mikeudin.net
@MikeUdin
MikeUdin / QuickFolder.py
Created October 11, 2016 14:59
Open in Explorer/Finder folder from customizable popup menu
import c4d
from os import path as p
from c4d import storage as st
from c4d import gui
# Welcome to the world of Python
# Author: Mike Udin,
# Tutorial here http://mikeudin.net/?p=2930
# 2016
# localimport-v1.7.3-blob-mcw79
import base64 as b, types as t, zlib as z; m=t.ModuleType('localimport');
m.__file__ = __file__; blob=b'\
eJydWUuP20YSvutXEMiBpIfmeOLDAkJo7GaRAMEGORiLPUQrEBTVkumhSKK75Uhj5L+nHv2iSNpyf\
BiTXY+uqq76qpoqy+qsP/SyLIv4t+a5rVT0vleiU1o0XfSDdM8dEf95PFVNm9f96V28KstPQqqm71\
D4Kf9H/jZeNaehlzqq++Fqn49tv7PPvbJPw/PxrJvWvqqro2hZ1WJX1c924aUZDk0rVs0B2XK7adM\
d+s2bbVF8v15Fe3GIGi1OKrmk8BpJoc+yiy45L6aOQy5xScspWiWWNbaN0olTe4de0klMqmz7umoT\
dKarTiIbKv0B9aGMXSx6leN6Xu0U/u+4YatDLyNcK/E9gvOxCnBPR5hocBRQETVkiDrvRsozz4O6r\
AP/lWexsi8/VxAY64lVgH9AWIqOvNDyyv63SHCWmPcR9yoSl1oMOvpf1Z7FT1L2MggdbRa5va1C1F\
if5b6REcSi67Wl5EpXUqs/GtiFdkUejrv4VLXlEDqr4FiAnO2F0sVvfScyzjRFL+gHRAmJ4GmES2g\