Commit Graph

278 Commits

Author SHA1 Message Date
931527e648 - use clear, set, add, enable, disable and toggle as a prefix in operator names
- use select as a suffix eg UV_OT_loop_select -> UV_OT_select_loop
- Each select all operator was using slightly different wording...
  select_all, deselect_all, de_select_all, select_de_select_all -> select_all_toggle

- selection -> select
- POSE_OT_select_connected -> POSE_OT_select_linked to match other operators
- NODE_OT_delete_selection -> NODE_OT_delete since its not used in other operators
- ANIM_OT_previewrange_define -> ANIM_OT_previewrange_set to match other operators
- NODE_OT_fit_all -> NODE_OT_view_all to match other operators
- View2D_OT_* -> VIEW2D_OT_* to match VIEW3D
- View2D_OT_view_downscroll -> VIEW2D_OT_scroll_down more logical
- removed MARKER_OT_mouseselect_extend and made extend a boolean property of MARKER_OT_mouseselect
- MARKER_OT_mouseselect -> MARKER_OT_select
- GROUP_OT_group_remove -> GROUP_OT_objects_remove more logical since its removing objects from groups
- MESH_OT_removedoublesflag -> MESH_OT_remove_doubles
- redundant words MESH_OT_split_mesh -> MESH_OT_split,  OBJECT_OT_object_delete -> OBJECT_OT_delete

renamed selection operator properties
 extend_select -> extend
 column_select -> column
 select_children_only -> children_only
 ... Since these are all in the context of selection operators there is no need for the extra 'select' in the property name.
 
Updated docs
http://www.graphicall.org/ftp/ideasman42/html/bpyoperator-module.html
2009-03-29 02:15:13 +00:00
6da5e62ee8 2.5
*******
results of a review of my previous commits by brecht
2009-03-24 12:16:58 +00:00
fe1169f635 2.5
******
ported object ops to new naming conventions
2009-03-22 23:41:05 +00:00
c396a4ec15 Shift-A adds Armature Object (in Object Mode) or Bone (in Edit Mode) again. Still todo, is to have Shift-A in Object Mode add single-bone armature again. 2009-02-18 09:28:04 +00:00
38410b63a6 2.5: Text edit mode operators back. Took me a while getting
them nicely repeatable, and splitting up the big edit_text
operator into individual operator so it's all nicely scriptable,
documented, configurable, etc..

* Insert Text, Line Break, Insert Lorem
* Toggle Case, Set Case, Toggle Style, Set Style, Set Material
* Copy Text, Cut Text, Paste Text, Paste File, Paste Buffer
* Move, Move Select, Delete
* Change Spacing, Change Character

Notes

* Text (datablock) to Object doesn't work yet, will need to
  implement text editor context for that.
* Some shortcut keys don't work because screen/wm overrides them,
  ctrl+x, ctrl+left/right. That override goes top down which works
  well for some cases, but here we need to override in the other
  direction.
* There's no unicode support in RNA, or the user interface code
  for that matter, but text strings can contain these characters.
  At the moment it stores a UTF-8 string in char arrays, which is
  supposed to be nicely compatible with ascii. Seems reasonable to
  add support for UTF-8 in the interface code, python bindings, ..
  eventually?
2009-02-17 19:55:20 +00:00
47b9a44063 2.5: Curve edit mode add vertex and add menus now work. Also
fixed an issue where sublevel menus did not get right operator
context.
2009-02-13 17:37:01 +00:00
8817fb93c4 Keying Sets: Insert/Delete Keyframe Operator Buttons
* Insert/Delete keyframe buttons in the TimeLine work again. These now use two new operators which only insert keyframes for the active Keying Set. 
* Renamed the old insert/delete keyframe operators. These now have the "*_old" postfix on their names. What happens with these temp operators is yet to be seen.
* Added insert/delete keyframe buttons beside the operator buttons for Keying Sets in the Outliner->Datablocks view
2009-02-13 09:46:08 +00:00
1b27cd70e5 2.5
Render back! And not only back, even full threaded now. :)
Current state is unfinished, but too much fun to not to
commit for review and test!

WARNING: because render is in a threaded job, it will
use data as can be edited in the UI. That'll crash in many
cases of course... the idea is to limit UI usage to viewing
stuff, especially for the Image Window to inspect layers
or zoom in/out.

What works now;
- F12 render (no anim)
- ESC from render
- ESC pushes back temporary Image Window
- Render to ImageWindow or full-screen.
- Executing composites, and edit composites after render.

Note that the UI is 100% responsive in a render, you can 
switch screens, slide area dividers around, or even load
a new file during render. :) It's quite stable even.

I'll collect all crash reports especially to get a good 
picture of where the protection is required at least.

Also added: XKey "Delete Objects", to get things crash...
unfortunately it didn't for me.
2009-02-04 17:40:50 +00:00
3c088f3434 2.5
Simple toolbox-style menu system. Brecht will review it
though, and/or check on way to use it for menus.
I tried to avoid uiBlock and rna stuff all over. :)

