Skip to content

Instantly share code, notes, and snippets.

View smkplus's full-sized avatar
😍
Curios

Seyed Morteza Kamali smkplus

😍
Curios
View GitHub Profile
@smkplus
smkplus / URP Material Property Block.md
Last active March 28, 2024 22:06
URP Material Property Block
Shader "PBR Master"
{
    Properties
    {
        _Color("Color", Color) = (0, 0, 0, 0)
    }
    SubShader
    {
 Tags
@smkplus
smkplus / Blender Reference Manager.py
Created August 30, 2020 13:28
Blender Reference Manager
import os
import bpy
import bpy.utils.previews
def get_image(filepath):
name = os.path.basename(filepath)
if name not in bpy.data.images:
bpy.ops.image.open(filepath = filepath)
return bpy.data.images(name)
@smkplus
smkplus / Blender Reference Manager.py
Created August 30, 2020 13:28
Blender Reference Manager
```
import os
import bpy
import bpy.utils.previews
def get_image(filepath):
name = os.path.basename(filepath)
if name not in bpy.data.images:
bpy.ops.image.open(filepath = filepath)
return bpy.data.images(name)
@smkplus
smkplus / Run_Script_in_PyConsole.py
Created August 24, 2020 14:22 — forked from tin2tin/Run_Script_in_PyConsole.py
Run Script in the Python Console
bl_info = {
"name": "Run Script in PyConsole",
"author": "CoDEmanX",
"version": (1, 0),
"blender": (2, 80, 0),
"location": "Python Console > Console > Run Script",
"description": "Execute the code of a textblock within the python console.",
"warning": "",
"wiki_url": "",
"tracker_url": "",
@smkplus
smkplus / Run_Script_in_PyConsole.py
Created August 24, 2020 14:22 — forked from tin2tin/Run_Script_in_PyConsole.py
Run Script in the Python Console
bl_info = {
"name": "Run Script in PyConsole",
"author": "CoDEmanX",
"version": (1, 0),
"blender": (2, 80, 0),
"location": "Python Console > Console > Run Script",
"description": "Execute the code of a textblock within the python console.",
"warning": "",
"wiki_url": "",
"tracker_url": "",
/// Texture exporter for Unity
///
/// IMPORTANT: Must be put into Editor folder to work
///
/// Right click on a texture in assets window and select one of 'Export/' options
/// - Use "RG Normal Map" to export normal maps as it will swap AG channels used by Unity shaders into typically used RG channels
///
/// Original script by Eric5h5
/// Rewritten to C# and updated by Nothke
///
@smkplus
smkplus / Circle.cs
Created June 23, 2020 19:28
Circle.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Circle : MonoBehaviour
{
[SerializeField] private GameObject prefab;
[SerializeField] private float radius = 2;
[SerializeField] private float number = 1;
private float t;
using UnityEngine;
using System.Collections;
public class grouping: MonoBehaviour {
[System.Serializable]
public class class1{
public enum myEnum {one,two,three};
public myEnum[] row;
public string name;
public int price;
}
using UnityEngine;
public class SomePerson : MonoBehaviour
{
//This field gets serialized because it is public.
public string firstName = "John";
//This field does not get serialized because it is private.
private int age = 40;
interface ICanHex
{
void Hex();
}
interface ICanHeal
{
void Heal();
}