Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-08-10remove python2.x supportCampbell Barton
2009-08-09- fix error in last commitCampbell Barton
- added better error feedback when registering operators fails. - added some python benchmark timers (prints on exit), times number of times py scripts run, average time and total % of time running py scripts.
2009-08-09- report errors on rna name collisions (does not check parent type yet)Campbell Barton
- minor cleanup for Py/C api functions that define rna properties from python.
2009-08-07bpy_context_set and bpy_context_clear to replace a number of functions (some ↵Campbell Barton
were not always called causing bugs). fix for a leak when trying to run a text with a syntax error too.
2009-07-31fix for warnings and implicit declarationsCampbell Barton
also fixed smoke comparing a float's mem-location rather then its value.
2009-07-30Operator Copy/PasteCampbell Barton
you can copy operator strings from buttons or the reporting interface and run them in the console. - Ctrl+C over an operator button copies its python string to the clipboard. - Paste in the console (1 line only for now). - operators run from python no longer require all arguments.
2009-07-28- lamp UI was missing y samples for rectangle area lampsCampbell Barton
- returned ID types from RNA funcs didnt get their ID's assigned which crashed in some cases (still not working for members of ID types). - ob.create_remder_mesh() wasnt assigning any materials.
2009-07-26indentation error with some operators (strip the descriptions)Campbell Barton
if 0'd the exec() workaround for running python scripts incase windows devs want to test. theeth said the problem is when you compile a debug blender against a non debug python (or the ther way I assume), you can get a FILE struct mismatch. A quick way to test this on windows is to run this from the command line. blender -P somescript.py Somescript.py can be anything
2009-07-26misc py/rna changesCampbell Barton
- running a script from a file now uses the PyRun_File(FILE *, ...) rather then PyRun_String("exec(open(r'/somepath.py').read())"...), aparently FILE struct on windows could not ensured to be the same between blender and python, since we use our own python on windows now it should be ok. - generating docs works again (operator update for py style syntax broke them) - python operator doc strings was being overwritten - added rna property attribute "default" to get the default value of a property, not working on arrays currently because variable length arrays are not supported.
2009-07-23pyrna,Campbell Barton
calling rna functions with the wrong argument type would raise an error like.. expected a string type Added an error prefix so now the message is.. TypeError: UILayout.item_enumO(): error with argument 3, "value" - expected a string type
2009-07-23Change to avoid trigraph confusions.Guillermo S. Romero
2009-07-22less verbose subtyping Py/C API code, use PyObject_CallFunction which ↵Campbell Barton
supports packing the function args into a string.
2009-07-22removing all functions from bpy.ui module, keeping the module incase its ↵Campbell Barton
useful later. removed a check in exotic.c that should be added back later.
2009-07-22remove scriptlinks,Campbell Barton
they were not working and we have plans for better script integration in 2.5
2009-07-22RNABrecht Van Lommel
* ID blocks can now get RNA properties defined from python, e.g.: bpy.types.Scene.BoolProperty(..) * RNA structs/functions/properties can now get pointers duplicated (mostly strings), since we can't point to some static string then. * Added ExtensionRNA struct to add into *Type structs for subclassing, is a bit more compact than defining the 4 variables each time. Only disadvantage is it requires including RNA in more places.
2009-07-212.5: python module name for import had trailing "."Brecht Van Lommel
2009-07-21BLI_setenv, use instead of copying ifdefs about for setting env vars.Campbell Barton
set PYTHONHOME as well as PYTHONPATH, quiets some warnings.
2009-07-21mistake in own recent change, errors with startup scripts didnt raise errorsCampbell Barton
2009-07-20Added error prints if the text's main is not set.Campbell Barton
2009-07-20cmake option to disable SDL,Campbell Barton
bpy_interface.c - change order of checking scripts to avoid calling stat on .py files.
2009-07-19d_type isnt a member of dirent on win32.Campbell Barton
2009-07-19- Support for importing python packages. (directories of python scripts ↵Campbell Barton
containing an __init__.py) - BLI_add_slash returns the new string length. - BLI_where_am_i() would often have /./ in the path (not incorrect but annoying, got into python exceptions) - release/ui/space_image.py, py error referencing invalid keyword args.
2009-07-19Sculpt+Paint/2.5:Nicholas Bishop
* Moved brush NKEY panel from C to Python. Could use some UI review :) * Added a NULL check in bpy_internal_import.c, was crashing here on Python errors * Added RNA for vpaint brush and for weight paint * Added context for vpaint/wpaint similar to edit_object and sculpt_object
2009-07-19Python operatorsCampbell Barton
- simplified C operator API bpy.__ops__ since its wrapped by python now. - needs the class to have an __idname__ rather then __name__ (like menus, headers) - convert python names "console.exec" into blender names "CONSOLE_OT_exec" when registering (store the blender name as class.__idname_bl__, users scripters wont notice) - bpy.props.props ???, removed
2009-07-19py rna arrays were assumed sizeof(char)*len, should be sizeof(int)*len, was ↵Campbell Barton
causing end of array corruption errors when running operators that took bool array options - transform.
2009-07-18fixes for errors on startup and compiler errors and draw speedup.Campbell Barton
* Drawing the console text now skips all lines outside the view bounds. * Added dummy C operators for console.exec and console.autocomplete so blender wont complain at startup, its not really a problem but people testing reported it a few times. Eventually we should have some way python operators are initialized before the spaces operators are checked. * reordered the imports so the "ui" dir is imported before "io", for now this means bpy.ops is defined before exporters and importers need to use it, was causing a python error on startup. * fixed all compiler warnings for the console (gcc4.4) * stopped operators were printing out the return flag. * removed references to ACT_OT_test, TEXT_OT_console_exec and TEXT_OT_console_autocomplete
2009-07-17Source code with executable property, manual fix. *sigh*Guillermo S. Romero
2009-07-17python access to operators now hides the _OT_ syntax, eg. SOME_OT_operator ↵Campbell Barton
-> some.operator this works for the calling operators from python and using the RNA api. bpy.ops.CONSOLE_exec() is now bpy.ops.console.exec() eg. split.itemO("PARTICLE_OT_editable_set", text="Free Edit") becomes... split.itemO("particle.editable_set", text="Free Edit") For now any operator thats called checks if its missing _OT_ and assumes its python syntax and converts it before doing the lookup. bpy.ops is a python class in release/ui/bpy_ops.py which does the fake submodules and conversion, the C operator api is at bpy.__ops__ personally Id still rather rename C id-names not to contain the _OT_ text which would avoid the conversion, its called a lot since the UI has to convert the operators.
2009-07-17bpy rnaCampbell Barton
Calling rna functions with invalid keywords, too many keywords and too many args would fail silently - now raise an error with invalid keywords and a list of valid ones, raise an error when too many args are given. - calling rna functions would alloc a ParameterList each time, changed to use a stack variable (2 pointers and an int). - store the number of parameters ParameterList - python exception types were wrong in many cases, (using attribute error rather then type error) - fixes to small errors in python UI scripts.
2009-07-16SConsNathan Letwory
* ensure all SConscripts are ready for win64-vc (where necessary). * ensure we have proper _DEBUG flag for Python when we're doing a debug build. * some cleaning up of linking etc. * ensure /EHsc is there for game engine modules.
2009-07-16- use outliner colors (with subtle stripes) for report so you can see ↵Campbell Barton
divisions between operators with wrapping. - added class option for PyOperators __register__ so you can set if py operators are logged in the console. - PyOperators was refcounting in a more readable but incorrect way. in some cases would be possible to crash so better not drop the reference before using the value. - console zoom operator was registering which meant zooming in to see some text would push it away :)
2009-07-16Console Space TypeCampbell Barton
* interactive console python console. * display reports and filter types. defaults to operator display so you can see the python commands for tools as you use them, eventually it should be possible to select commands and make macto/tools from them. Example use of autocomp. b<tab>, bpy.<tab>, bpy.<tab>, bpy.data.<tab> etc. basic instructions are printed when opening the console. Details... * Console exec and autocomp are done with operators written in python. * added CTX_wm_reports() to get the global report list. * The window manager had a report ListBase but reports have their own struct, switched to allocate and assign when initializing the WM since the type is not available in DNA. * changed report types flags for easier display filtering. * added report type RPT_OPERATOR * logging operators also adds a python-syntax report into CTX_wm_reports() so they can be displayed in the console as well as calling a notifier for console to redraw. * RnaAPI context.area.tag_redraw() to redraw the current area from a python operator. Todo... * better interactions with the console, scrolling, copy/paste. * the text displayed doesnt load back. * colors need to be themed. * scroll limit needs to be a user pref. * only tested with cmake and scons.
2009-07-13RNA & PyAPICampbell Barton
* support for dynamic enums to be inspected enumProp.items() from python. * fix, enums check for a separator was flipped, meant no enums were in docs. * dynamic enum functions now check for a NULL context and return all possible options for the "items" attribute used for docs. * added an arg for rna arrays to free the array there looping over (needed to free dynamically allocated enum items) * python api checks for NULL items since this can happen in some cases. * python api, When getting an enum ID from an int in an array - If it failed it would get the first enum identifier and return that. Brecht? dont understand, making it return an empty string in these cases.
2009-07-13mathutils types didnt work properly in python2x. vec*matrix failed for eg.Campbell Barton
Now with KX_Python.h line 35 commented YoFrankie 1.1 should run unmodified in blender2.5
2009-07-13calling operators from python was raising an error without returning an ↵Campbell Barton
error value. brecht, switched the order back to fix this, added an argument for WM_operatortype_find() to fail without printing an error.
2009-07-11PyApiCampbell Barton
* refcount error if StringIO or io modules could not be imported * importing python modules like math didnt work because the script registration overwrote the script path. now just prepend the path.
2009-07-10RNABrecht Van Lommel
* Enums can now be dynamically created in the _itemf callback, using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking for enum items now need to potentially free the items. * This callback now also gets context, this was added specifically for operators. This doesn't fit design well at all, needed to do some ugly hacks, but can't find a good solution at the moment. * All enums must have a default list of items too, even with an _itemf callback, for docs and fallback in case there is no context. * Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation. * Also changes some operator properties that were enums to booleas (unselected, deselect), to make them consistent with other ops.
2009-07-10Use python subtypes so bpy.types.Mesh is a subtype of bpy.types.IDCampbell Barton
This means checks like this work. isinstance(bpy.data.meshes[0], bpy.types.ID) bpy.types.Mesh.__base__ == bpy.types.ID
2009-07-10PyRNA api wasnt using python subclasses most of the time.Campbell Barton
Now this will return True isinstance(bpy.data.meshes[0], bpy.types.Mesh) Use the StructRNA identifier for the new classes name properties because classes were being named by the data names rather then the type names. Set the __module__ for the new type which makes printing the class not use the script name where the type is first initialized. eg: bpy.types.Mesh instead of buttons_object.Mesh This still isnt quite right since opertators and panels all get their own type, when they should all use an operator type.
2009-07-092.5Ton Roosendaal
Monthly cleaning round to make it compile warning free. Mostly it was const stuff (strings, Context), but also a couple useful fixes, like wrong use of temp pointers. Only Mathutils callback struct I left alone... design issue.
2009-07-09Dictionary style get() to property rna.Campbell Barton
eg.. mesh = bpy.data.meshes.get("SomeMesh", fallback) Set length limits for python string formatting.
2009-07-09removed check for pyc when scanning the directory of python files.Campbell Barton
Brecht, double checked and pyc or pyo files arent used because of the (file_extension[3] == '\0') test.
2009-07-092.5: Mesh and Various FixesBrecht Van Lommel
* 3D view Mesh menu works again, but incomplete. * Add Properties and Toolbar to 3D View menu. * Added "specials" menus back, vertex/edge/face and general. * Various fixes in existing mesh operators, some were not working. * Add MESH_OT_merge. * Merge all subdivide ops into MESH_OT_subdivide, subdivide code changes to make smooth + multi give good results. * Rename all select inverse ops to *_OT_select_inverse. * Fix "search for unknown operator" prints at startup, and some warnings in py code. * Don't run .pyc files on startup. * Remove unused image window header C code.
2009-07-082.5Ton Roosendaal
Copied some Python compat stuff to get py 2.3 running... just googled for it on python.org mailing list.
2009-07-08* workaround for PySys_SetArgv() in python3 needing wchar_tCampbell Barton
* PyRNA - id_struct.keyframe_insert("path", index, frame)
2009-07-032.5:Brecht Van Lommel
* Fix crash in python with enum properties, and don't throw error if no matching identifier is found. This shouldn't happen, but it should break a python script either, which is not at fault. * Fix a wrong variable initialization in fluidsim.
2009-07-032.5Ton Roosendaal
Windows #ifdef code missed semicolon.
2009-07-03fix for own missing var in recent commit.Campbell Barton
2009-07-03set the PYTHONPATH to BLI_gethome_folder("python") if it exists.Campbell Barton
This lets us distribute blender with our own python module directory (next to ui and io), and avoids the need for a shell script to start blender.
2009-07-02out own Py_GetPath() function to replace pythons, so we can bundle python ↵Campbell Barton
modules with blender, #if 0'd for now but having it is useful for testing. This works by copying /usr/lib/python3.1 to a dir called "python", next to blenders "ui" and "io" dirs.