Cinema4D - Minesweeper Script

Cinema 4D gives us a 3D engine, Objects, Gui and some programming languages.. that's all what we need to create some games.. of course there is some limitations, but it still possible.

that's why i developped a classic game "Minesweeper". The first of a long series (I hope...) of #Games4Cinema

This script is a draft, it still needs some features like placing flags or option menu etc...

enjoy :)

minesweeper default minesweeper gameover


  • Clone the project or download the zip file and extract it into the Maxon scripts directory.
    • WindowsC:\Program Files\MAXON\CINEMA 4D R<version>\library\scripts\
    • MacOs/Applications/MAXON/CINEMA 4D R<version>/library/scripts/
  • Restart Cinema 4D
  • Open Cinema 4D Menu
    • Script » User scripts » Minesweeper » minesweeper

# You can change the size of the grid and difficulty by changing the values passed to the `MinesweeperGui` object.
# The args are: Rows, Columns, Difficulty[EASY|MEDIUM|DIFFICULT]

if __name__ == '__main__':
    dlg = MinesweeperGui(15, 10, Level.EASY)

Update: HNDisabler+

HNDisabler+ is a free Cinema 4D plugin (R13 and +) which allows you to enable, disable and change the visibility of one or multiple objects just by one click.

All objects are grouped by type, so, you can for instance disable all Hypernurbs or Bool objects at the same time, which is useful especially when you work on very heavy scenes.

Download HNDisabler+

Checkout the new HNDisabler plugin page


Update : zArabic 1.3

What's new in this version ?

  • you can use it for both sys Mac and Windows.
  • you can use Harakate / Tachkil when you write.
  • some known bugs corrected.
  • more efficient code.
  • also, you can copy the translated text to oher software such Photohop or AE.
  • etc...

ما الجديد في هذه االنسخة ؟
  • يمكن استخدام المقبس على الماك و الويندوز
  • يمكن استخدام التشكيل عند الكتابة
  • بعض الأخطاء المعروفة تم تصحيحها
  • يمكن تصدير النص الناتج الى برامج أخرى مثل الفوتوشوب أو غيره

Download zArabic 1.3.5

Check out the new zArabic plugin page

RandomColor Script

I did a quick script to assign a random color to the objects present in the scene. I also added some functions to make it more 'convenient'. now, you can change the color of one/multiple objects, or inversely, disable single/all colors.

Download old RandomColor script

Check out the RandomColor plugin version

 here you can find source of the main Script RandomColor_All :

""" Set a random color to all objects """
import c4d
from c4d import Vector
from random import randint

def get_random_color():
    """ Return a random color as c4d.Vector """
    def get_random_value():
        """ Return a random value between 0.0 and 1.0 """
        return randint(0, 255) / 256.0
    return Vector(get_random_value(), get_random_value(), get_random_value())

def process(fct):
    """ Loop over the current document objects and apply a function to each one """
    def get_next_object(current_object):
        """ Return the next object in the hierarchy """
        if current_object.GetDown(): return current_object.GetDown()
        while not current_object.GetNext() and current_object.GetUp():
            current_object = current_object.GetUp()
        return current_object.GetNext()

    used_colors_list = []
    obj = doc.GetFirstObject()
    while obj is not None:
        doc.AddUndo(c4d.UNDOTYPE_CHANGE, obj)
        fct(obj, used_colors_list)
        obj = get_next_object(obj)

def set_color(obj, used_colors):
    """ Applay a random color to an object """
    color = get_random_color()
    # Check that the current color is not already used
    while color in used_colors:
        color = get_random_color()
    # Apply the chosen color to the object
    obj.SetParameter(c4d.ID_BASEOBJECT_COLOR, color, 0);

def main():

if __name__=='__main__':

zManipulator v1.0b


long time since my last post
well, let's start by new plugin, zManipulator
3 in 1:  you can Move, Rotate & Scale your object with the same tool.
you can also, move the object axis to a vertex, by holding Ctrl  and Left Mouse click.
to center the axis again, just hold Ctrl, and click in an empty space.
it's a beta version, and contains some bugs.
of course, i'm still working on it ^^

>> Download zManipulator v1.0b

hope you'll find it useful!