Commit Graph

2755 Commits

Author SHA1 Message Date
dd72ffe3ff py/rna api:
- bpy.context wasnt being created from the python bpy.types.Context type defined in bpy_types.py (bpy.context.copy() failed for eg.)
- bpy.context.copy() was returning C defined methods like FloatProperty(), which are not useful in this case, removed.
2010-06-09 19:31:10 +00:00
4da179749e - [#22492] [29159] commit breaks importing of script file that has a reload to self in it
broke when including the blend path in the modules filename.       

- new function BLI_path_basename(), matches pythons os.path.basename().
  replace a number of cases where BLI_split_dirfile was being used to get the filename only.
2010-06-05 21:19:59 +00:00
556b57febf get rid of some warnings,
removed NG_LoopBackNetworkDeviceInterface::GetNetworkVersion(), wasnt used anywhere.
2010-06-05 15:31:55 +00:00
677a0434a4 == python api docs ==
- small change to indicate the source file we use the proper :file: directive and we link to proper file in svn
  check for example http://www.blender.org/documentation/250PythonDoc/bpy.ops.cloth.html#bpy.ops.cloth.preset_add
  after you rebuild the docs
2010-06-04 13:47:56 +00:00
e58bb562d2 == python api docs ==
*  source/blender/python/doc/sphinx_doc_gen.py
	
	changed syntax for declating attributes type to use :type: instead of *type* os it

* source/gameengine/Ketsji/KX_PythonInit.cpp

	While documenting I've found that we have two naming conventions for constraints in BGE python api,
	example: KX_CONSTRAINTACT_DIRPZ and KX_ACT_CONSTRAINT_FHPX: the right convention is KX_CONSTRAINTACT_xxx
	After talking with dalai and cambpell we agreed that this kind of change is better suited for NExyon GSoC
	so I marked as TODO
	
	Also, found 2 duplicate rows, fixed after askin nexyon

* source/gameengine/PyDoc/bge.logic.rst

	there were 2 blocks for constraints, I've put them together in docs and fixed some other lines
	
* source/gameengine/PyDoc/bge.types.rst

	first cleanup: mainly started using ":type:", it was mixed usage of *type* and **type**
	started cleaning some bullet list in a way that varibles link to the constant in appropriate page
	I'll continue later
2010-06-02 21:28:17 +00:00
cb26b4d7b9 error in last commit 2010-06-02 19:37:53 +00:00
9cbbc9d3af rename some rna properties filename --> filepath
* filename == "foo.ext"
 * filepath == "/path/to/and/including/foo.ext"

this was alredy followed in some places not not everywhere.
2010-06-02 17:58:28 +00:00
b1a96f76dc include the blendfile name when executing python scripts, so when using libraries you can tell where the script is stored which raises an error. 2010-06-02 14:40:58 +00:00
1658a28a58 - Python console argument '--python-console', option so you can start blender and drop into a python console, (useful for debugging some problems on a renderfarm over ssh)
- Also made it so sys.stdin isnt overwritten anymore, instead the interactive consoel overwrites while it executes and restores after.

- removed hope folder from sphinx patch path
2010-05-30 14:05:58 +00:00
941c10a296 optional fallback argument for vector angle function.
vec1.angle(vec2, fallback)

in my experiences most uses of this function required a try/except so better to allow a fallback value.
2010-05-30 01:42:04 +00:00
286f167845 == Sphinx Doc Gen ==
Workaround to address attribute description issue. 
In resulting .rst file attribute's descriptions appeared
not indented which sphinx considered as anoter blocks.
2010-05-30 00:24:32 +00:00
Dalai Felinto
c6bec43330 reverting previous commit from Mitchell. His commit went to the trunk instead of the branch :)
svn merge -r 29067:29066 https://svn.blender.org/svnroot/bf-blender/trunk/blender
2010-05-29 21:31:57 +00:00
9d3157eed0 Reversing the last merge because I botched it. 2010-05-29 21:22:24 +00:00
25e740f29d bpy.app.background - so a python script can check if blender is running without a UI 2010-05-18 15:57:51 +00:00
88743740b8 dont use a thread for baking in background mode, its not really any advantage since it starts a single thread that runs a loop. 2010-05-18 14:38:25 +00:00
45444ceee3 include game engine docs in sphinx doc generation:
bge.events, logic, render & types (others still need work)

