![]() I even tried (:P) putting a “try” and “except” for the “exec printvar” but while that stops it having an error message, it only prints out a 0. It raises an exception at the same place, but it doesn’t print anything. I tried putting this code into blender, and it hates me. It just says that line0 cannot be found and raises an exception after printing out everything. It works almost perfectly in python (Fedora 11, python 2.6.2). The code I have for reading the file is below. That obviously would have to be heavily changed, but it does show that it is possible. If editmode: Window.EditMode(1) # optional, just being nice Me. = 255 # make each vertex a different color Me.vertexColors = 1 # enable vertex colors Me.faces.extend(faces) # add faces to the mesh (also adds edges) Me.verts.extend(coords) # add vertices to mesh # define vertices and faces for a pyramidĬoords=,, ,, ]įaces=, ,, , ] If editmode: Window.EditMode(0) # leave edit mode before getting the mesh Here is an example of a proof of concept piece of code that I found on the blender 2.48 API that draws vertices: from Blender import *Įditmode = Window.EditMode() # are we in edit mode? If so. B-29 ROOT AIRFOILĪs far as I know, the coordinates in the left column are the “x” coords and the right column is the “y” coord. I’ve started working on a python script that reads a list of coordinates from a file formatted like the. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |