Skip to content

Instantly share code, notes, and snippets.

@rraallvv
rraallvv / git-remove-history
Created July 7, 2013 12:47
Script to permanently delete files/folders from your git repository
#!/bin/bash
set -o errexit
# Author: David Underhill
# Script to permanently delete files/folders from your git repository. To use
# it, cd to your repository's root and then run the script with a list of paths
# you want to delete, e.g., git-delete-history path1 path2
if [ $# -eq 0 ]; then
exit 0
@rraallvv
rraallvv / space_view3d_turntable_y_up.py
Last active September 28, 2023 21:57
Enable turntable rotation with Y axis up.
'''
Enable turntable rotation with Y axis up.
'''
bl_info = {
'name': 'Rotate Turntable Y-axis Up',
'author': '',
'version': (0, 0, 1),
'blender': (2, 6, 7),
'location': '3d view > Ctrl + LMB-drag',
@rraallvv
rraallvv / space_view3d_turntable_z_up.py
Last active January 29, 2019 11:04
Blender Add-on to enable turntable rotation with the Z-axis up (Crtl+LeftMouseDrag)
'''
Enable turntable rotation with Z axis up. This addon allows you to have both rotations available, either the built-in trackball, or the turntable provided by the addon can be used at any time without the need to change the user preferences.
'''
bl_info = {
'name': 'Rotate Turntable Z-axis Up',
'author': '',
'version': (0, 0, 1),
'blender': (2, 6, 7),
'location': '3d view > Ctrl + LMB-drag',
@rraallvv
rraallvv / space_view3d_turntable_any_up.py
Last active January 29, 2019 11:04
Enable turntable rotation with any axis up, the axis that is most aligned vertically is the new up axis of the turntable rotation until a new mouse gesture is initiated by either releasing the mouse button or the modifier keyboard key
'''
Enable turntable rotation with any axis up, the axis that is most aligned vertically is the new up axis of the turntable rotation until a new mouse gesture is initiated by either releasing the mouse button or the modifier keyboard key
'''
bl_info = {
'name': 'Rotate Turntable ANY-axis Up',
'author': '',
'version': (0, 0, 1),
'blender': (2, 6, 7),
'location': '3d view > Ctrl + LMB-drag',
@rraallvv
rraallvv / space_view3d_trackball_all_axes.py
Created July 12, 2013 17:10
Adds turntable rotation that rotates freely independently of the view rotation, with out gimbal lock.
bl_info = {
'name': 'Rotate trackball in all axis',
'author': '',
'version': (0, 0, 1),
'blender': (2, 6, 7),
'location': '3d view > Alt + LMB-drag',
'description': 'Add trackball rotation that rotates freely around all axes.',
'wiki_url': '',
'tracker_url': '',
'category': '3D View'}
@rraallvv
rraallvv / space_view3d_pan_naturally.py
Created July 13, 2013 06:03
Natural panning to older versions of Blender
bl_info = {
'name': 'Pan naturally',
'author': '',
'version': (0, 0, 1),
'blender': (2, 6, 0),
'location': '3d view > Alt + LMB-drag',
'description': 'Pan view naturally for older Blender versions.',
'wiki_url': '',
'tracker_url': '',
'category': '3D View'}
@rraallvv
rraallvv / Cocos3d plane primitive
Last active August 29, 2015 13:57
Cocos3d plane
CC3MeshNode *node = [CC3MeshNode node];
[node populateAsCenteredRectangleWithSize:CGSizeMake(width, height)];
CC3Box bounds = { {-1, -1, -1}, {1, 1, 1} };
CC3MeshNode *cube = [CC3MeshNode node];
[cube populateAsSolidBox:bounds];
CC3MeshNode *sphere = [CC3MeshNode node];
[sphere populateAsSphereWithRadius:1 andTessellation:(CC3Tessellation){8,8}];
@rraallvv
rraallvv / space_view3d_simple_align.py
Created April 11, 2014 16:36
Align Selected Objects to Active Object
# AlingTools.py (c) 2009, 2010 Gabriel Beaudin (gabhead)
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#