Commit Graph

17 Commits

Author SHA1 Message Date
Campbell Barton
081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
Campbell Barton
fe5b216030 access spot size in radians from python. 2010-02-04 19:24:20 +00:00
Campbell Barton
0a0f4c9d81 Mathutils refactor & include in sphinx generated docs, (TODO, include getset'ers in docs)
- Mathutils.MidpointVecs --> vector.lerp(other, fac)
 - Mathutils.AngleBetweenVecs --> vector.angle(other)
 - Mathutils.ProjectVecs --> vector.project(other)
 - Mathutils.DifferenceQuats --> quat.difference(other)
 - Mathutils.Slerp --> quat.slerp(other, fac)
 - Mathutils.Rand: removed, use pythons random module
 - Mathutils.RotationMatrix(angle, size, axis_flag, axis) --> Mathutils.RotationMatrix(angle, size, axis); merge axis & axis_flag args
 - Matrix.scalePart --> Matrix.scale_part
 - Matrix.translationPart --> Matrix.translation_part
 - Matrix.rotationPart --> Matrix.rotation_part
 - toMatrix --> to_matrix
 - toEuler --> to_euler
 - toQuat --> to_quat
 - Vector.toTrackQuat --> Vector.to_track_quat
2010-01-25 09:44:04 +00:00
Campbell Barton
08c9ecb3b0 RNA/Py API
change how data is added. eg.
 bpy.data.add_mesh(name) --> bpy.data.meshes.new(name)
 bpy.data.remove_lamp(lamp) --> bpy.data.lamps.remove(lamp)


image and texture stil use add_* funcs
2010-01-09 23:44:01 +00:00
Campbell Barton
9f965ba62b pep8 warnings, remove unused imports 2009-12-13 22:48:11 +00:00
Campbell Barton
3449d3f9b3 use python3 syntax for defining a set. 2009-12-13 16:20:18 +00:00
Campbell Barton
7fc4ab2aab add pep8 headers so these scripts spit out errors when running pep8.
made some changes but mostly these scripts will give pep8 warnings.
2009-12-13 14:38:30 +00:00
Campbell Barton
58808a7bef remove inline cleanName function, use bpy.utils.clean_name 2009-12-13 14:04:36 +00:00
Campbell Barton
095994796d tabs 2 spaces 2009-12-13 14:00:39 +00:00
Campbell Barton
062cf438ce remove nasty hack which made StructRNA class instaces have no __dict__,
use __slots__, it seems all the parent classes need to have slots as well for this to work.
all python defined srna classes are checked for this too
2009-12-05 23:41:45 +00:00
Campbell Barton
caab05ec8c rna UI api rename...
note: this aims to follow pep8 however I chose to use 'prop/props' rather then 'property/properties' because it would make function names too long.

itemR() --> prop()
items_enumR() --> props_enum()
item_menu_enumR() --> prop_menu_enum()
item_pointerR() --> prop_pointer()
itemO() --> operator()
item_enumO() --> operator_enum()
items_enumO() --> operator_enums()
item_menu_enumO() --> operator_menu_enum()
item_booleanO() --> operator_boolean()
item_intO() --> operator_int()
item_floatO() --> operator_float()
item_stringO() --> operator_string()
itemL() --> label()
itemM() --> menu()
itemS() --> separator()

batch script used http://www.pasteall.org/9345
2009-11-23 00:27:30 +00:00
Campbell Barton
318e9aa5d1 - rna attribute setting problem, class instances could not set their own attributes because they are blocked by our own internal setattr.
this could be supported again easily however it leads typo's & api changes not showing any errors.

  This broke povray export.
  Solution for now is to allow setting private properties starting with '_'

  eg, 
    ob = bpy.context.object
    
    ob._foo = [1,2,3] # this is a python list, it will stay only as long as this PyObject is active
    ob.foo = 1 # raises an error!, only for rna properties
    ob["foo"] = 1 # converts to an ID property and is saved

    using the underscore like this should really be used for classes internally.

- povray failed on armatures

- menu key wasn't using WM_keymap_add_menu
2009-11-18 08:40:18 +00:00
Martin Poirier
9ea292290b Correct GPL license header for all python scripts 2009-11-01 15:21:20 +00:00
Campbell Barton
944a8d33fe renamed buttons ui files to properties to match UI name change, needed to update some imports too 2009-10-31 19:57:59 +00:00
Campbell Barton
ea265fc697 change blender python interface for classes not to ise __idname__ rather bl_idname since __somename__ is for pythons internal use.
replacements...
"__idname__" -> "bl_idname"
"__props__" -> "bl_props"
"__label__" -> "bl_label"
"__register__" -> "bl_register"
"__undo__" -> "bl_undo"
"__space_type__" -> "bl_space_type"
"__default_closed__" -> "bl_default_closed"
"__region_type__" -> "bl_region_type"
"__context__" -> "bl_context"
"__show_header__" -> "bl_show_header"
"__URL__" -> "_url"
2009-10-31 13:31:23 +00:00
Thomas Dinges
c27a94849c * Fixes for Render Tab separation.
* All Edges is now in the object mode "Display" Tab, as the option doesn't affect Edit Mode. 
Missing Redraw here...
2009-10-14 14:45:58 +00:00
Campbell Barton
2d797f35d8 - removed 2.4x release/scripts
- moved release/io and release/ui into release/scripts/io, ui
- updated scons, cmake, make

When porting 2.4x scripts back, use a command like this so as not to loose the commit history...
 
 svn cp https://svn.blender.org/svnroot/bf-blender/branches/blender2.4/release/scripts/raw_import.py release/scripts/io/import_raw.py
2009-09-28 03:19:52 +00:00