Skip to content

Instantly share code, notes, and snippets.

View Jason0214's full-sized avatar
🏠

Lu Jiacheng Jason0214

🏠
View GitHub Profile
@Jason0214
Jason0214 / shape_key_bake.py
Last active May 17, 2019 04:47
Blender2.8 bake shape key to mesh
import bmesh
base_key = obj.data.shape_keys.reference_key
for index, shape_key in enumerate(obj.data.shape_keys.key_blocks):
if shape_key == base_key:
continue
obj.show_only_shape_key = True
obj.active_shape_key_index = index
bpy.context.scene.update()
shape_key_mesh = obj.to_mesh(bpy.context.view_layer.depsgraph, apply_modifiers=True, calc_undeformed=True)
obj.show_only_shape_key = False
@Jason0214
Jason0214 / tar.md
Created May 16, 2019 07:31
OSX tar with no ._ file
COPYFILE_DISABLE=1 tar
@Jason0214
Jason0214 / cmake_install.md
Created February 9, 2019 23:21
Call install after make
add_custom_command(
    TARGET foo
    POST_BUILD
    COMMAND ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/foo --target install
)
@Jason0214
Jason0214 / mov_to_gif.md
Last active September 7, 2019 22:15
.mov to .gif
@Jason0214
Jason0214 / GSOC-2018-Proposal.md
Last active November 16, 2018 06:49
GSOC 2018 Proposal
@Jason0214
Jason0214 / GSOC 2018 Final Report.md
Last active August 6, 2018 05:53
GSOC 2018 Final Report
@Jason0214
Jason0214 / start_vm.sh
Created May 22, 2018 01:52
start headless virtual box
VBoxManage list vms
VBoxManage startvm "ubuntux64" --type headless
VBoxManage controlvm "ubuntux64" pause --type headless
VBoxManage controlvm "ubuntux64" resume --type headless
VBoxManage controlvm "ubuntux64" poweroff --type headless