This file contains hidden or 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
# http://stackoverflow.com/questions/2587751/an-algorithm-to-find-bounding-box-of-closed-bezier-curves | |
from __future__ import division | |
import math | |
def getBoundsOfCurve(x0, y0, x1, y1, x2, y2, x3, y3): | |
tvalues = [] | |
bounds = [[], []] | |
points = [] |
This file contains hidden or 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
from c4d import gui | |
import shutil | |
num = 0 | |
def countObjectKeyframe(obj): | |
global num | |
tracks = obj.GetCTracks() |
This file contains hidden or 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
ABCEXPORT_CAMERAS | |
ABCEXPORT_FORMAT | |
ABCEXPORT_FORMAT_HDF5_LEGACY | |
ABCEXPORT_FORMAT_OGAWA | |
ABCEXPORT_FRAME_END | |
ABCEXPORT_FRAME_START | |
ABCEXPORT_FRAME_STEP | |
ABCEXPORT_GLOBAL_MATRIX | |
ABCEXPORT_GROUP | |
ABCEXPORT_HAIR |
This file contains hidden or 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
# Script by RuiMac - 09-2015 | |
import c4d | |
from c4d import gui | |
#Welcome to the world of Python | |
def replace(obj,m1,m2): | |
# while there are still objects... | |
while obj: | |
# get all the tags of the object |
This file contains hidden or 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
# Script by RuiMac - 09-2015 | |
import c4d | |
import sys | |
from c4d import gui | |
# IDs of the dialog elements | |
OPTION=1000 | |
TH_TEXT=1009 | |
THRESHOLD=1010 |
This file contains hidden or 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 c4d | |
# Slightly modified version of Lennart's (tca studios) script from this thread: | |
# http://www.plugincafe.com/forum/forum_posts.asp?TID=6600&KW=&PID=27379#27379 | |
def main(): | |
if op is None: return False | |
oldm = op.GetMg() | |
points = op.GetAllPoints() |
This file contains hidden or 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 c4d | |
from c4d import gui, documents | |
def main(): | |
# BaseDraw | |
bd = doc.GetActiveBaseDraw() | |
# The camera view | |
view = bd.GetSafeFrame() |
This file contains hidden or 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 c4d | |
import re | |
""" | |
1. Create python tag on camera and add this code to it. | |
2. Duplicate tag to other cameras. | |
3. Rename your camera layers to match the frame you want it be be active on, e.g., cam-1, Camera01, 01. | |
""" | |
def main(): |
This file contains hidden or 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 c4d | |
from c4d import gui | |
def main(): | |
doc = c4d.documents.GetActiveDocument() | |
op = doc.GetActiveObject() | |
if op is None or op.GetType() != c4d.Opolygon: return | |
bs = op.GetPointS() |
This file contains hidden or 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
<?php // only copy if needed | |
/** | |
* Removes coupon form, order notes, and several billing fields if the checkout doesn't require payment. | |
* | |
* REQUIRES PHP 5.3+ | |
* | |
* Tutorial: http://skyver.ge/c | |
*/ | |
function sv_free_checkout_fields() { |