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-182.5: RNA, defining enums, pointers and collections properties is nowBrecht Van Lommel
possible from python, but it's still work in progress. Pointers and collections are restricted to types derived from IDPropertyGroup (same as for operators), because RNA knows how to allocate/deallocate those. Collections have .add() and .remove(number) functions that can be used. The remove function should be fixed to take an other argument than a number. With the IDPropertyGroup restriction, pointers are more like nested structs. They don't have add(), remove() yet, not sure where to put them. Currently the pointer / nested struct is automatically allocated in the get() function, this needs to be fixed, rule is that RNA get() will not change any data for thread safety. Also, it is only possible to add properties to structs after they have been registered, which needs to be improved as well. Example code: http://www.pasteall.org/7201/python
2009-08-17rna reference doc generationCampbell Barton
- rna classes, only include props and functions that are not inherited (epydoc then gives inheritance info) - include function arguments and return values for in cross reference
2009-08-16rna function return values in generated docs,Campbell Barton
added prop.use_return so you can tell if a prop is a return value.
2009-08-16own mistake, __rna__ wasnt causing circular references. python can handle ↵Campbell Barton
this. changing broke python operators like the pyConsole.
2009-08-16- typos in boxpack comments (incorrectly had comment that it was from NAN)Campbell Barton
- removed unused defines STREQ, STREQ2, STREQ3 and MINSIZE
2009-08-16missing args for rna funciton. comment on rna leak with type registering ↵Campbell Barton
that I haven't been able to fix yet.
2009-08-152.5: warning fixesBrecht Van Lommel
Directories intern/ and source/blender/ now compile warning free again here with scons/gcc.
2009-08-15Compile fix.Thomas Dinges
Variable was in wrong place, caused errors in msvc. Fix by Lguillaume in IRC.
2009-08-15changes to help refcounts in rna be more predictable (still leaks when ↵Campbell Barton
reloading on - F8)
2009-08-15RNA Types were storing an instance of themself for class introspection and ↵Campbell Barton
docs but makes freeing the type complicated. now __rna__ is a PyCObject rather then a BPy_StructRNA instance, to get the rna from python use __get_rna() now.
2009-08-14cmake changesCampbell Barton
- set python to 3.1 on linux (dont use FindPackage for now) - remove duplicate settings (disable cache for copied settings, was quite confusing) - added an option WITH_INSTALL, when disabled scripts and language files wont be copied to the target dir (better for quick builds) - remove .svn (was still CVS), and pyc/pyc files after copy - copy the 'io' as well as 'ui'
2009-08-14some fixes for netbsd with cmakeCampbell Barton
- CMake, use FIND_PACKAGE(Freetype) for unix/linux - Only link with libdl.so on linux - use statvfs rather then statfs for netbsd (size of statfs wasnt available) - add x11 include path with ghost, glu.
2009-08-14- registering new python classes runs the free functions on existing classes.Campbell Barton
- print an error if RNA Structs are freed with a python pointer set to help with debugging leaks. - fix for unlikely eternal loop in unit conversion.
2009-08-11- missing a decref for new pytypesCampbell Barton
- remove needless strlen
2009-08-11user interface units, off by default.Campbell Barton
- currently only distances work. - user preferences, edit section to set the units and scale. - option to display pairs (nicer for imperial display?) - support for evaluating multiple comma separated values eg: 2',11" ..or.. 5ft, 4mil - comma separated expressions/values accumulate 1+1,2**3,4cm/3 - attempted fast conversion from a value to a string so button drawing isn't too slow. * imperial long/short * - mile, mi - yard, yd - foot, ' - inch, " - thou, mil * metric long/short * kilometer, km meter, m centimeter, cm millimeter, mm micrometer, um nanometer, nm picometer, pm
2009-08-11fixed mistake made when changing rna prop definition functions, made povray ↵Campbell Barton
custom props fail.
2009-08-11RNA: subtypes and unitsBrecht Van Lommel
* Reviewed subtypes, making them more specific and adding new ones. * Subtypes now have an associated type of units (length, area, volume, mass, rotation, time, velocity, acceleration). These are not used yet anywhere. * Centralized code that decides the name of array items based on subtype (XYZ, RGB), was copied in 3 places. * RNA_def_float etc functions still need to be update, will do this later together with another change.
2009-08-102.5 audio cleanup:Joerg Mueller
* Removed CD Actuator * Removed bSample and bSoundListener * Removed SoundSystem * Removed -noaudio parameter
2009-08-10missing include for fluidCampbell Barton
2009-08-10adding back button evaluation so you can do 1/60, 90*0.1 etc as well as ↵Campbell Barton
dimension conversion 1km-10cm+4ft Note... - Python3.1 you don't need to add the .0 for divisions anymore (was esp annoying for button eval) - Simple dimension input, imperial mi/yd/ft/in, metric km/m/cm/mm, Later could display these values and have a pref for scene scale, atm it assumes 1BU == 1m.
2009-08-10fix for build problem with audiospace and implicit declaration.Campbell Barton
2009-08-10Wrap message with " as the ' was giving issues.Guillermo S. Romero
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.