Exppython:
- Object: implemented getBoundBox and makeDisplayList methods - NMesh and Object: small internal changes for nicer behavior - Draw: added function PupMenu - Docs: updated for the additions above Auto build tiny fix: added the imbuf include dir to source/creator/Makefile.am
This commit is contained in:
		| @@ -409,3 +409,34 @@ class Object: | ||||
|     @type object: Blender Object | ||||
|     @param object: A Blender Object of the same type. | ||||
|     """ | ||||
|  | ||||
|   def getBoundBox(): | ||||
|     """ | ||||
|     Returns the bounding box of this object.  This works for meshes (out of | ||||
|     edit mode) and curves. | ||||
|     @rtype: list of 8 (x,y,z) float coordinate vectors | ||||
|     @return: The coordinates of the 8 corners of the bounding box. | ||||
|     """ | ||||
|  | ||||
|   def makeDisplayList(): | ||||
|     """ | ||||
|     Updates this object's display list.  Blender uses display lists to store | ||||
|     already transformed data (like a mesh with its vertices already modified | ||||
|     by coordinate transformations and armature deformation).  If the object | ||||
|     isn't modified, there's no need to recalculate this data.  This method is | ||||
|     here for the *few cases* where a script may need it, like when toggling | ||||
|     the "SubSurf" mode for a mesh: | ||||
|     Example:: | ||||
|     object = Blender.Object.Get("Sphere") | ||||
|     nmesh = object.getData() | ||||
|     nmesh.setMode("SubSurf") | ||||
|     nmesh.update() # don't forget to update! | ||||
|     object.makeDisplayList() | ||||
|     Blender.Window.RedrawAll() # and don't forget to redraw | ||||
|  | ||||
|     If you try this example without the line to update the display list, the | ||||
|     object will disappear from the screen until you press "SubSurf". | ||||
|     @warn: If after running your script objects disappear from the screen or | ||||
|        are not displayed correctly, try this method function.  But if the script | ||||
|        works properly without it, there's no reason to use it. | ||||
|     """ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user