DolphinDream
  • Member for 8 years, 8 months
  • Last seen more than a week ago
Efficient way to get selected vertices via python (without iterating over the entire mesh)
5 votes

In newer versions of Blender you can use (while in Edit Mode): bpy.context.active_object.data.total_vert_sel bpy.context.active_object.data.total_edge_sel bpy.context.active_object.data.total_face_sel ...

View answer
How can I get the dimensions of a newly-created material node via Python?
3 votes

There seems to be a solution to this (see below). Keep in mind, though, that while in general this approach is not recommended, in some cases it may work just fine. Add this call to your script to ...

View answer
Add custom shortcut to toggle "Maximum Draw Type"
1 votes

Further more, if anyone is interested in toggling between WIRE and SOLID display type you can use wm.context_toggle_enum instead of wm.context_menu_enum, which then lets you provide the two toggle ...

View answer
Lock Front/Top/Left views from entering User view when dragging mouse
0 votes

Well. it turns out there is an add-on for this already that lets you lock/unlock any 3D view (top/bottom, left/right, front/back views.. and also the user view.. in orthographic or perspective modes). ...

View answer