Changeset View
Changeset View
Standalone View
Standalone View
rigify/utils.py
| Context not available. | |||||
| Write a metarig as a python script, this rig is to have all info needed for | Write a metarig as a python script, this rig is to have all info needed for | ||||
| generating the real rig with rigify. | generating the real rig with rigify. | ||||
| """ | """ | ||||
| code = [] | code = [ | ||||
| "import bpy\n\n", | |||||
| "def %s(obj):" % func_name, | |||||
| " # generated by rigify.utils.write_metarig", | |||||
| " bpy.ops.object.mode_set(mode='EDIT')", | |||||
| " arm = obj.data" | |||||
| ] | |||||
| code.append("import bpy\n\n") | |||||
| code.append("def %s(obj):" % func_name) | |||||
| code.append(" # generated by rigify.utils.write_metarig") | |||||
| bpy.ops.object.mode_set(mode='EDIT') | bpy.ops.object.mode_set(mode='EDIT') | ||||
| code.append(" bpy.ops.object.mode_set(mode='EDIT')") | |||||
| code.append(" arm = obj.data") | |||||
| arm = obj.data | arm = obj.data | ||||
| Context not available. | |||||