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
# Isolate selection | |
import c4d | |
import c4d.gui as gui | |
import urllib | |
import datetime | |
import platform | |
import traceback | |
import contextlib | |
import webbrowser |
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
# 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 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
def copy_preset_texture(source, dest): | |
''' Copies a bitmap file from the Cinema 4D preset library to the | |
file specified by *dest*. The suffix of *source* is used to determine | |
the output image format. | |
Arguments: | |
source: The source texture path that begins with `preset://` | |
dest: The filename to save the texture to. | |
Raises | |
IOError: If *source* does not exist or could not be loaded. |
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
from c4d import gui | |
import shutil | |
num = 0 | |
def countObjectKeyframe(obj): | |
global num | |
tracks = obj.GetCTracks() |
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) 2015 Niklas Rosenstein | |
# All rights reserved. | |
# | |
# File: show_shaders.py | |
# Last Modified: 16.11.2015 | |
# Description: This script opens a dialog that displays all | |
# shaders in a material, tag or object that can be specified | |
# with a link box. | |
import c4d |
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
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 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 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 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 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() |