Last active
August 29, 2015 13:56
-
-
Save lab1092/8883226 to your computer and use it in GitHub Desktop.
強いられているんだメッシュを(途中まで)作ります… https://twitter.com/blug_jp/status/431974444689399808/photo/1 から着想。うまくピボットのモードが更新されてないので手作業が必要。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A script to make focus line mesh , SHIIRARETEIRUNNDA | |
# for 2.69 , load text editor and hit Alt+P | |
# (limitation: you must display one 3dview to run this) | |
# (limitation2: do not run this twice) | |
import bpy | |
bpy.ops.mesh.primitive_circle_add(vertices=200, view_align=False, enter_editmode=True) | |
bpy.ops.mesh.subdivide(smoothness=0, fractal=5) | |
bpy.ops.mesh.select_nth(nth=3) | |
bpy.ops.mesh.delete(type='VERT') | |
bpy.ops.mesh.select_all(action='TOGGLE') | |
bpy.ops.mesh.extrude_region_move() | |
# bpy.context.space_data.pivot_point = 'CURSOR' will be below block... | |
for x in bpy.context.screen.areas: | |
if x.type == 'VIEW_3D': | |
x.spaces[0].pivot_point = 'CURSOR' | |
bpy.ops.transform.resize(value=(0.2, 0.2, 0.2), constraint_axis=(False, False, False), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1) | |
#Bleow code won't work as i want... | |
## bpy.context.space_data.pivot_point = 'INDIVIDUAL_ORIGINS' will be below block... | |
#for x in bpy.context.screen.areas: | |
# if x.type == 'VIEW_3D': | |
# x.spaces[0].pivot_point = 'INDIVIDUAL_ORIGINS' | |
#bpy.ops.transform.resize(value=(0.1, 0.1, 0.1)) | |
bpy.ops.object.editmode_toggle() | |
bpy.ops.transform.resize(value=(5, 5, 5)) | |
bpy.context.scene.update() | |
# [Manual Operation is needed] | |
# Next, in Edit mode,Set Pivot as INDIVIDUAL_ORIGINS,and [S]->'0'->[Enter] | |
# also set material color( usually shadeless black) as you want. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment