Skip to content

Instantly share code, notes, and snippets.

@ChemiKhazi
ChemiKhazi / BlenderExternalAddOnDev.md
Last active July 6, 2019 15:36
Blender Add On External IDE Dev Tips

Developing Blender Add Ons with external IDEs

This are small tips on developing Blender add ons using external IDEs like PyCharm.

Location, Location, Location

Developing in Blender's user scripts folders is the easiest way I've found to dev with external IDEs.

Specifically, using the addons_contrib folder.

@ChemiKhazi
ChemiKhazi / PreferenceWindowUtils.cs
Last active May 11, 2019 16:14
Open Unity3D preferences window to specific page.
using System;
using System.Collections;
using System.Reflection;
using UnityEditor;
namespace UnityToolbag
{
public static class PreferenceWindowUtils
{
/// <summary>
@ChemiKhazi
ChemiKhazi / EnumFlagAttribute.cs
Created April 29, 2014 09:59
Unity3d property drawer for automatically making enums flags into mask fields in the inspector.
using UnityEngine;
public class EnumFlagAttribute : PropertyAttribute
{
public string enumName;
public EnumFlagAttribute() {}
public EnumFlagAttribute(string name)
{
@ChemiKhazi
ChemiKhazi / gist:9014977
Created February 15, 2014 05:33
Unity3D Enum Flags PropertyDrawer
[CustomPropertyDrawer(typeof(EnumType))]
public class PlayerUnitDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
EditorGUI.BeginProperty(position, label, property);
property.intValue = (int) (EnumType) EditorGUI.EnumMaskField(position, "Property Name", (EnumType)property.intValue);
EditorGUI.EndProperty();
}