Updated http://www.blender.org/documentation/250PythonDoc
2010-05-17 20:38:54 +00:00
dbb914becc blf docstring fix from Moguri 2010-05-17 07:33:37 +00:00
c2ffcb8497 no functional changes
- add PySequenceMethods members (all NULL)
- spaces -> tabs
- cmake syntax warning from recent ghost commit
2010-05-16 10:09:07 +00:00
c598d90899 Sphinx theme from Alex Sytnik (smerch) for API Docs
You wouldnt know its not blender.org :D

http://www.blender.org/documentation/250PythonDoc/mathutils.html

from revision 39 of https://svn.blender.org/svnroot/blend-doc/trunk/python/doc
2010-05-14 10:21:57 +00:00
e8408697de bpy.utils.blend_paths(absolute=False) (was Blender.GetPaths in 2.4x) 2010-05-11 07:08:32 +00:00
a2166e5bc1 make python keyframe insert and delete functions use keyword arguments 2010-05-10 18:47:03 +00:00
6d8cb93f71 building docs failed when the output directory didnt alredy exist. 2010-05-09 17:18:57 +00:00
d92751fb33 missing arg from docstring 2010-05-09 00:37:12 +00:00
d73af20b7a py/rna: defining new properties now replaces the old onces and raises an error if they collide with dynamic props. 2010-05-09 00:06:35 +00:00
5548e86795 function to remove property
eg:
 bpy.types.Scene.IntProperty(attr="myprop") # adds
 bpy.types.Scene.RemoveProperty(attr="myprop") # removes
2010-05-08 23:34:54 +00:00
9084df418d Warning cleanup
While I was looking in outliner.c, made some changes to let extra passes display
there such as environment (commented out before due to a previous limitation).

