Search found 894 matches
- Wed Oct 02, 2013 8:28 am
- Forum: Python
- Topic: Check if a poly is a face
- Replies: 29
- Views: 19564
Hm dunno if there's a faster builtin way (other than using select loose operator), but should work: import bpy, bmesh for ob in bpy.context.scene.objects: if ob.type != 'MESH': continue bm = bmesh.new() bm.from_object(ob, bpy.context.scene) if len(bm.faces) > 0 and 0 not in (len(e.link_faces) for e ...
- Wed Oct 02, 2013 1:46 am
- Forum: Python
- Topic: Check if a poly is a face
- Replies: 29
- Views: 19564
hm maybe you actually mean to analyse these two cases?

For the left cube, test should return True, for the right (no faces) False?

For the left cube, test should return True, for the right (no faces) False?
Code: Select all
[print(ob.name, len(ob.data.polygons) > 0) for ob in bpy.context.scene.objects]
- Wed Oct 02, 2013 1:35 am
- Forum: Python
- Topic: Efficient way of adding large meshes through the Python API
- Replies: 6
- Views: 9922
Here's a cube mesh added with low level api, should have better performance than the operator: import bpy from bpy_extras.io_utils import unpack_list, unpack_face_list coords = ( (-1.0, -1.0, -1.0), (-1.0, 1.0, -1.0), (1.0, 1.0, -1.0), (1.0, -1.0, -1.0), (-1.0, -1.0, 1.0), (-1.0, 1.0, 1.0), (1.0, 1....
- Tue Oct 01, 2013 10:33 am
- Forum: Python
- Topic: Check if a poly is a face
- Replies: 29
- Views: 19564
verts and edges are NOT faces, polygons are (triangles, quads and ngons).
Face access goes via .polygons
See my addon, it counts tris, quads and ngons separately:
https://svn.blender.org/svnroot/bf-exte ... _select.py
Face access goes via .polygons
See my addon, it counts tris, quads and ngons separately:
https://svn.blender.org/svnroot/bf-exte ... _select.py
- Tue Oct 01, 2013 12:05 am
- Forum: Python
- Topic: Check if a poly is a face
- Replies: 29
- Views: 19564
- Sun Sep 29, 2013 6:07 pm
- Forum: Interface & Tools
- Topic: Metric (or measuring) system failed.
- Replies: 5
- Views: 2764
- Sun Sep 29, 2013 2:42 am
- Forum: Interface & Tools
- Topic: Metric (or measuring) system failed.
- Replies: 5
- Views: 2764
- Fri Sep 27, 2013 11:34 pm
- Forum: Animation
- Topic: Subtract faces
- Replies: 1
- Views: 8399
- Fri Sep 27, 2013 2:12 am
- Forum: Python
- Topic: save jpg image as tiff in addon not working
- Replies: 4
- Views: 8681
does that actually work? I tried it, and it created the file with desired extension, but the content wasn't in the right format. save_render() doesn't render btw., it means it uses some of the scene render settings to store the output! If you set the render settings to TIFF, you can save an image as...
- Thu Sep 26, 2013 4:46 pm
- Forum: Python
- Topic: save jpg image as tiff in addon not working
- Replies: 4
- Views: 8681
hey travnick, sorry for the late reply, but i couldn't remember where i saw your post. I tested this working: import bpy img = bpy.data.images[0] filepath = r"C:\tmp\_exported_image.tif" def find_color_mode(image): if not isinstance(image, bpy.types.Image): raise(TypeError) else: if image.depth <= 8...
- Tue Sep 24, 2013 1:15 pm
- Forum: Interface & Tools
- Topic: File type to use for games?
- Replies: 1
- Views: 793
- Sun Sep 22, 2013 7:36 pm
- Forum: Interface & Tools
- Topic: Adding vertices in model
- Replies: 2
- Views: 978
- Sat Sep 21, 2013 10:03 pm
- Forum: Python
- Topic: Select_circle function in Edit Mode via Python
- Replies: 3
- Views: 8476
- Tue Sep 17, 2013 12:15 am
- Forum: Interface & Tools
- Topic: User unterface and usability
- Replies: 18
- Views: 5651
- Tue Sep 17, 2013 12:09 am
- Forum: Interface & Tools
- Topic: User unterface and usability
- Replies: 18
- Views: 5651
You can actually bind hotkeys for toggle manipulators, and for switching which are shown. It's not possbile directly via rightclick however. See http://cgcookie.com/blender/2010/05/17/custom-hot-keys/ http://www.blenderartist.org/forum/showthread.php?291296-Manipulator-Hotkey In user prefs > input, ...