Commit Graph

195 Commits

Author SHA1 Message Date
405cf80eb8 Big, big commit!!
1) Remove WITH_FREETYPE2 from code, so now blender always need freetype2
2) Remove the old bmfont
3) Remove ftfont and bFTGL library
4) Implement a new BLF_draw_default function for place that still need/use
   the old BMF api.

I try to update both, scons and cmake, but I only can test with make, so
hope all work fine.

MSVC is broken, but I don't have Windows, things to search and fix are
any reference to WITH_FREETYPE2, FTGL and BMFONT (take in care that
blenkernel also have a BKE_bmfont.h, this don't have anything to do with bmfont).
        Always have to link/include the freetype2 library
        Remove any reference to libbmfont
        Remove any reference to libftfont
        Remove any reference to libbftgl (or libbFTGL)
2009-05-05 23:10:32 +00:00
af02a0aa4e UI
* Headers and menus can now be created in python.
* Replaced the uiMenuItem functions to create menus with equivalent
  uiItem functions using a layout, removing duplicated code.
* More uiItem functions are now exposed to python.
* The text editor header, panels and one of its menus are now created
  in space_text.py.
* Buttons window data context icon new changes depending on active
  object.

Issues
* Icons are not wrapped yet, hardcoded ints at the moment.
* The ID browse template is unfinished.
2009-04-22 18:39:44 +00:00
874c29cea8 2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19323:HEAD
Notes:
* blenderbuttons and ICON_SNAP_PEEL_OBJECT were not merged.
2009-04-20 15:06:46 +00:00
41dd360420 2.5: Operator naming, reviewed some of the recent changes
by Shaul, did some minor tweaks.
2009-04-15 15:40:31 +00:00
17814e8bf1 editmesh_tools.c op name change 2009-04-12 17:54:07 +00:00
59578bfad2 as per discussion with ton, the editmesh accessors now live
in blenkernel.
2009-04-11 08:26:51 +00:00
89b906db9f editmesh accessor functions. most editmesh access now goes through:
EditMesh *EM_GetEditMesh(Mesh *me);
void EM_EndEditMesh(Mesh *me, EditMesh *em);

as discussed on the mailling list, this is to facilitate migration to bmesh.
next step is to merge this this to the bmesh branch.  this was done in the 2.5
branch to prevent too great a divergance.

also, made makesdna/makesrna work on cygwin/msvc2008/scons.
2009-03-30 07:28:37 +00:00
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
dff4852671 flat and smooth shading descriptions were replaced 2009-03-15 03:11:05 +00:00
Nathan Letwory
cdf70e0f84 2.5 - temporary hack hack
#if 0 main body of EdgeSlide for now - 64bit msvc compiler chokes on it.
 - added a goto line combo to make the function complete.
2009-02-20 18:36:27 +00:00
2cb5af58a6 2.5
- 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
2009-02-19 19:03:53 +00:00
f377be3783 2.5
Assorted smaller fixes:

- Fix: modal keymaps for editmode in view3d were not set again
  when you copy areas or go fullscreen.

- Improved "redo last op" (F6) to search back in history for
  a redoable operator. Operator also used wrong pupmenu type.

- On creating new FCurve editor, the channel rainbow colors are
  set correct.

- EditMesh: fixed code for Spin/Screw, correct props, init and
  error reporting. (Spin hotkey ALT+R temporary)

- recompiled all to check for uninitialized variable warnings.
  (compile flag should be -O for this). Fixed some proto's.
2009-02-19 16:22:07 +00:00
d00b18c718 working yet preliminary (like everything) screw mesh. in irc there was a discussion about setting the screw axis outside of the function, but someone else should do that. 2009-02-18 03:01:45 +00:00
312c822945 spin mesh is alt Rkey - ton, please check and advise regarding screw_mesh and defaults. F3 fails while pressed continuously 2009-02-16 20:04:01 +00:00
27d52217ca 2.5
Cleanup of wm_event_types.h, removed all old "allqueue" defines.
2009-02-16 14:28:33 +00:00
a0fada6f18 added error reporting to edit mesh 2009-02-14 21:31:34 +00:00
b8e6e01cfd 2.5: Curve edit mode. Transform works again, and editcurve.c is
partly operatorized though nothing hooked up yet.
2009-02-11 23:02:21 +00:00
2249c61d03 2.5 Bugfixes:
Adjusted ranges for subdivide operators (Mesh + Armature). 
* The Mesh one was causing lockups as its range started from 0. Now it starts from 1.
* Tweaked the soft-limits for subdivide operators to be easier to use (1-10 instead of 0-100)
2009-02-09 22:59:26 +00:00
608e6f1d3e edit_tools ops - starting from 4key up to 8key, ctrl and alt. ton: please check if working (especially uv and color functions) 2009-02-07 23:20:36 +00:00
df7e766032 UI
* Changed uiPupMenuOperator usage to uiPupMenuBegin/End (simpler,
  no need to build a string). Also made transform orientation and
  subdiv type enums instead of ints for this.
* Added an icon argument to many of the uiMenu calls, and added a
  uiMenuItemIntO.
* Move auto rna button creation out of outliner code, now is
  uiDefAutoButR for individual buttons and uiDefAutoButsRNA for a
  whole block.
* Implemented uiPupBlock(O). Pressing F6 gives a menu with the
  properties of the last operator to test. I tried to make a redo
  last operator out of this but couldn't get the context correct
  for the operator to repeat in. Further the popup block also has
  some issues getting closed while editing buttons.
* Fix uiAfterFunc memory leak on Ctrl+Q quit.
* Fix handling of RNA number button dragging and sliding for RNA
  buttons with range -inf/inf.
2009-02-04 11:52:16 +00:00
dce3c08b2c made some mesh operator names and values more consistent with object mode + other minor changes.
- percentage -> percent, and always a float.
- renamed selectconnected to select_linked
- removed _mesh prefix for MESH_OT_* operators.
- renamed select_swap -> select_invert (matching object and sequencer operators)
2009-02-01 12:40:27 +00:00
b3c3af2156 - Converted mesh face popup menu to use brecht's toolbox function (like the image view toolbox)
Rather then having a hard coded popup menu with events that call other operators exec functions, operator names are given to the toolbox where it displays the operator name and shortcut.
This means the real operator is registered rather then the one that called it.

Im not sure about the location for the operator though, at the moment its called VIEW3D_OT_editmesh_face_toolbox() in view3d_header.c since the image editor toolbox is in the header file too.
In a way it makes sense because this menu should eventually be in the header.
- Change shortcut to Ctrl+F as it is in 2.4x

- Added a number of operators that were not being registered - MESH_OT_fill_mesh, beauty_fill, convert_quads_to_tris, convert_tris_to_quads, edge_flip, mesh_set_smooth_faces, mesh_set_solid_faces

- Renamed redundant MESH_OT_mesh_set_smooth_faces() to MESH_OT_faces_shade_smooth(), same for solid.
2009-02-01 04:22:18 +00:00
2755d48d4e - Change 2 operators from using int properties into enums.
- Renamed MESH_OT_mesh_selection_mode_menu to MESH_OT_mesh_selection_type since the operator doesnt have to be accessed from a menu.

Shaul, you might want to look over this, using enums means WM_menu_invoke can be used instead of writing an invoke function for each operator.

Added error messages to WM_menu_invoke if no enum "type" property is found.
2009-02-01 02:37:12 +00:00
51ded6696a 2.5
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.
2009-01-31 19:40:40 +00:00
86a2a0f694 2.5
Edit Mesh:

- Added back "Edge Shortest Path select"
  It now also does regular selection, more fun! 
  It's mapped to CTRL+click now, and makes or clears selections 
  between current and previously activated edge.
  Seam/Sharp/etc marking is a toolsetting mode still. These
  options cannot become properties easily, because the tool
  uses the properties of selected edge to clear...

- Removed a whole bunch of G.f flags, related to mesh drawing.
  It's all now local in me->drawflags. Here's the list of
  removed old globals:

G_DRAWEDGES
G_DRAWFACES
G_DRAWNORMALS
G_DRAW_VNORMALS

G_ALLEDGES
G_HIDDENEDGES

G_DRAWCREASES
G_DRAWSEAMS
G_DRAWSHARP
G_DRAWBWEIGHTS

G_DRAW_EDGELEN
G_DRAW_FACEAREA
G_DRAW_EDGEANG
2009-01-31 13:30:56 +00:00
05e04c5e45 delete menu is back DKEY. seperating may be needed to delete_mesh 2009-01-31 02:31:58 +00:00
a7b0df894e 2.5
Edit Mesh: Fkey back, add edge-face or fill 'edge net'
Make fgon will be different operator.
2009-01-30 19:14:50 +00:00
8036342ea8 2.5: UI & Menus
* Cleaned up UI_interface.h a bit, and added some comments to
  organize things a bit and indicate what should be used when.

* uiMenu* functions can now be used to create menus for headers
  too, this is done with a uiDefMenuBut, which takes a pointer
  to a uiMenuCreateFunc, that will then call uiMenu* functions.

* Renamed uiMenuBegin/End to uiPupMenuBegin/End, as these are
  specific to making popup menus. Will convert the other
  conformation popup menu functions to use this too so we can
  remove some code.

* Extended uiMenu functions, now there is is also:
  BooleanO, FloatO, BooleanR, EnumR, LevelEnumR, Separator.

* Converted image window headers to use uiMenu functions, simplifies
  menu code further here. Did not remove the uiDefMenu functions as
  they are used in sequencer/view3d in some places now (will fix).

* Also tried to simplify and fix bounds computation a bit better
  for popup menus. It tried to find out in advance what the size
  of the menu was but this is difficult with keymap strings in
  there, now uiPopupBoundsBlock can figure this out afterwards and
  ensure the popup is within the window bounds. Will convert some
  other functions to use this too.
2009-01-30 12:18:08 +00:00
5f9ee2cbfe 2.5
- Made WM_cursor_wait() work without context or pointers,
  like old waitcursor(). Only use when operations entirely
  block UI. It will set waitcursor for all open windows.

- Cleanup in mesh tools, removing old cruft, and prepare
  for more goodies for shul to work on!
2009-01-29 18:54:22 +00:00
3e6b5804fd editmesh face menu back, ctrl-pkey 2009-01-24 22:21:12 +00:00
b7f0add801 remove doubles op, ton: is this working properly? 2009-01-23 03:07:07 +00:00
d5f69e8552 2.5
- warning cleanup (wrong casts, unused vars, missing protos)
- removed old cruft from node_edit.c
- cleaned wm_jobs.c a bit
2009-01-22 15:46:35 +00:00
33ab2636df subdivides are now grouped in a menu - WKEY 2009-01-19 18:36:54 +00:00
bc63213844 2.5
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-19 16:54:41 +00:00
c1cf33c8aa RNA
* 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.
2009-01-16 23:53:11 +00:00
e6b8687237 added ops for subdivide, subdiv multi, subdiv smooth, subdiv fractal 2009-01-16 04:48:33 +00:00
237cd7a7a7 2.5
- 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.
2009-01-15 15:01:39 +00:00
25e5765f47 Got rid of old multires code, brought in multires modifier from
soc-2008-nicholasbishop branch.

Note: any old code with multires_test() or multires_level1_test() can 
just be deleted, not needed by the multires modifier.
2009-01-06 18:59:03 +00:00
f7cb86df3a 2.5
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.
2009-01-04 14:14:06 +00:00
a6721c60d9 2.5
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.
2009-01-02 19:10:35 +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
1402534ebc 2.5
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.
2008-12-30 16:03:29 +00:00
Nathan Letwory
3fd28ca440 2.5
* remove a stray ;
  - it would be an empty statement, which is a proper statement, but not so nice when doing still declarations :) MSVC will complain.
2008-12-30 13:46:20 +00:00
25fac7b001 2.5
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.
2008-12-30 13:16:14 +00:00