Commit Graph

8 Commits

Author SHA1 Message Date
Ton Roosendaal 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
Brecht Van Lommel 9bcdb4b758 2.5: various warning fixes. 2009-01-17 00:51:42 +00:00
Brecht Van Lommel 52135dd4fa 2.5: Space Image ported back
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-15 04:38:18 +00:00
Nathan Letwory bdf6a002aa 2.5 / Nodes
* add Context accessor for selected nodes
* node translation uses transform code
* put transform defines in an enum (mode and numinput flags)
2009-01-02 23:58:03 +00:00
Ton Roosendaal 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
Ton Roosendaal 9b2dec9631 2.5
Recode of 'select all objects by type' to show
how to use itterators.
2008-12-28 18:10:24 +00:00
Brecht Van Lommel 76c035bd11 2.5: Data Context
* 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-23 02:07:13 +00:00
Brecht Van Lommel ecc4e55b66 2.5
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
2008-12-18 02:56:48 +00:00