-
Notifications
You must be signed in to change notification settings - Fork 0
/
go_to_blender.lsp
39 lines (38 loc) · 1.04 KB
/
go_to_blender.lsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
; workflow #1
; create layer named GO_TO_BLENDER (window>layers)
; set point visible (format>point style)
; .. then this output:
(defun c:gotoblender()
(setq ss (ssget "x" '((0 . "POINT")(8 . "GO_TO_BLENDER"))))
(setq count 0)
(setq len (sslength ss))
(princ "\n---- [")
(while (< count len)
(setq entity (ssname ss count))
(setq entitycoords (assoc 10 (entget entity)))
(princ "(")
(princ (nth 1 entitycoords))
(princ ",")
(princ (nth 2 entitycoords))
(princ ",")
(princ (nth 3 entitycoords))
(princ "),")
(setq count (1+ count))
)
(princ "]")
(princ)
)
; # goes here
; import bpy,bmesh,mathutils,math
;
; def create_vertices (name, verts):
; # Create mesh and object
; me = bpy.data.meshes.new(name+'Mesh')
; ob = bpy.data.objects.new(name, me)
; ob.show_name = True
; # Link object to scene
; bpy.context.scene.objects.link(ob)
; me.from_pydata(verts, [], [])
; # Update mesh with new data
; me.update()
; return ob