This Gist contains a bunch of Craftfiles to compile various libraries.
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
ident = 5159 | |
import c4d | |
print "************"*4 | |
print "Results for", ident | |
for key, value in vars(c4d).iteritems(): | |
if value == ident: | |
print(key) |
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) 2016 Niklas Rosenstein | |
# All rights reserved. | |
# | |
# Create: 2016/02/19 | |
# Last Modified: 2016/02/19 | |
# | |
# Dirty script to generate a badge with a left- and right-side text. | |
# The font family and size and whether a red or green badge should | |
# be generated can be controlled via the command-line. | |
# |
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) 2016 Niklas Rosenstein | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: | |
// | |
// The above copyright notice and this permission notice shall be included in |
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
# This script creates an image hash database and can then be used | |
# to copy image files to a directory, but only when they are not | |
# already in that directory (by the image hash). | |
from __future__ import print_function | |
from itertools import islice, izip | |
from six.moves import range | |
import argparse | |
import cPickle | |
import errno |
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: c4d_pluginid_exporter.py | |
# Created: 2015-11-18 | |
# Last Modified: 2015-11-18 | |
# Description: This script exports a list of all installed plugins | |
# to a text file. The first token in each line is the plugin ID | |
# where the rest of the line is the name of the plugin. |
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: remove_rogue_shaders.py | |
# Last Modified: 16.11.2015 | |
# Version: 1.0 | |
# Description: Removes all rogue shaders from all materials | |
# in the scene, that is all shaders that are in the materials | |
# shader list but are not actually used in the material. |
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
from __future__ import print_function | |
print("You've been jagged!") | |
print("Installing a Virus ...") |