Age | Commit message (Collapse) | Author |
|
* Moved proportional edit, snap, autokey mode, and a few others
from Scene to ToolSettings.
* RNA wrapped properties in ToolSettings for the UV editor:
proportional edit, snap settings, selection modes.
|
|
* Added icon to property and enum property items. The latter is
responsible for the large number of files changed.
* For RNA functions, added PROP_RNAPTR flag to ask for a PointerRNA
as argument instead of a C pointer, instead of doing it implicitly
with the AnyType type.
* Material: properly wrap diffuse/specular param variables, and
rename some things for consistency.
* MaterialTextureSlot: added "enabled" property (ma->septex).
* Image: make animated property editable.
* Image Editor: make some things editable, notifiers, respect state.
* Context: fix issue with screen not being set as ID.
|
|
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
|
|
- 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
|
|
editing, paint cursor, radial control, mouse/border/circle/lasso
select, mirroring, bad level calls fixed, etc.
|
|
* Still incomplete and some operators don't work, refresh issues, etc.
* Made Hide/Reveal operators consistent for various modes.
|
|
- Mesh Rip back (Vkey). For those who keep wondering how
it works: just put mouse cursor somewhere close to the
selection, press V and mouse mouse away from it. Feels
like real rip!
- Made extrude sorta work, no menu/options yet though.
But it does transform!
- Added an short event->mval[2] with region coords,
easier coding for the guys :)
- Fill operator standard delivers 'beauty' now
|
|
fixed an issue where sublevel menus did not get right operator
context.
|
|
Sanitized the 'tweak' event.
Original idea was to have WM event system generating it
automatically. However, I first tested it via a handler
and operator, to check what kind of configurations would
be useful. It appeared to not work nice, also because
that inserting a tweak operator in a keymap is confusing.
Now 'tweaks' are generated automatically, and can be
catched by keymaps as any event. The current definition
of tweak is:
- if Left/Middle/Rightmouse pressed
if event wasn't handled by window queue (modal handlers)
start checking mousepositions
- while mousepositions are checked
- escape on any event other than mouse
- on mouse events:
- add tweak event if mousemove > 10 pixels
- stop checking for tweak if mousebutton released
- Tweak events have a define indicating mousebutton used
EVT_TWEAK_L, EVT_TWEAK_M, EVT_TWEAK_R
- In keymap definitions you can use _S or _A to map to
action or select mouse userdef.
- Event value in keymap should be KM_ANY for all tweaks,
or use one of the eight directions:
EVT_GESTURE_E, _SE, _S, _SW, _W, _NW, _N, _NE
- And of course you can add modifier checks in keymaps for it.
- Because tweaks are a result of mouse events, the handlers get
both to evaluate. That means that RMB-select + tweak will work
correctly.
In case you don't want both to be handled, for example the
CTRL+LMB 'extrude' and CTRL+LMB-tweak 'lasso select', you will
need to set the first acting on a EVT_RELEASE, this event only
gets passed on when tweak fails.
The current system allows all options, configurable, we had in 2.48,
and many more! A diagram of what's possible is on the todo. :)
Also in this commit: lasso select editmesh failed with 'zbuffer
occluded select'. Also circle-select failed.
|
|
Committed two posemode operators. Hide/Unhide.
For people who want to check on adding operators, only
check the changes in armature directory, rest is to
get things to work, and a small bugfix :)
|
|
Big commit, but mainly adminstration.
- Enabled ot->flag OPTYPE_UNDO to work.
- Removed all redundant ED_undo_pushes, but I'd
recommend everyone to check it while testing. :)
- Added view manipulations as OPTYPE_REGISTER,
although this will flood the redo stack a bit...
Nevertheless; for a "redo last action" panel we
can simply check if both flags are set for redo.
- Bugfix in editmode undo: selectmode was cleared,
so you couldn't select after undo
- Bugfix in mixing tweaks and keymaps... solution
works but is weak, need to think over a while.
|
|
- Edit mesh: Add ctrl+click add vertex or extrude.
I've made it not move the 3d cursor in that case.
Also found out tweak events conflicted with existing
keymap definitions; on tweak failure (= no mousemove)
it now passes on the mouse event as 'mouse down' for
the remaining keymaps to check.
These then actually respond to mouse-up instead of down...
The location in the keymaps where tweaks get generated
remains important. Examples:
1 - 'select' mouse-handler, operator return pass-through
2 - tweak handler checks, and makes tweak event
3 - grabber responds to tweak event
1 - ctrl+mouse tweak handler checks, makes tweak event,
or passes event on
2 - if tweak event, it runs lasso
3 - else when passed on, ctrl+click extrude happens
In the first case, select works on mouse-down, immediate.
In the second case, extrude happens on mouse-release, even
though the keymap defined mouse-press.
This will make designing nice balanced keymaps still not
simple; especially because you can't tell operators to
pass on the key... although we can add the convention that
select-mouse operators always pass on to enable tweaks.
Still a good reason to wait with custom keymaps
when this is fully settled!
|
|
- Brought back code for particle edit and fluidsim
- Sanitized code from globals and bad level calls,
so its ready to come back working.
- Fixed cirle selecting (Ckey now)
- Enabled undo for editmode curve, armature, particle
and lattice
(another commit following)
|
|
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.
|
|
******
-ported some of the Object mode select menu to use uiDefMenuButO
- select random/layer still uses the hard coded value as no sutible popup exists
- select by type suffers from random crashes, somthing to do with Context
- need some way of doing sub menu's using the operator's invoke
- the old menu is just #if'ed out
- and did a little hous cleaning aswel
- added some undo pushes to the select operators
|
|
- 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
|
|
* Added more compact property definitions, with a single function.
Only used by operators at the moment, would need to tweak regular
expressions a bit more to use it also for other RNA definitions.
* The operator properties defined now were completed a bit more but
still have many issues that need to be adressed, specifically;
* Some properties that should be booleans or enums are defined as
ints, note that ints are only for numeric values, not bitflags
or multiple choice.
* Soft/hard limits and default values of many properties are not
well defined still,
* Inconsistent naming, especially for example mouse locations or
bounds are named differently in different places. Also mouse
locations and other vector like properties should become a single
vector property instead of multiple X/Y properties.
* Almost no properties have descriptions, these would be good to
have for docs and tooltips.
So, please verify that the properties of the operators you wrote are
well defined.
|
|
- Depricated another bunch of globals; all the totobj,
totmesh, totvert, and so on.
- All code that needs such totals now count it themselves,
these stats were not supposed to be reliable
- Editmesh now stores and manages own totals.
- Todo: make a scene->stats that tracks notifiers.
Bugfix: selecting failed in editmesh, backbuffer stuff was
too late, already using index ranges before it was set.
|
|
Another one back: editcurve.c
- removed global editNurb everywhere
(cu->editnurb now has listbase with edit data)
- also added 'active bpoint' and 'active nurb' in
Curve struct
- editmode in/out works, mouse/border select works
|
|
- restored three more C files: editlattice, editkey
and editgroup
- editmode lattice working, (mouse select works)
- accidentally removed yesterday 3d cursor drawing
- removed global editLatt entirely now.
|
|
- Weightpaint back (CTRL+TAB or menu)
Also weightpaint is sortof non-modal, allowing to use all existing
hotkeys while in paint mode. Only leftmouse is overridden.
- Made vpaint and wpaint entirely local, stored in scene (and saved!)
- Small bugfix (also in 2.48): on weightpaint mode, all armature objects
in 3d window were drawing as active poses. Now only the armature
deformer is.
Nice point for the UI agenda: are paint modes on ACTION mouse? Only then
you can combine it with SELECT mouse...
|
|
Vertex Paint back!
Added WM level "paint cursor" system, which manages a custom painting
cursor for tools or modes.
- Activate it with WM_paint_cursor_activate(). That function wants two
callbacks, a poll(C) to check whether there's a cursor in given context
and ARegion, and a draw(C, x, y) which gets called when appropriate.
- While paintcursor is active, the WM handles necessary redrawing events
for all regions, also to nicely clear the cursor on region exit.
- WM_paint_cursor_activate returns a handle, which you have to use to
end the paint cursor. This handle also means you can register as many
custom cursors as you want.
At the moment, vertex paint mode registers only a mousemove handler,
all other events are still normally handled. This is stuff for the
future todo.
|
|
- Armature editmode back
- Armature pose and editmode selecting with mouse back
- Posemode only works with 3d window header now.
|
|
Put back Armature/Pose code, including 'heat weight'.
I've added reeb.h to get things compile, but Martin will
cleanup files and put back?
Now where to put all vertexgroup code.... I guess mesh?
Note for msvc: yep, another new dir to add! :)
|
|
Think global, act local!
The old favorite G.scene gone! Man... that took almost 2 days.
Also removed G.curscreen and G.edbo.
Not everything could get solved; here's some notes.
- modifiers now store current scene in ModifierData. This is not
meant for permanent, but it can probably stick there until we
cleaned the anim system and depsgraph to cope better with
timing issues.
- Game engine G.scene should become an argument for staring it.
Didn't solve this yet.
- Texture nodes should get scene cfra, but the current implementation
is too tightly wrapped to do it easily.
|
|
From the anti-globalization department:
G.obedit terminated!
Wherever possible, use CTX_data_edit_object(C) to get this
now. It's stored in scene now, and the screen context has
it defined.
|
|
- Lasso select back (CTRL+LMB), object centers only,
and for editmesh. See template in wm_operators.c
- Circle select for editmode back. Currently it still
uses Ckey, and is only a temporary mode, not persistant.
Persistant circle select can be added later with
tweak gesture keymap? We'll see. :) The old circle
select was actually annoying that it was so sticky.
|
|
- View3D backbuffer select is back ("occlusion select").
It doesn't use the old 'afterqueue' yet, which ensured backbuffers
to draw immediate after swapbuffers. Will with that.
|
|
- Put back vertex/edge/face select
- Mode menu allows going in/out editmode
- Tested some tweak event stuff in WM, made tweak event follow
user preset for 'action' or 'select' mouse.
(Wanted to try this for transform, but better get advise from
Martin first :)
|
|
- 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.
|
|
Added extend-select for edit mesh.
Note for operator design; you cannot give operators hardcoded
properties like "SHIFT" or "ALT", that conflicts with the idea
of keymaps. Instead the properties have to be functional, like
setting 'extend' on or off.
I also think mouse select could get these operators:
- activate/select, option 'extend'
- activate/select on object center, option 'extend'
- activate/select, with menu, option 'extend'
and of course loop-select, group-select, and so on.
BTW: border-select could also get 'extend' option :)
|
|
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.
|
|
EditMesh: further cleanup, made derivedmesh itterator functions
work by gathering all related data in local ViewContext struct.
(scene, editmesh, region, view3d, obedit).
Also removed bad inclusion of view3d_intern.h in mesh module.
|
|
Editmesh code cleaned and compiling/linking. A whopping
20k lines back! :)
Not that it does stuff... editmode in/out has to be done,
and loads of operators. Also linking/exporting editmesh
calls has to be reviewed.
Also: added a blender_test_break() mechanism in BKE.
|
|
******
- 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
|
|
|
|
*******
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
|
|
More notifier cleanups:
NC_SCENE|ND_OB_SELECT : scene level object selections changed
NC_SCENE|ND_OB_ACTIVE : scene level, new active object
NC_OBJECT|ND_BONE_SELECT : object level, bone selection changed
NC_OBJECT|ND_BONE_ACTIVE: object level, new active bone
I've made view3d listen to these, so operators that change
selections don't have to tag own region for redraw anymore.
Also enabled selecting/activating in outliner again.
BTW: Added it in space_action, but Joshua has to code the
proper refresh still :)
|
|
********
-ported the selection functions to use context data loops
-removed unused functions
-added select by layer (alt-numpad *), hardcoded to layer 2 until appropriate popup is available
- normal select is still the same, need to untangle it badly, and add extend to it for multiple selection, group selections, activations etc etc
|
|
Recode of 'select all objects by type' to show
how to use itterators.
|
|
|
|
*******
small commit - Select By Type Operator ( ctrl-numpad * )
|
|
******
Ported object selection tools
- (de)select all
- invert selection (ctrl-i)
- select random ( numpad *)
each selection tool is own operator , mouse selection is seperated again to own operator
select random has the hard coded fac of 50 as there is no number popup developed yet
to be ported: select by layer and select by type
|
|
*******
Made the framework for selection operations ( invert selection, select random) to be handled by a single operator, atm only normal/mouse selection is possible
to be ported
- invert selection
- select random
- select by layer
- select by type
|
|
- Added 3d cursor operator (no exec, waiting for vector property!)
- Added default editor callbacks, for the poll() function.
Example:
ot->poll= ED_operator_view3d_active;
I'll add later more, per module, such as OBJECT_active, which
can be called without WM active
|
|
- fix Makefile for space_script
- renamed operators for modules i maintain. (stripped ED_)
|
|
Cleanup
- for portablity we can keep the old ugly defines for retrieving
active object, cfra and so on. But, they will use 'scene' not
G.scene.
- fixed code that uses those defines.
- some unused variables/functions removed
|
|
- Added default Circle 'gesture' operator callbacks.
As test, added in view3d window as Ckey, paint over object centers.
- Fixed notifier for gesture, to only cause redraws in own region.
|
|
- Bugfix: loading files should close running handlers and subwindows, gave
memory leaks that way.
- Bugfix: space image copy function didn't do curvemap
- Cleanup: moved view operators from view3d_select to view3d_view
|
|
- View3D: added ALT+B clipping operator. Note this needs a call to
the new function view3d_operator_needs_opengl(C) to ensure you
can use opengl functions. Event handling by default doesn't set
opengl per subwindow, it's also forbidden to draw then!
We might consider to tag operators that need opengl...
- Forgot to include creator.c fix for loading builtin vector font
|