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 bpy | |
import os | |
basedir = bpy.path.abspath('//shadefoot/story_mode/ch1/trees/maple/') | |
bpy.ops.object.select_all(action='DESELECT') | |
scene = bpy.context.scene |
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 bpy | |
def export_all_obj(exportFolder): | |
objects = bpy.data.objects | |
for object in objects: | |
bpy.ops.object.select_all(action='DESELECT') | |
object.select = True | |
exportName = exportFolder + object.name + '.obj' | |
bpy.ops.export_scene.obj(filepath=exportName, use_selection=True) |
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
extends KinematicBody | |
var FOWARD = 200 | |
var MOVEMENT = 200 | |
var JUMP = Vector3(0,100,0) | |
var RUN_SPEED = 300 | |
var mouse_threshold = 10 | |
var mouse_sens_dampened = 0.01 | |
var mouse_sens = 0.01 |
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
extends TileMap | |
# Declare member variables here. Examples: | |
# var a = 2 | |
# var b = "text" | |
var height = 5 | |
var width = 500 | |
var loops = 6 |
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
func db_import(csv_file,dict_to_append,DICT_HEADERS_LIST): | |
#EDITED: In order to loop through keys of keys as noted in the | |
#EDITED section of the first post, EXTRA ARG is called DICT_HEADERS_LIST | |
var file = File.new() | |
#creates a new Class instance. | |
# A var will store this reference as 'file'. (file is not a string) | |
file.open(csv_file,file.READ) | |
#the file is read into memory. | |
# The .csv can now be manipulated with File methods. | |
var is_header = true |
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
extends Node | |
func get_cropped_items(): | |
# Return the items in the cropping zone, | |
# calculates a crop beforehand | |
# CROP THE ITEMS | |
# 1. Find the search Area | |
var min_x = width |
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
extends Node | |
const NONE = -1 | |
const LOG_ID = 0 | |
const CRAFTING_TABLE_ID = 1 | |
var CRAFTING_TABLE_RECIPE | |
func _ready(): | |
var Recipe = load("res://recipe.gd") |
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
extends Node | |
var image_db = {} | |
func _ready(): | |
image_db = load_pngs_from_directory("res://") | |
print(image_db) | |
func load_pngs_from_directory(path): | |
var files = {} |
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
extends Line2D | |
var _prev_pos = Vector2() | |
var points_size = 100 | |
func _ready(): | |
set_process(true) | |
for i in range(points_size): | |
add_point(Vector2()) |
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
extends KinematicBody2D | |
const GRAVITY = 800.0 | |
const PUSH_SPEED = 200 | |
const MAX_SPEED = 500.0 | |
const MIN_OLLIE_FORCE = 200.0 | |
const MAX_OLLIE_FORCE = 350.0 | |
const OLLIE_CHARGE_RATE = 600.0 | |
var OLLIE_FORCE = 0.0 |
NewerOlder