Skip to content

Instantly share code, notes, and snippets.

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
@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
@MikeUdin
MikeUdin / wc-free-checkout-fields.php
Created March 18, 2019 16:08 — forked from bekarice/wc-free-checkout-fields.php
Simplify WooCommerce checkout fields for free checkouts
<?php // only copy if needed
/**
* Removes coupon form, order notes, and several billing fields if the checkout doesn't require payment.
*
* Tutorial: http://skyver.ge/c
*/
function sv_free_checkout_fields() {
// first, bail if the cart needs payment, we don't want to do anything
@MikeUdin
MikeUdin / Grouping objects in Cinema 4D.py
Last active February 28, 2018 11:51
Grouping objects in Cinema 4D
import c4d
from c4d import gui
# Welcome to the world of Python
# Author: Mike Udin,
# Tutorial here http://mikeudin.net/2018/02/28/cinema-4d-python-grouping/
# 2018
def main():
obs = doc.GetActiveObjects(0)
@MikeUdin
MikeUdin / Cinema 4D Apply Random Material.py
Created August 23, 2017 15:02
Cinema 4D Apply Random Material
import c4d
from c4d import gui
from random import shuffle
#Welcome to the world of Python
def main():
objs = doc.GetActiveObjects(2)
if not objs:
gui.MessageDialog('Please select some objects!')
@MikeUdin
MikeUdin / Toggle_viewport_parameters.py
Created June 26, 2017 12:45
Toggle viewport parameter Title save and Action Save
import c4d
# Toggle viewport parameter Title save and Action Save
# Author: Mike Udin
# http://mikeudin.net
def main():
bd = doc.GetActiveBaseDraw()
@MikeUdin
MikeUdin / Toggle_selected_objects_visibility.py
Created June 26, 2017 12:35
Toggle visibility of the selected objects in Cinema 4D scene
import c4d
# Toggle selected objects visibility in Editor and Renderer
# SHIFT - toggle visibility in Editor only
# CONTROL - toggle visibility in Renderer only
# Author: Mike Udin
# http://mikeudin.net
@MikeUdin
MikeUdin / ToogleBoolParameter.py
Created June 26, 2017 11:14
Cinema4D Python Toogle Script Example: ToogleBoolParameter.py
import c4d
# Toggle selecting render settings Render Region parameter
# Author: Mike Udin
# http://mikeudin.net
def main():
rd = doc.GetActiveRenderData()
rd[c4d.RDATA_RENDERREGION] = not rd[c4d.RDATA_RENDERREGION]
@MikeUdin
MikeUdin / ToogleTools.py
Last active June 26, 2017 11:09
Toggle Tools Example
import c4d
# Toggle selecting between different tools
# Author: Mike Udin
# http://mikeudin.net
def main():
values = (200000083, # Live Selection
200000088, # Move
@MikeUdin
MikeUdin / SweepNObject_from_EdgeSelection.py
Created January 10, 2017 18:36
Script creates new Sweep Nurbs object from selected edge
import c4d
from c4d import utils
# This script creates new Sweep Nurbs object from selected edge
# Author: Mike Udin,
# Tutorial here http://mikeudin.net/2017/01/10/cinema-4d-python-send-modelling-command
# 2016
def main():