Skip to content

Instantly share code, notes, and snippets.

@Miouyouyou
Miouyouyou / command.sh
Created April 13, 2021 21:24
armbian build command
sudo bash ./compile.sh docker REPOSITORY_INSTALL="u-boot,kernel,armbian-config,armbian-firmware" KERNEL_ONLY=no KERNEL_CONFIGURE=no BOARD=nanopct4 KERNEL_TARGET=current BRANCH=current BUILD_DESKTOP=yes DESKTOP_ENVIRONMENT="xfce" RELEASE="focal" DESKTOP_ENVIRONMENT_CONFIG_NAME=config_base DESKTOP_APPGROUPS_SELECTED="browsers editors programming 3dsupport"
@Miouyouyou
Miouyouyou / AssociateTexturesToMaterialsEditor.cs
Last active March 9, 2021 05:02
Automatically associate textures to materials with the same name on Unity. Put this file inside your Assets folder and a new 'Window -> Custom MeowMeow' window should appear. Select the component with a 'MeshRenderer' to apply it to and click 'apply'.
using UnityEngine;
using System.Collections;
using UnityEditor;
public class TestEditor : EditorWindow
{
public GameObject go;
public Texture[] textures;
@Miouyouyou
Miouyouyou / gltf_to_glb.gd
Last active March 11, 2021 10:13
Convert GLTF to GLB files in Godot ( GDScript )
extends Node
func align_buffer_on_4_bytes(buffer:PoolByteArray):
var buffer_size:int = buffer.size()
for i in range(0, buffer_size & 3):
buffer.append(0)
func convert_gltf_to_glb_working(gltf_filepath:String, glb_out_filepath:String):
var f:File = File.new()
var err_ret = f.open(gltf_filepath, File.READ)
@Miouyouyou
Miouyouyou / images_nodes_to_disk.py
Created March 7, 2021 16:53
Blender : Save all shaders texture images nodes to the disk
import bpy
from pathlib import Path
out_folder_path = "C:\\temp\\"
for mat in bpy.data.materials:
tree = mat.node_tree
if tree:
for node in tree.nodes:
if type(node) == bpy.types.ShaderNodeTexImage:
@Miouyouyou
Miouyouyou / 0001-Dockerfile-Fix-uuidgen-not-found-during-build.patch
Created January 5, 2021 16:57
Dockerfile: Fix uuidgen not found during builds
From 8e3b9090e6929814864d87f0cf71e459c1553ee2 Mon Sep 17 00:00:00 2001
From: "Miouyouyou (Myy)" <[email protected]>
Date: Tue, 5 Jan 2021 17:56:04 +0100
Subject: [PATCH] Dockerfile: Fix uuidgen not found during build
By adding uuid-runtime to the list of packages to install.
Signed-off-by: Miouyouyou (Myy) <[email protected]>
---
config/templates/Dockerfile | 1 +
From 2ce078b6ad63eca06325f9d07d529e8d620f6cb7 Mon Sep 17 00:00:00 2001
From: "Miouyouyou (Myy)" <[email protected]>
Date: Sun, 13 Dec 2020 04:21:16 +0100
Subject: [PATCH] Fixing a few issues with putting the Desktop build inside IF
The issue was that some variables were done defined
correctly if the first IF block was skipped, due to
defining settings directly through variables.
Also made sure to only cover some parts when desktop
@Miouyouyou
Miouyouyou / 0001-Master-to-3.2-port.patch
Created December 10, 2020 00:00
Godot speech 4.0 to 3.2
From 4765ea3342c76f7e416dd50d9bf39adcaa48f351 Mon Sep 17 00:00:00 2001
From: "Miouyouyou (Myy)" <[email protected]>
Date: Thu, 10 Dec 2020 00:58:11 +0100
Subject: [PATCH] Master to 3.2 port
Basically, rename all the Packed Array references to Pool Array
references, and use the appropriate pointer calls.
It's still untested, so it might attack you in your sleep.
@Miouyouyou
Miouyouyou / bad_code.cpp
Last active December 5, 2020 21:06
wrong changes
static void _add_lower_tree(
Ref<GLTFState> const state,
GLTFNodeIndex const node_name_i,
Map<String, GLTFNodeIndex> * __restrict const name_gltf_node)
{
Ref<GLTFNode> node = state->nodes[node_name_i];
name_gltf_node->insert(node->get_name(), node_name_i);
Vector<int> children = node->get_children();
for (int i = 0; i < children.size(); i++) {
_add_lower_tree(state, children[i], name_gltf_node);
@Miouyouyou
Miouyouyou / changes.patch
Created December 5, 2020 19:16
GLTF Document changes
--- gltf_document.cpp 2020-12-05 20:03:10.357261955 +0100
+++ ../godot/modules/gltf/gltf_document.cpp 2020-12-05 19:55:20.862232677 +0100
@@ -45,11 +45,12 @@
#include "thirdparty/misc/rjm_texbleed.h"
-#include "core/bind/core_bind.h"
+#include "core/core_bind.h"
#include "core/crypto/crypto_core.h"
#include "core/io/json.h"
@Miouyouyou
Miouyouyou / build-part.sh
Last active October 2, 2020 14:10
Just for help on IRC
if [[ -z ${DESKTOP_APT_FLAGS_SELECTED+x} ]]; then
options=()
options+=("recommends" "Install packages recommended by selected desktop packages" off)
options+=("suggests" "Install packages suggested by selected desktop packages" off)
DESKTOP_APT_FLAGS_SELECTED=$(\
show_select_menu \
"Choose Apt Additional FLags" \
"$backtitle" \