Skip to content

Instantly share code, notes, and snippets.

@HansNewbie
HansNewbie / CMAKE Note.md
Last active August 29, 2015 14:02
CMAKE Note
View CMAKE Note.md

====

INSTALL( TARGETS [library name]
         LIBRARY DESTINATION $(LIBDIR)] )

In Windows, this will give error install Library Targets given no DESTINATION. http://www.cmake.org/pipermail/cmake/2008-September/023876.html

You only install the LIBRARY but not the ARCHIVE (the static import lib automatically created when you export functions from a lib on windows). A static library is also treated as ARCHIVE by cmake on windows. So either remove LIBRARY or add a destination for ARCHIVE. Another thing which comes to my mind is that a library is treated as RUNTIME - but I'm unsure atm :)

So best is - remove 'LIBRARY' and you'll be fine.

@HansNewbie
HansNewbie / Building PyIlmBase for PyAlembic on Windows.md
Created June 9, 2014 01:31
Troubles that I find on building PyIlmBase for PyAlembic on Windows. I have not succeeded and I am not continuing as someone else has successfully build so. For the CMAKE of PyIlmBase, I use the one which was in pull request of the repo.
View Building PyIlmBase for PyAlembic on Windows.md
  • Python must be 64 bit Python to build Boost 64 bit (I didn't realize the Python I had was 32 bit)
  • Need Boost DLL instead of static library
  • Since I did not configure my CMAKE, I feed the find packages library manually from command line
  • In PyIex, I keep getting dllimport error since it is supposedly dllexport. Define the condition as preprocessor directives in PyIex
  • need to build IexMath; it was not in the VC of IlmBase, I build my own
  • Boost 1.53 and 1.52 did not work on compiling PyImath module (PyIex compiles and links just fine)
@HansNewbie
HansNewbie / Windows Program Not Sharp.md
Last active August 29, 2015 14:03
Windows Program not Sharp
View Windows Program Not Sharp.md
  1. RMB on the program button
  2. Choose Compatibility
  3. Tick Disable display scaling on high DPI settings
  4. ???
  5. Profit!!!
@HansNewbie
HansNewbie / Bug.md
Last active August 29, 2015 14:03
GF Markdown Bug
View Bug.md

[ ] a [ ] b

  • c
  • d

If user is careless, forgetting to put "- " before "[ ]", TODO list could get buggy.

Steps to reproduce bug:

  • on parsed MD page of list above, tick "c" to note that "c" is done.
  • Now, edit the file.
View maya_make_circular_motion.py
from maya import cmds
from math import *
def euler(x, dt, dxdt):
x_new = [0, 0, 0]
# TODO: implement the Euler method here
for i in range(0,3):
x_new[i] = x[i] + dt*dxdt[i]
@HansNewbie
HansNewbie / GUIManager.cs
Last active August 5, 2016 23:29
Improvements to Unity Endless Runner tutorial from http://catlikecoding.com/unity/tutorials/runner/; Find more information about my version at http://ideascomecheap.blogspot.com/search/label/Unity%20Endless%20Runner%20Tutorial
View GUIManager.cs
using UnityEngine;
using System;
using System.Collections;
public class GUIManager : MonoBehaviour {
public GUIText boostsText,
distanceText,
gameOverText,
instructionsText,
@HansNewbie
HansNewbie / Python Turtle Fractal Plant.py
Last active July 18, 2021 20:09
Python Turtle Fractal Plant
View Python Turtle Fractal Plant.py
# As described in http://en.wikipedia.org/wiki/L-system#Example_7:_Fractal_plant
import turtle
ruleInput = ['F', 'X']
ruleOutput = ["FF", "F-[[X]+X]+F[+FX]-X"]
start = "X"
front = 5
turn = 30
stack = []