Skip to content

Instantly share code, notes, and snippets.

View 990adjustments's full-sized avatar

Erwin Santacruz 990adjustments

View GitHub Profile
@990adjustments
990adjustments / addExpressoTag.py
Created September 19, 2012 09:33
A Cinema 4D Python script that adds an expresso tag to selected objects. Has undo support.
import c4d
def main():
doc.StartUndo()
# Flags
# 0 GETACTIVEOBJECTFLAGS_0
# 1 GETACTIVEOBJECTFLAGS_CHILDREN
# 2 GETACTIVEOBJECTFLAGS_SELECTIONORDER
objs = doc.GetActiveObjects(1)
@990adjustments
990adjustments / addCompositing.CSC
Created August 4, 2012 01:57
A Cinema 4D C.O.F.F.E.E. script that adds an expresso tag to a selected object.
main(doc,op)
{
// Insert a expresso tag on the selected object
if (!op)
return NULL;
var expressoTag = AllocTag(Texpresso);
op->InsertTag(expressoTag);
}
@990adjustments
990adjustments / hiddenSky.CSC
Created August 4, 2012 01:52
A Cinema 4D C.O.F.F.E.E. script that creates a sky object and applies a compositing tag that has several attributes off by default and assigns a new material with all channels off except luminance.
main(doc,op)
{
// Create sky object
CallCommand(5105);
var sky = doc-> GetActiveObject();
// Insert a compositing tag on selected object and adjust some attributes
var compositingTag = AllocTag(Tcompositing);
compositingTag#COMPOSITINGTAG_SEENBYCAMERA = 0;
compositingTag#COMPOSITINGTAG_CASTSHADOW = 0;
@990adjustments
990adjustments / addExpresso.CSC
Created August 4, 2012 01:49
A Cinema 4D C.O.F.F.E.E. script that adds a compositing tag to a selected object with "Seen by Camera" off by default.
main(doc,op)
{
// Insert a compositing tag on the selected object
if (!op)
return NULL;
var compositingTag = AllocTag(Tcompositing);
compositingTag#COMPOSITINGTAG_SEENBYCAMERA = 0;
op->InsertTag(compositingTag);
}
@990adjustments
990adjustments / .gvimrc
Created May 26, 2012 02:30
My MacVim .gvimrc settings
" assciate *.pyp with python filetype
au BufRead,BufNewFile *.pyp setfiletype python
color molokai
set guioptions-=T
filetype indent on
set expandtab
set tabstop=4
set shiftwidth=4
set autoindent
@990adjustments
990adjustments / hack.sh
Created May 26, 2012 02:02 — forked from erikh/hack.sh
OSX For Hackers v990
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@990adjustments
990adjustments / hack.sh
Created April 1, 2012 23:28 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@990adjustments
990adjustments / OpenPrefs.py
Created February 21, 2012 23:14
A python Cinema 4D script that offers a quick way to open the Cinema 4D user preferences folder without having to go through the Preferences dialog. Make sure to make it a button on your shelf!
"""
OpenPrefs
Copyright: Erwin Santacruz, www.990adjustments.com
Written for CINEMA 4D R12.016
Name-US: OpenPrefs
Description-US: Open the Cinema 4D user preferences folder.
Make it a button for quick access.
@990adjustments
990adjustments / Toggle-AntiAliasing.py
Created November 2, 2011 02:26
A quick Cinema 4d Python script to toggle anti-aliasing setting.
"""
Toggle-AntiAliasing
Copyright: Erwin Santacruz, www.990adjustments.com
Written for CINEMA 4D R12.016
Name-US: Toggle-AntiAliasing
Description-US: A quick toggle for anti-aliasing settings.
Make it a button for quick access