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
2011-10-23remove $Id: tags after discussion on the mailign list: ↵Campbell Barton
http://markmail.org/message/fp7ozcywxum3ar7n
2011-02-18doxygen: blenkernel under core as module.Nathan Letwory
2010-12-07pass along the context to extension functions, this was already being done ↵Campbell Barton
in all cases except for the render engine. this allows python to NULL its internal context while scripts are not running.
2010-12-03Enabled GCC -Wwrite-strings warning for CMake and replaced many 'char's for ↵Campbell Barton
'const char's,. Only one functional change where Transform orientations passed "" to BIF_createTransformOrientation() which could then have the value written into.
2010-11-17use 'const char *' by default with RNA functions except when the value is ↵Campbell Barton
flagged as PROP_THICK_WRAP. Also use const char in many other parts of blenders code. Currently this gives warnings for setting operator id, label and description since these are an exception and allocated beforehand.
2010-10-05Reorganisation of COLLADA import code. Classes have been split into their ↵Nathan Letwory
own files. No functional changes. Where necessary extern "C" {} blocks have been added.
2010-09-27added CTX_wm_operator_poll_msg_get/set so failing poll functions can set ↵Campbell Barton
messages when poll fails, at the moment only python uses this but theres nothing python specific. only added 1 message to a poll function, so messages still need to be set in many more places to be useful.
2010-04-24py api: fix for context returning None for an empty list such as ↵Campbell Barton
'context.selected_objects', now returns []
2010-03-22spaces -> tabs, (4 spaces == 1 tab, only for white space preceding text)Campbell Barton
2010-02-12correct fsf addressCampbell Barton
2009-11-26Fixed typoElia Sarti
2009-11-25selected_pchans --> selected_pose_bones, same for visible_pchansCampbell Barton
added use_ prefix to bools offset --> use_offset, tail --> use_tail for eg.
2009-11-24RNA apiCampbell Barton
- EditBone was missing 'selected' - renamed 'selectable' to --> 'restrict_select', matching object mode. - renamed 'active_pchan' --> 'active_pose_bone'
2009-11-10modify the python context access so invalid names will raise an exception ↵Campbell Barton
rather then returning None. this way the UI scripts are less likely to fail silently and wont let typos work ok. also allow subclassing of the context, added a copy function, bpy.context.copy(), returns the context as a python dict to be modified and used in python. This also showed up an invalid brush member in the screen context.
2009-10-29Python can now run operators with their own context (data context).Campbell Barton
The aim of this is to avoid having to set the selection each time before running an operator from python. At the moment this is set as a python dictionary with string keys and rna values... eg. C = {} C["active_object"] = bpy.data.objects['SomeOb'] bpy.ops.object.game_property_new(C) # ofcourse this works too.. bpy.ops.object.game_property_new({"active_object":ob}) # or... C = {"main":bpy.data, "scene":bpy.data.scenes[0], "active_object":bpy.data.objects['SomeOb'], "selected_editable_objects":list(bpy.data.objects)} bpy.ops.object.location_apply(C)
2009-08-182.5:Brecht Van Lommel
* Split Info and User preferences into two separate spaces. * Renamed Buttons Window to Properties also in RNA identifiers.
2009-08-16- replace rna context.mode_string with an enum context.mode, that way its ↵Campbell Barton
self documenting and is used as a string from py anyway. - view3d use select menus use the context.mode enum value. - if selectmenu in dir(bpy.types) # creates a list of 1400+ strings, does a lookup and throws them away, better avoid this for redrawing.
2009-08-152.5 3D_View:Thomas Dinges
Patch [#19031] (2.5) python menus for the view3d header by Lorenzo Pierfederici (lento). Thanks! * Added CTX_data_mode_string() to find out in which mode we're in. * Added some "select" menus as a test. This patch makes it basically possible to wrap the 3D View menus to python.
2009-07-282.5: code cleanup, added CTX_wm_space_* for each space type,Brecht Van Lommel
instead of casting everywhere.
2009-07-18missed this file in last commit.Campbell Barton
2009-07-18initialize keymaps after python so python keymaps, solves the problem of ↵Campbell Barton
keymaps complaining about python operators not existing, but at the expense of some annoying init flags/functions. :/ Brecht/Ton you may want to check that C->data.py_init is a good place to store this.
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-11Object mode select grouped operator (Shift+G and Select manu)Campbell Barton
Group option currently doesnt handle multiple groups. Set makefiles python version to 2.6 for linux since its common now.
2009-06-24RNABrecht Van Lommel
* RNA_struct_name_get_alloc function to get the name from a pointer, instead of having to deal with name property. * CTX_data_pointer_get_type to get data from context with a check for the RNA type.
2009-06-20ContextBrecht Van Lommel
Python dir(context) now gives the items from the data context too, modified context callbacks to also return a list of items in the context.
2009-05-29Context:Brecht Van Lommel
Added a system for adding a "local" context in a UI layout. This way you can define for example within a modifier panel all operators to get the modifier in the context. In the layout code: uiLayoutSetContextPointer(layout, "modifier", &ptr) layout.set_context_pointer("modifier", md) In the operator: ptr = CTX_data_pointer_get(C, "modifier") md = context.modifier
2009-03-25UI:Brecht Van Lommel
* Screen level regions created for menus are now a separate CTX_wm_menu in the context, so they don't interfere with existing regions. * Fix context in popup menus to always come from the area and region the popup was opened from. * Removed some unused context stuff: tasks and reports. The places that were using context reports were using it wrong anyway. * Fix F6 closing immediately after editing a button, by making uiBlockSetFlag not clear existing flags anymore. * Don't use ":" in boolean X/Y/Z buttons.
2009-03-19ContextBrecht Van Lommel
* Made it based on string lookups rather than fixed enum, to make it extensible by python scripts. * Context callbacks now also have to specify RNA type when returning pointers or collections. For non-RNA wrapped data, UnknownType can be used. * RNA wrapped context. The WM entries are fixed, for data context only main and scene are defined properties. Other data entries have to be dynamically looked up. * I've added some special code in python for the dynamic context lookups. Tried to hide it behind RNA but didn't find a clean way to do it yet. Still unused/untested. * Also minor fix for warning about propertional edit property in transform code, and fix for usage of operator poll with checking if it was NULL.
2009-03-012.5: Text Editor back.Brecht Van Lommel
There was very little structure in this code, using many globals and duplicated code. Now it should be better structured. Most things should work, the main parts that are not back yet are the python plugins and markers. Notes: * Blenfont is used for drawing the text, nicely anti-aliased. * A monospace truetype font was added, since that is needed for the text editor. It's Bitstream Vera Sans Mono. This is the default gnome terminal font, but it doesn't fit entirely well with the other font I think, can be changed easily of course. * Clipboard copy/cut/paste now always uses the system clipboard, the code for the own cut buffer was removed. * The interface buttons should support copy/cut/paste again now as well. * WM_clipboard_text_get/WM_clipboard_text_set were added to the windowmanager code. * Find panel is now a kind of second header, instead of a panel. This needs especially a way to start editing the text field immediately on open still. * Operators are independent of the actual space when possible, was a bit of puzzling but got it solved nice with notifiers, and some lazy init for syntax highlight in the drawing code. * RNA was created for the text editor space and used for buttons. * Operators: * New, Open, Reload, Save, Save As, Make Internal * Run Script, Refresh Pyconstraints * Copy, Cut, Paste * Convert Whitespace, Uncomment, Comment, Indent, Unindent * Line Break, Insert * Next Marker, Previous Marker, Clear All Markers, Mark All * Select Line, Select All * Jump, Move, Move Select, Delete, Toggle Overwrite * Scroll, Scroll Bar, Set Cursor, Line Number * Find and Replace, Find, Replace, Find Set Selected, Replace Set Selected * To 3D Object * Resolve Conflict
2009-02-142.5 Bugfixes:Joshua Leung
* Removed unnecessary define for context loop (editable posechannels) * Fixed crash in animation-channel filtering - missing check for no world animation.
2009-02-142.5 - Adding context iterators for visible/editable (selection is ↵Joshua Leung
irrelevant) for bones and pose-channels. I'm not totally sure that these are needed, though it does make some tools simpler.
2009-02-052.5 - Bugfixes for Pose 'Clear' Operators Joshua Leung
* Fixed context iterators for PoseChannels. The actual selection test was missing (but layer visibility was getting checked). Also added check for hidden bones here too. * Removed unnecessary defines added by mfoxdogg in BKE_context.h * Removed the old hacks in 'Clear ...' operators for ensuring that object animation (ipos/actions) don't overwrite poses. These are no longer necessary, since normal animation calculation is only done in a separate step on frame-changes now. * Removed the manual checks for layer visibility from 'Clear ...' operators, since that's taken care of by context iterators.
2009-02-05 2.5Michael Fox
******* -ported clear loc,rot,scale operators to pose mode operators - for some reason when animated and you clear anything, the whole aramture clears. somthing to do with the depsgraph stuff that was directly ported from clear armature()
2009-02-052.5 - Context API access for Bones (EditMode and PoseMode)Joshua Leung
* Added selected, selected+editable, and active to access EditBones for Armature Operators to use. These take into account X-Axis Mirror too, so there is really no need to check that sort of thing anymore in tools. * Added a quick testing operator for verifying that these loops filter the data correctly. I've dumped this in armature_ops.c for now. It can be activated using the TKEY hotkey in Armature EditMode only. This should be removed once we have a few more functional tools. * Ported over cleaned up roll-calculation tools from AnimSys2 * Removed a few ugly stubs from posemode code
2009-01-302.5: Fix for windows editmode tab crashes. This was due toBrecht Van Lommel
use of function pointers in the context callbacks. Apparently MSVC decides that some of these functions are the same and makes them into a single function with the same address. I couldn't figure out if this was a compiler bug or according to the C spec. Regardless, that means this method can't be used, so now it uses separate CTX_DATA_DEFINES.
2009-01-192.5Ton Roosendaal
View3D has been split now in a local part (RegionView3D) and a per-area part (old View3D). Currently local is: - view transform - camera zoom/offset - gpencil (todo) - custom clipping planes Rest is in Area still, like active camera, draw type, layers, localview, custom centers, around-settings, transform widget, gridlines, and so on (mostly stuff as available in header). To see it work; also added new feature for region split, press SHIFT+ALT+CTRL+S for four-split. The idea is to make a preset 4-split, configured to stick to top/right/front views for three views. Another cool idea to explore is to then box-clip all drawing based on these 3 views. Note about the code: - currently view3d still stores some depricated settings, to convert from older files. Not all settings are copied over though, like custom clip planes or the 'lock view to object'. - since some view3d ops are now on area level, the operators for it should keep track of that. Bugfix in transform: quat initialize in operator-invoke missed one zero. Als brought back GE to compile for missing Ipos and channels.
2009-01-172.5Ton Roosendaal
- Added shift+d duplicate for object and editmode mesh. Note it uses WM_operator_name_call(), which is fine now, but in future might put again 2 undo's and operators on the stack. Will have to spend some time on how Macros will work! - added itterator CTX_selected_editable_objects() (named it first "edible" but that was too funny!) Also cleaned object_edit.c to use this correctly. - added CTX_wm_view3d(), especially for hybrid tools that *can* use view3d, but don't have to. - moved debug -d print for operators to the real invoke call
2009-01-172.5: various warning fixes.Brecht Van Lommel
2009-01-152.5: Space Image ported backBrecht Van Lommel
Organized as follows: uvedit/ uv editing related code uvedit_draw.c: drawing code uvedit_ops.c: operators, just a few done uvedit_unwrap_ops.c: will be operators for unwrapping uvedit_paramatrizer.c: lscm/abf/stretch/pack space_image/ space_image.c: registration and common getter/setters image_draw.c: drawing code, mostly functional image_panels.c: panels, all commented out image_render.c: render callbacks, non functional image_ops.c: operators, only view navigation done image_header.c: header, menus mostly done but missing buttons Notes: * Header menus consist only of Operator and RNA buttons, if they are not implemented they're displayed grayed out. Ideally the full header could work like this, but std_libbuttons looks problematic. * Started using view2d code more than the old code, but for now it still does own view2d management due to some very specific requirements that the image window has. The drawing code however is more clear hopefully, it only uses view2d, and there is no switching between 'p' and 'f' view2d's anymore, it is always 'f'. * In order to make uvedit operators more independent I move some image space settings to scene toolsettings, and the current image and its buffer is in the context. Especially sync selection and select mode belonged there anyway as this cannot work correct with different spaces having different settings anyway. * Image paint is not back yet, did not want to put that together with uvedit because there's really no code sharing.. perhaps vertex paint, image paint and sculpt would be good to have in one module to share brush code, partial redraw, etc better.
2009-01-032.5 / NodesNathan Letwory
* add Context accessor for selected nodes * node translation uses transform code * put transform defines in an enum (mode and numinput flags)
2008-12-312.5Ton Roosendaal
So, editmode mesh is back! :) At the moment only TABkey works and mouse select, 1 vertex at a time. More will follow of course. Note for the devs: - G.editMesh has been removed, be careful with old code. - EditMesh now is property of Mesh itself Although it means unlimited editmodes, for migration purposes we better stick to 1 "obedit" per scene, which is in Context too - G.obedit will get removed soon, so use CTX_data_edit_object(C) Or if you can't, just scene->obedit for now - Also removed the CTX_data_edit_mesh(), this has no meaning anymore. EditMesh is not context senstitive anymore, only the edit-object for time being is. - Martin: I've already tucked some EditMesh pointer in T and removed all G.editMesh there.
2008-12-282.5Ton Roosendaal
Recode of 'select all objects by type' to show how to use itterators.
2008-12-232.5: Data ContextBrecht Van Lommel
* Worked out data context implementation more, now with initial context callbacks implemented for the screen and 3d view. * For collections, switch from iterators to simpler ListBase. Though that still means it uses LinkData* rather than the actual Object* for example, since those can only be part of one list. So I added a macro as well to make iteration easier when possible. CTX_DATA_BEGIN(C, Object*, ob, selected_objects) { printf("object name: %s\n", ob->id.name); } CTX_DATA_END;
2008-12-182.5Brecht Van Lommel
Context API This adds the context API as described here. The main practical change now is that C is not longer directly accessible but has to be accessed through accessor functions. This basically adds the implementation of the API and adaption of existing code with some minor changes. The next task of course is to actually use this design to cleanup of bad level calls and global access, in blenkernel, blenloader. http://wiki.blender.org/index.php/BlenderDev/Blender2.5/Context Error, Warning and Debug Info Reporting This adds the error reporting API as described here. It should help clean up error() calls in non-ui code, but eventually can become used for gathering messages for a console window, and throwing exceptions in python scripts when an error happens executing something. http://wiki.blender.org/index.php/BlenderDev/Blender2.5/Reports