Age | Commit message (Collapse) | Author |
|
|
|
When adding extra context data in a layout using uiLayoutSetContextPointer, this info was not inherited by popup menus generated in this layout. While operators from regular buttons work fine, the data is missing in operators from menus and such. This patch copies the bContextStore from buttons to the new uiLayout used for popups.
|
|
|
|
else if's
|
|
would indirectly clear it when clearing the window from the context. This makes
some sense when we support multiple scenes properly, but currently there's still
many places assuming there is a single active scene, so keep it available to
avoid crashes.
|
|
===========================
Commiting camera tracking integration gsoc project into trunk.
This commit includes:
- Bundled version of libmv library (with some changes against official repo,
re-sync with libmv repo a bit later)
- New datatype ID called MovieClip which is optimized to work with movie
clips (both of movie files and image sequences) and doing camera/motion
tracking operations.
- New editor called Clip Editor which is currently used for motion/tracking
stuff only, but which can be easily extended to work with masks too.
This editor supports:
* Loading movie files/image sequences
* Build proxies with different size for loaded movie clip, also supports
building undistorted proxies to increase speed of playback in
undistorted mode.
* Manual lens distortion mode calibration using grid and grease pencil
* Supervised 2D tracking using two different algorithms KLT and SAD.
* Basic algorithm for feature detection
* Camera motion solving. scene orientation
- New constraints to "link" scene objects with solved motions from clip:
* Follow Track (make object follow 2D motion of track with given name
or parent object to reconstructed 3D position of track)
* Camera Solver to make camera moving in the same way as reconstructed camera
This commit NOT includes changes from tomato branch:
- New nodes (they'll be commited as separated patch)
- Automatic image offset guessing for image input node and image editor
(need to do more tests and gather more feedback)
- Code cleanup in libmv-capi. It's not so critical cleanup, just increasing
readability and understanadability of code. Better to make this chaneg when
Keir will finish his current patch.
More details about this project can be found on this page:
http://wiki.blender.org/index.php/User:Nazg-gul/GSoC-2011
Further development of small features would be done in trunk, bigger/experimental
features would first be implemented in tomato branch.
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
BLI_rfindstring, BLI_rfindstring_ptr, these search from the end of the listbase (like pythons rfind).
|
|
found entry, not the first, made this a bit more explicit in the code now.
|
|
char comparisons.
|
|
paint rna vars, using 'image paint' internally.
|
|
|
|
|
|
python functions.
- use NULL rather then 0 where possible (makes code & function calls more readable IMHO).
- set static variables and functions (exposed some unused vars/funcs).
- use func(void) rather then func() for definitions.
|
|
- remove unused code.
- BPY_run_python_script() split in 2, BPY_filepath_exec, BPY_text_exec
- renamed funcs.
|
|
in all cases except for the render engine.
this allows python to NULL its internal context while scripts are not running.
|
|
'const char's,.
Only one functional change where Transform orientations passed "" to BIF_createTransformOrientation() which could then have the value written into.
|
|
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.
|
|
|
|
|
|
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.
|
|
* context.main & bpy.types.Main --> context.blend_data & bpy.types.BlendData
* context.manager --> context.window_manager
|
|
replace with defgroup_find_name() and BLI_findstring()
|
|
'context.selected_objects', now returns []
|
|
|
|
|
|
prevents ctx_data_main and ctx_data_scene from crashing on NULL context
|
|
|
|
added use_ prefix to bools offset --> use_offset, tail --> use_tail for eg.
|
|
- EditBone was missing 'selected'
- renamed 'selectable' to --> 'restrict_select', matching object mode.
- renamed 'active_pchan' --> 'active_pose_bone'
|
|
|
|
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.
|
|
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)
|
|
|
|
* Split Info and User preferences into two separate spaces.
* Renamed Buttons Window to Properties also in RNA identifiers.
|
|
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.
|
|
* Pose mode was already object-localized, but moved the flag from object->flag to object->mode, with all the other modes.
* Updated object mode RNA
* Commented out some dubious use of base->flag with the posemode flag. So far as I could see the value was only being set, not read, so a hopefully safe change.
|
|
* Made particle edit object-localized.
|
|
* Made texture paint object-localized too.
Note for Brecht: gpu_draw.c had three uses of G_TEXTUREPAINT that I was not able to cleanly fix, so commented out for now. Can you take a look and see what should be done here?
|
|
* Weightpaint is now object-local like sculpt and vertexpaint.
* Fixed a bug spotted by DingTo, going from editmode to sculptmode didn't fully leave editmode
|
|
* Made vertex paint local to object, like sculpt mode.
* New test for vertex paint is (ob->mode & OB_MODE_VERTEX_PAINT)
|
|
* Renaming of edit mode context types.
* Code cleanup.
|
|
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.
|
|
background mode).
This fixes a segfault on quit in background mode. Now it reports unfreed datablocks, someone should fix that.
|
|
instead of casting everywhere.
|
|
|
|
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.
|
|
- Set View2D operators not to register, got in the way a lot with the console.
- Made autocomplete Ctrl+Enter so Tab can be used.
- Should work with python 2.5 now. (patch from Vilda)
- Moved report struct definitions into DNA_windowmanager_types.h, could also have DNA_report_types.h however the reports are not saved, its just needed so the report list can be used in the wmWindowManager struct. Fixes a crash reported by ZanQdo.
- Store the report message length in the report so calculating the total height including word wrap is not so slow.
|
|
* 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.
|
|
Group option currently doesnt handle multiple groups.
Set makefiles python version to 2.6 for linux since its common now.
|