Also changed outliner object visbility/selectability/renderability toggles to use 
RNA buttons so you can insert keyframes with RMB menu etc.
2010-05-07 03:44:34 +00:00
b63d069055 [#22177] Adding BLF to the BGE and exposing BLF_load as blf.load
from Mitchell Stokes (moguri) 

also updated blf docs
2010-05-05 06:38:49 +00:00
02b8995bae clear warning 2010-05-04 07:26:57 +00:00
914d5e5f62 sphinx doc generation
- include default values as well as min/max.
- partial rebuilds, so we dont have to build all docs each time, only the changed files.
2010-05-03 15:52:15 +00:00
124c55fcc3 remove redundant argument from mathutils callbacks 2010-04-27 19:21:36 +00:00
f9fbfd9297 oversight in recent mathutils update. obj.matrix = obj.matrix would call its own updage callbacks until it crashed. 2010-04-27 18:55:25 +00:00
e40531991d fixes for euler order setting when the rotation mode is not euler. 2010-04-27 07:50:31 +00:00
5e2a9770f5 bugfix [#22163] Add->mesh->torus is broken
recent commit broke this, missed changing double to float.
2010-04-26 21:25:14 +00:00
6bb55fd93e py/rna, euler objects order is now wrapped correctly...
eg:
 eul = bpy.context.object.rotation_euler
 eul.order = 'XZY' # will update the objects setting.
2010-04-26 21:04:42 +00:00
4fc4fb9bfb rna/python mathutils module
- return euler rotation values from rna now have correct rotation order.
- mathutils.Euler stored rotation order off by 1. (didnt work at all)
- Euler/Quat/Color sliceing working again.
2010-04-25 23:33:09 +00:00
64359c9abc hash function for property-rna. eg. hash(bpy.context.object.modifiers) 2010-04-25 21:13:42 +00:00
61eb217294 [#22151] Modifier UI crash
own error when editing context return values. r28401
2010-04-25 19:56:43 +00:00
873d4a3f05 py api
- mathutils.Color.hsv attribute. eg. material.diffuse_color.hsv = 0.2, 0.8, 0.4
- Vector/Euler/Quaternion/Color now only take a single seq arg.
- internal function for parsing arrays. (cleanup messy internal list/vector/tuple/seq parsing)
- didnt update rigify yet.
2010-04-25 19:27:59 +00:00
708667c6f6 minor mathutils update
- docstring for Euler.rotate
- rotate_eul, use upper case in Py and C. 
- use less verbose repr method.
2010-04-25 03:34:16 +00:00
4bd3163ea6 py api: fix for context returning None for an empty list such as 'context.selected_objects', now returns [] 2010-04-24 19:26:05 +00:00
ace1c998c4 warning cleanup, also made voxel.c and volumetric.c use BM_INLINE define rather then having their own ifdefs in each file. 2010-04-24 10:08:07 +00:00
a56b72fd82 BugFix:
[#20854] PROPERTIES STAMP: Rendering stamp flickers in output renders

Blenfont was not thread safe, that is why one thread can change
the font properties (size, dpi, color, etc) at the same time
that the stamp draw on the image, and then the problem.

To make blenfont thread safe I have to change two important things:

1) Every BLF_* function take one argument, the font id.
2) We have two new function to make font "thread safe":
	BLF_load_unique
	BLF_load_mem_unique

This two function are for case like stamp, that need and own font
that don't share the glyph cache, so can draw without problem
in a different thread.

Why the BLF_*_unique function ?

Because blenfont keep only one copy of a font and keep a list of
"glyph cache". Every glyph cache have size and dpi, so if two
different thread access the same font at the same time, they can
change value and finish with something like the stamp problem.

Why don't remove the glyph cache ?

Because if we do that, we finish with a font object for every size
and dpi, and the stamp is really a special case that happen in
the rendering process, so I really thing is better keep the
glyph cache and make this two new function to handle this
special case.

(When I say "font object" I mean have the same freetype font multiple
times just to have differents size and dpi)

As Matt point we still can have one case that two thread access
the BLF_*_unique function at the same time, but I am looking to
fix this with some class of thread lock.

For now I test and work fine, so if some one found problem, please
let me know.

Campbell I have to change the python api (python/generic/blf_api.c)
to the new syntax, so maybe you can take a look at this.
2010-04-22 10:56:45 +00:00
4d39e04102 change mathutils 'repr' functions to closer match input 2010-04-19 22:02:53 +00:00
454470e0bd setting array slices wasnt running rna update
eg:
 scene.visible_layers[:] = obj.layers
2010-04-19 13:37:44 +00:00
4fde9823fd possible fix for [#22057] Autoname L/R in bones names center bones as .R
Bone would get a '.' added even when there was no extension.
(center limit would still be useful)

- name flipping function used sizeof() incorrectly.
- ED_lorem should be extern.
2010-04-18 14:47:45 +00:00
8f1500da00 remove config.h references, was added for automake build system rev around 124-126 but isnt used by any build systems now. 2010-04-18 10:28:37 +00:00
2241299c20 -->Fix for compile on MSVC
Expansion of BASE_MATH_MEMBERS macro meant that
two consecutive semicolons were in the source in
most header files that used it.
2010-04-16 16:19:36 +00:00
182587fce1 [#22045] Memory leak in Mathutils.Matrix
own fault when adding mathutils callbacks, generic destructor didnt free the matrix accessor array, made the array apart of the matrix struct since its not worth malloc'ing to save at most 16bytes.
2010-04-16 08:17:13 +00:00
0b99fd9164 SVN maintenance. 2010-04-11 16:41:43 +00:00
67cfc427ee PyAPI
- added new mathutils.Color() type, use with rna so we can do for eg:
 material.diffuse_color.r = 1.0
 # also has hsv access
 material.diffuse_color.s = 0.6

 - made Mathutils and Geometry module names lowercase.
2010-04-11 14:22:27 +00:00