Skip to content

Instantly share code, notes, and snippets.

View TurBoss's full-sized avatar

TurBoss TurBoss

  • Spain
View GitHub Profile
import bpy
bpy.ops.object.mode_set(mode="OBJECT") # Go to Object Mode
bpy.ops.object.select_all()
objs = bpy.context.selected_objects # store all selected Pieces
for n in objs:
n.rotation_mode="ZXY" # Set euler to all stored pieces
#!/bin/bash
#
cd JauriaRTS/
echo "CHECKIN GIT:"
#LOCAL=$(git rev-parse @)
#REMOTE=$(git rev-parse @{u})
#BASE=$(git merge-base @ @{u})
#
@TurBoss
TurBoss / client.py
Created January 26, 2015 14:32 — forked from abma/client.py
#!/usr/bin/env python
from xmlrpclib import ServerProxy
proxy = ServerProxy('http://api.springfiles.com/xmlrpc.php')
searchstring = {
"category" : "engine_linux64",
"limit": 1
}
@TurBoss
TurBoss / euler_changer.py
Last active August 29, 2015 14:19
blender addon to change euler coordinate system to match springrts
bl_info = {
"name": "Euler Changer",
"category": "Object",
}
import bpy
class ObjectEuler(bpy.types.Operator):
"""Changes the Euler coordinate mode""" # blender will use this as a tooltip for menu items and buttons.
import itertools
from panda3d.core import NodePath
from panda3d.core import TransformState
from panda3d.core import Vec3
from panda3d.bullet import BulletBoxShape
from panda3d.bullet import BulletConeShape
from panda3d.bullet import BulletConvexHullShape
from panda3d.bullet import BulletCylinderShape
@TurBoss
TurBoss / ff7patch.py
Last active August 29, 2015 14:24
Patch FF7.exe
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
offset = 5371020
crecimientos = ["\x2E\x49\x4E\x47\x55\x4E\x4F\xFF\x00\x00", # Ninguno
"\x2E\x4F\x52\x4D\x41\x4C\xFF\x00\x00\x00", # Normal
"\x24\x4F\x42\x4C\x45\xFF\x00\x00\x00\x00", # Doble
@TurBoss
TurBoss / ajax_setup.js
Last active August 29, 2015 14:26 — forked from rca/ajax_setup.js
Setup Django CSRF token in JQuery AJAX requests
/**
* setup JQuery's AJAX methods to setup CSRF token in the request before sending it off.
* http://stackoverflow.com/questions/5100539/django-csrf-check-failing-with-an-ajax-post-request
*/
function getCookie(name)
{
var cookieValue = null;
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');
@TurBoss
TurBoss / rotate.py
Last active November 5, 2015 20:58
Rotate Models for spritify ( requires spritify)
import bpy
import os
import math
angle = 45
tx = 10.0
ty = -10.0
@TurBoss
TurBoss / SMFMapDecompiler.py
Last active July 1, 2016 02:22
Beherith's SMF map decompiler
#!/usr/bin/python
# PD license by Beherith
import sys
import struct
from PIL import Image
print 'Welcome to the SMF decompiler by Beherith (mysterme@gmail.com). Place this script next to the .smf file and pass the .smf as a command line argument to this script to get it decompiled'
if len(sys.argv)>1:
print 'Working on:',sys.argv[1]
80 = A
81 = B
82 = C
83 = D
84 = E
85 = F
86 = G
87 = H
88 = I
89 = J