Quick image test:
http://www.blender.org/bf/rt.jpg

Examples you can read in:
- editors/screen/screen_ops.c:testing123() (press F5)
- editors/object/object_edit.c:object_add_primitive_invoke()
  (press SHIFT+A)

Concept is simple:

uiMenuBegin(): returns a handle.
uiMenuEnd(): puts it all to work.

In between you can add items like:

uiMenuItemVal(): a name, icon, retval (use uiMenuFunc()) 
uiMenuItemO(): an operator + icon
uiMenuItemEnumO(): an operator, property name, value

Sublevels go easy too:

uiMenuLevel(): creates item for sublevel, with function pointer.
     Inside that function you can use all menu calls again.
     Levels can go as deep you want.

uiMenuLevelEnumO(): creates operator sublevel for an enum
2009-01-25 20:22:05 +00:00
8b793524ff make operator names more consistent
ANIM_OT_toggle_time -> ANIM_OT_time_toggle
SCULPT_OT_toggle_mode -> SCULPT_OT_sculptmode_toggle
UV_OT_select_inverse -> UV_OT_select_invert
NODE_OT_toggle_visibility -> NODE_OT_visibility_toggle
OBJECT_OT_toggle_editmode -> OBJECT_OT_editmode_toggle

toggle was used last in other operators eg- VIEW3D_OT_vpaint_toggle and VIEW3D_OT_wpaint_toggle.

'invert' was used everywhere else.
2009-01-25 15:41:17 +00:00
5cf8612d4b 2.5
*****
- made Group operators more atomic, no menus, able to build on top of each other
	- add/remove selected from group will be done later
	- new notifier is needed, ton will code
	- Group Create adds the object to the new group, and a string can be passed to it toi make a custum named group from Py, etc
	-keymaps remains the same (ctrl-g, create group - alt-ctrl-g, remove object from all groups)

- Added 2 more operators , GROUP_OT_objects_remove_active (alt-shift-g) , GROUP_OT_objects_add_active (ctrl-shift-g)
	- adds/removes object from groups that are attached to the active object
2009-01-20 10:50:36 +00:00
989a7e5b20 2.5
******
- Ported , add selected to group (Ctrl-G), remove selected from group(Alt-Ctrl-G)
	- add selected now has a add new entry which will put the object into a new group
	- remove selected now has an ALL option which removes the object from all groups
	- remove code is currently very messy, this will have to do until a better solution arrises, menus return strings instead of numbers perhaps

- add/remove to/from group of active object still need to be done
2009-01-20 03:41:23 +00:00
a6edbba8ec 2.5
- 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-17 18:35:33 +00:00
44e5b7788b 2.5: Blender "Animato" - New Animation System
Finally, here is the basic (functional) prototype of the new animation system which will allow for the infamous "everything is animatable", and which also addresses several of the more serious shortcomings of the old system. Unfortunately, this will break old animation files (especially right now, as I haven't written the version patching code yet), however, this is for the future.

Highlights of the new system:
* Scrapped IPO-Curves/IPO/(Action+Constraint-Channels)/Action system, and replaced it with F-Curve/Action. 
- F-Curves (animators from other packages will feel at home with this name) replace IPO-Curves. 
- The 'new' Actions, act as the containers for F-Curves, so that they can be reused. They are therefore more akin to the old 'IPO' blocks, except they do not have the blocktype restriction, so you can store materials/texture/geometry F-Curves in the same Action as Object transforms, etc.
* F-Curves use RNA-paths for Data Access, hence allowing "every" (where sensible/editable that is) user-accessible setting from RNA to be animated.
* Drivers are no longer mixed with Animation Data, so rigs will not be that easily broken and several dependency problems can be eliminated. (NOTE: drivers haven't been hooked up yet, but the code is in place)
* F-Curve modifier system allows useful 'large-scale' manipulation of F-Curve values, including (I've only included implemented ones here): envelope deform (similar to lattices to allow broad-scale reshaping of curves), curve generator (polynomial or py-expression), cycles (replacing the old cyclic extrapolation modes, giving more control over this). (NOTE: currently this cannot be tested, as there's not access to them, but the code is all in place)
* NLA system with 'tracks' (i.e. layers), and multiple strips per track. (NOTE: NLA system is not yet functional, as it's only partially coded still) 

There are more nice things that I will be preparing some nice docs for soon, but for now, check for more details:
http://lists.blender.org/pipermail/bf-taskforce25/2009-January/000260.html

So, what currently works:
* I've implemented two basic operators for the 3D-view only to Insert and Delete Keyframes. These are tempolary ones only that will be replaced in due course with 'proper' code.
* Object Loc/Rot/Scale can be keyframed. Also, the colour of the 'active' material (Note: this should really be for nth material instead, but that doesn't work yet in RNA) can also be keyframed into the same datablock.
* Standard animation refresh (i.e. animation resulting from NLA and Action evaluation) is now done completely separate from drivers before anything else is done after a frame change. Drivers are handled after this in a separate pass, as dictated by depsgraph flags, etc.

Notes:
* Drivers haven't been hooked up yet
* Only objects and data directly linked to objects can be animated.
* Depsgraph will need further tweaks. Currently, I've only made sure that it will update some things in the most basic cases (i.e. frame change).
* Animation Editors are currently broken (in terms of editing stuff). This will be my next target (priority to get Dopesheet working first, then F-Curve editor - i.e. old IPO Editor)
* I've had to put in large chunks of XXX sandboxing for old animation system code all around the place. This will be cleaned up in due course, as some places need special review.
In particular, the particles and sequencer code have far too many manual calls to calculate + flush animation info, which is really bad (this is a 'please explain yourselves' call to Physics coders!).
2009-01-17 03:12:50 +00:00
004eacad0c 2.5
SHIFT+A add object back, no primitives in it though... later!
2009-01-15 16:07:39 +00:00
890838dce8 2.5
*****

small commit, ported make dupli real
2009-01-15 10:02:45 +00:00
806bc87a97 2.5
******
small commit
	- ported Select Linked (shift-L)
	- it does have IPO for now
2009-01-13 09:48:25 +00:00
4e1ad1aaaa 2.5
*******

- Ported  ObData to center, center new and centur cursor
	- its currently 1 operator
	- no warning or error popups until its figured out how best to do so
	- possibly full of ugly code and things done worng way, had a hard time trying to understand this code

- some more house cleaning and removal of unused functions
2009-01-13 05:31:33 +00:00
b2eb7f3664 2.5
******
- Ported set/clear slow parents
	- currently there is no keymap entries

- removed some unused functions and some tidying up
2009-01-08 02:50:37 +00:00
f2b1c96d02 2.5
*******
- Ported show/hide objects as the clear/set restrictview operators (request of kaito)
	- clear is not using a context loop as there is none currently available
	- set uses a popup menu for hide select and hide unselected

 hotkeys are H and Alt-H (set, clear)

- ported the undo calles, to use ED_undo_push where available
2009-01-04 02:34:34 +00:00
af2304f3cb 2.5
********
- added clear location/rotation/scale/origin
	- each action is a seperate operator
	- Drawing is delayed as the tag_region_redraw does not seem to have an effect perhaps a transformation notifier is needed
	- for the view to update just do some transformation, like press G

 - changed the shortcut key for area rip to alt-ctrl-r so it dosn't conflict with clear rotation
2009-01-02 03:16:38 +00:00
e9a3b4f85d 2.5
- Edit mode Mesh undo/redo back
  (undo for editmodes needed recode, todo for curve/lattice/etc)
- Added border select for edit mesh
- Added Akey (de)select all for edit mesh
- Added notifiers for mode changes.

This is also the first trial to dynamically add/remove
keymap handlers, based on modes. For that reason the Object
keymap was split in 2, modal and non-modal. On TABkey, the
view3d listener removes and adds maps.

The view3d keymap still handles generic mouse/border selection.
Internally it will verify modes.

The modes are not  re-implemented still... have to move this
to scene context.
2009-01-01 13:15:35 +00:00
c9b60a7b64 2.5
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-31 17:11:42 +00:00
446492c266 2.5
******
- ported Make track , and Clear track (ctrl-t, Alt-t)
	- make track is a direct port does not use context data loops
	- make Track crashes as Constraints have not been ported yet

- added select_extend to mouse select so now you can use shift again
	- Still does not use Context data loops as this get all messed up, kaito can you look into it 
	- currently only works with 1 modifier key at a time so ctrl+alt does not work, until i can figure out how best to achieve this
2008-12-30 10:37:52 +00:00
090807066c 2.5
*******

Small commit, moved selection Operators to Object editor (object_edit.c) as per kaito's request

- normal selection and border/circle select are still in view3d as they depend too much on view3d
2008-12-30 03:38:18 +00:00
5006875f53 2.5
- fix Makefile for space_script
- renamed operators for modules i maintain. (stripped ED_)
2008-12-26 11:11:21 +00:00
febb2c21e4 2.5
Further simplifying making operators with menus;
now you can add an 'invoke' callback:

    WM_menu_invoke

which will automatically generate a menu with choices and assign
it to the property 'type'.
What also helps typing is the new RNA_enum_is_equal() function.

Here's a paste of the now committed 'clear parent'. Note the
undo push will become a flag too.

http://pasteall.org/3660

(Brecht; fixed small bug in RNA_enum_is_equal!)

To evaluate: solving dependencies for multipe scenes... probably
will make a more generic flush call.
2008-12-24 18:06:51 +00:00
b38f6e7d18 2.5
Object: converted the old horrible editobject.c, now as file:
editors/object/object_edit.c

Still lots of WIP, I've operatorified "Make Parent". Check here
the new API at work: http://pasteall.org/3650/c

IMPORTANT NOTE FOR BRECHT:
game property defines were clashing with RNA, i've renamed game
defines for now.
2008-12-23 19:47:33 +00:00