Commit Graph

15139 Commits

Author SHA1 Message Date
Campbell Barton
8ead648fd1 Spring Cleaning
* removed radiosity render code, DNA and RNA (left in radio render pass options), we'll get GI to replace this probably, better allow baking to vertex colors for people who used this.
* removed deprecated solid physics library, sumo integrations and qhull, a dependency
* removed ODE, was no longer being build or supported
* remove BEOS and AMIGA defines and references in Makefiles.
2009-06-21 16:18:38 +00:00
Nicholas Bishop
de77b4a9b3 2.5/Sculpt:
Fixed bug where anchor brush would leave messed up normals (was related to using face normals, not vertex normals.)
2009-06-21 15:59:43 +00:00
Campbell Barton
7f55c3b89c RNA read-only wrapped wmEvent so python operators invoke functions
* 2 new enums event_value_items and event_type_items in RNA_enum_types.h
* WM_key_event_string now uses an RNA enum lookup rather then its own switch statement.
* moved wmEvent from WM_types.h into DNA_windowmanager_types.h
* added RNA_enum_identifier and RNA_enum_name to get strings from an enum value.
2009-06-21 14:30:59 +00:00
Janne Karhu
1f9368b37e Particle system parenting
* Allows moving, rotating & scaling of particle simulations.
* Setting in particle render options.
* Changes viewed & rendered particles from global space to parent space.
* Doesn't effect simulations at all.
2009-06-21 11:09:16 +00:00
Thomas Dinges
c549e75c16 2.5 Buttons Window:
* WIP Commit: Started wrapping the buttons header to python. Still disabled due to some display problems.
2009-06-21 10:26:39 +00:00
Janne Karhu
6b15024f4a Pointcache refresh part 1:
* Particles support larger than 1 frame changes, bigger frame changes can result in inaccurate results, but it's super fast and you get a nice feeling of how the particles behave!
* "Cache to current frame" button calculates the exact result of particles at current frame.
* Current state of cache can be protected by making it a bake.
* Cache is now in memory by default, disk cache is an option.
* Only "viewport %" number of particles are calculated and cached in viewport, baking and rendering calculate all particles.
* Info on cached frames and memory usage given in ui.
* Support for exact "autocaching" of changes and large frame changes(disabled for now until exact place in event system is decided)
* "Continue physics" is probably deprecated after this and should be removed once sb & cloth use the new cache code.

Todo:
* Make softbody & cloth use the new cache things.

Other changes:
* Some cleanup of particle buttons.
2009-06-21 10:16:52 +00:00
Nicholas Bishop
64274de2fe 2.5/Sculpt:
Fix for the poll used for the operator to set the brush curve to a preset. The 3 brush curve presets in the Sculpt menu are now functional.
2009-06-21 03:34:30 +00:00
Nicholas Bishop
984ab79629 2.5/Multires:
Bugfix for loading older files with the pre-modifier multires.
2009-06-21 02:51:42 +00:00
Nicholas Bishop
001dab25d4 2.5/Sculpt:
Added a clay brush. It behaves like a combination of the flatten and draw brushes.

Credit to Fredrik Hannson for the original patch (#18666)
2009-06-20 20:29:25 +00:00
Brecht Van Lommel
823a7ce3d3 RNA: added MeshVertex.normal. 2009-06-20 15:06:18 +00:00
Brecht Van Lommel
ad07fc19c0 Context
Python dir(context) now gives the items from the data context
too, modified context callbacks to also return a list of items
in the context.
2009-06-20 14:55:28 +00:00
Brecht Van Lommel
980dab9028 2.5: fix for crash in BLI_dynstr_appendf, each vsnprintf call
apparently needs its own va_start/va_end.
2009-06-20 14:53:30 +00:00
Campbell Barton
a68ebbbccd RNA Fixes
* Python apis iterator didnt work, for example [f for f in mesh.faces] # failed.
* Python apis collection.items(), collections without names now return (index,value) pairs, better then returning nothing.
* bpy.ui and bpy.props modules were incorrectly named
* Mesh vertex colors red/blue needed to be swapped on getting/setting.
* Mesh vertex colors were not clamped.
2009-06-20 13:53:14 +00:00
Campbell Barton
3511d72488 game logic UI script, physics could be broken up into more panels. 2009-06-20 06:06:13 +00:00
Campbell Barton
7785ead4eb ObColor wasnt converted into an RNA string.
Updated Mathutils.Vector/Euler/Quaternion/Matrix so these are types rather then module methods, each type now has a tp_new function, matching python builtins float/int/str.
Also cleaned up float conversion and arg passing.

Changed buttons_objects.py...
 if ob in groups.objects: # no longer works
 if ob.name in groups.objects: # is the new syntax
...its more dict like and a lot faster (avoids python iterating over each item and comparing each, use a single rna lookup instead).
2009-06-20 02:44:57 +00:00
Brecht Van Lommel
d0e8acaf29 UI
* Fix issue with panel header line not always being hidden
  for the first panel.
* Fix graying out of aligned buttons being off by one pixel,
  did not find a nice solution for it though, so just added
  -1/+1 in the code.
2009-06-19 23:11:41 +00:00
Brecht Van Lommel
aa0aac706e 2.5
* Optimized RNA property lookups and path resolving, still can be
  much better, but now the 1000 IPO example on bf-taskforce25
  runs at reasonable speed.
* Also an optimization in the depsgraph when dealing with many
  objects, this was actually also a bottleneck here.
2009-06-19 23:05:21 +00:00
Nicholas Bishop
7349d775b0 2.5/Sculpt:
Made some improvements to how brush strength works.

* For the draw and inflate brushes, the brush's 3D radius is used to set the "goal" distance, towards which vertices move. A strength setting of 1.0 will move verts there immediately (with the usual exceptions of tablet pressure, texture/curve input, etc.)

* Also changed strength calculation to use the square of the strength slider, so that you don't have to be as finicky setting a low brush strength.

* For smooth brush, added an extra loop through the verts. So, a bit slower, but now verts take into account more than the immediate vertex ring.

TODO:
Still some magic numbers:
* Pinch limits the effect to moving vertices half of the way towards brush center. I see no use for a 100% pinch (it pretty much destroys the mesh.) Even half may be too high a limit, but this is hard to place an exact number on.

* Smooth has two magic numbers, the strength fudge factor and the number of smooth repetitions (currently 2.)

* The way the layer brush works is left unchanged for now.
2009-06-19 22:16:30 +00:00
Campbell Barton
c3b8db4833 BGE: allow action blending by bringing back blend_poses() as game_blend_poses, the new animation system doesnt use it but doesnt have a replacement function so it can be kept for the BGE only. 2009-06-19 16:27:01 +00:00
Brecht Van Lommel
6c139156cf RNA:
* EditBone wrapped, using manual get/set function, and used
  in the UI code. Makes the RNA wrapping code here more
  complicated, but works.
2009-06-19 14:56:49 +00:00
Joshua Leung
42e60acce6 Animato - Conversions Bugfix
Object actions are now converted before object ipo's so that if both of them exist, the Action can still preserve its name.
2009-06-19 11:17:56 +00:00
Campbell Barton
4f9e0ec06e Update Mathutils for py3k
* removed coercing types which has been removed from py3.
* matrix uses getset's rather then getset items.
* removed deprecated functions.
2009-06-18 23:12:29 +00:00
Daniel Genrich
b6182781b0 Fix for compiler error since BLO_sys_types.h was not in the path 2009-06-18 21:25:21 +00:00
Diego Borghetti
96003b5b73 Revert a small change to kerning, Matt please let me know if now it's fine (or like before). 2009-06-18 20:45:58 +00:00
Martin Poirier
2269280910 don't include stdint.h directly, it's broken on non C99 compliant compilers (you know which one I'm talking about). 2009-06-18 20:23:46 +00:00
Martin Poirier
dd250f7d85 2.5
Missing { when WITH_LCMS is defined.
2009-06-18 20:13:17 +00:00
Brecht Van Lommel
94dbb3bbdd 2.5 Python
Merging changes made by Arystanbek in the soc-2009-kazanbas branch,
plus some things modified and added by me.

* Operator exec is called execute in python now, due to conflicts
  with python exec keyword.
* Operator invoke/execute now get context argument.
* Fix crash executing operators due to bpy_import_main_set not being
  set with Main pointer.
* The bpy.props module now has the FloatProperty/IntProperty/
  StringProperty/BoolProperty functions to define RNA properties for
  operators.
* Operators now have an __operator__ property to get the actual RNA
  operator pointers, this is only temporary though.
* bpy.ops.add now allows the operator to be already registered, it
  will simply overwrite the existing one.
* Both the ui and io directories are now scanned and run on startup.
2009-06-18 19:51:22 +00:00
Brecht Van Lommel
4cd24cf058 RNA
Merging changes made by Arystanbek in the soc-2009-kazanbas branch,
plus some things modified and added by me.

* The API files now all in the makesrna module, convention is to
  call them e.g. rna_mesh_api.c for rna_mesh.c. Note for visual
  studio build maintainers, the rna_*_api.c files are compiled as
  part of "makesrna", but do not have rna_*_gen.c generated as part
  of the library. SCons/cmake/make were updated.

* Added function flags FUNC_USE_CONTEXT and FUNC_USE_REPORTS, to
  allow RNA functions to get context and error reporting parameters
  optionally. Renamed FUNC_TYPESTATIC to FUNC_NO_SELF.

* RNA collections now have a pointer to add/remove FunctionRNA's, this
  isn't actually used anywhere yet, purpose is to make an alias
  main.meshes.add() for main.add_mesh() in python.

* Fixes to make autogenerating property set/get for multidimensional
  arrays work, though a 4x4 matrix will be exposed as a length 16
  one dimensional RNA array.

* Functions and properties added:
	* Main.add_mesh()
	* Main.remove_mesh()
	* Object.matrix
	* Object.create_render_mesh()
	* WindowManager.add_fileselect()
2009-06-18 19:48:55 +00:00
Brecht Van Lommel
89d2559e6d 2.5
* Update cmake and makefiles to link python generic.
* Fix game engine building for cmake and makefiles.
* Fix compile error with py 3.x, due to 2.x compat fix.
2009-06-18 19:25:58 +00:00
Campbell Barton
025b6dcbc3 fix for building with py2.3 2009-06-18 17:34:39 +00:00
Daniel Genrich
122b206de3 Fixing gl/glw.h compiiler error 2009-06-18 15:33:58 +00:00
Ton Roosendaal
2f48d0b46b Added Make for new python/generic dir.
Also included GLEW.
2009-06-18 15:31:14 +00:00
Brecht Van Lommel
8130fb29b2 RNA:
* Make cloth settings animateable from buttons.
2009-06-18 14:29:24 +00:00
Brecht Van Lommel
5ea992df98 UI:
* Fix context.cloth, was not being set correct.
* Fix errors with context pinning, scripts should
  not assume context.object to be there.
* Always show preview even if e.g. the material is not
  set, to keep ID buttons from jumping while you're
  using them.
2009-06-18 14:20:25 +00:00
Campbell Barton
7e57823c47 build generic modules in their own lib, compiling without the game engine would fail because bpy_internal_import.c wasnt being included.
(scons only)
2009-06-18 04:36:45 +00:00
Campbell Barton
489db9994d Some generic modules from blender 2.4x building with py3k and mostly working.
* Mathutils, Geometry, BGL, Mostly working, some //XXX comments for things to fix with py3

python import override (bpy_internal_import.c) so you can import python internal scripts from the BGE and running blender normally.
2009-06-17 20:33:34 +00:00
Guillermo S. Romero
cb68b9434c Fix mask in arrow cursor and improve swap one. 2009-06-17 19:46:39 +00:00
Ton Roosendaal
0b0b02caf8 2.5
Logic editing back!

Test screenie:
http://download.blender.org/institute/rt9.jpg

I gave the buttons a bit more width, added nicer linkline draw.

Not working yet:
- theme colors for sensor/actuator types (was old button colors)
- moving sensors up/down (used bad pupmenu... better is icons like
  used for modifiers)
- Linkline mouse-over select. Currently deleting a link goes by
  drawing the same line again.

Needs to be fully tested for functionality too, leave that to the GE
department. :)

I noted there's bad button hacking with reading button values,
like check_state_mask(). uiBut structure was not meant to be exported
outside of interface module.
2009-06-17 11:01:05 +00:00
Campbell Barton
54ed699743 ActionActuator in the game engine working again to display deformed meshes with the new animation system.
Note that the animation conversion from existing 2.4x blend files doesnt yet set the Action pointer in the actuator so the only way to test is to use the python api to set the new converted action active on the actuator because there is no user interface.
2009-06-16 20:38:18 +00:00
Campbell Barton
ecb39291e9 small merge needed for testing new animsys in 2.5 BGE, mixing own changes with merge can be a hassle.
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r20928:20937
2009-06-16 19:51:58 +00:00
Campbell Barton
2faf20c4b3 BGE Action Actuator setChannel() function was broken in a number of ways.
* extract_pose_from_pose only checked one of the list items for NULL when looping over them yet its possible they are different sizes.
* game_free_pose needed to be used rather then MEM_freeN, channels would never be freed leaking memory.
* setChannel() would make a new pose that wasnt aligned with the existing pose, the lists are assumed aligned so when extracting the channels its unlikely this was ever useful.
* Added getChannel() - returns pose loc/size/quat
* Added option args for setChannel(channel, matrix) or setChannel(channel, loc, size, quat)
2009-06-16 18:25:48 +00:00
Campbell Barton
aa0825a5e5 looks like a mistake. should check with the scene render size, not the current scenes. 2009-06-16 15:44:08 +00:00
Campbell Barton
55f1a1dcad changes to the sequencer in trunk between 20855:20928, (excluding UI changes)
had to //XXX comment some funcs.
2009-06-16 15:04:29 +00:00
Campbell Barton
a1cf7988c1 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r20855:20928
Sequencer changes from source/blender/src coming next
2009-06-16 14:21:58 +00:00
Ton Roosendaal
2d40b8d56f 2.5
Added SpaceLogic, to restore the old logic buttons into.
In future it can be used for a more advanced logic editor, with
states, behaviour, whatever. We'll see!

This commit only adds the backend for new space. Committed this
now as reference for when we need another space type. It's still
not well plugin-able (dynamic space types), but my idea is to just
have a new SpacePlugIn for this, with a neat small API to define
all relevant callbacks.

Also note the icon for the spacetype is wrong still.
2009-06-16 13:09:36 +00:00
Campbell Barton
0a66e24bd7 KX_PythonSeq (used for a number of BGE sequence types)
* cont.actuators.get("key", default) # dict like get function
* if "key" in cont.sensors: ...

Updated docs
Added missing include to Particle.c
2009-06-16 08:52:04 +00:00
Campbell Barton
2ecbe1c81c BGE Py API
* Removed modules Expression and CValue, neither were ever available.
* Added GameLogic.EvalExpression(exp) from the Expression module, evaluates an expression like the expression controller (not sure if this is really that useful since python is far more advanced).
* resetting the original blend file path didint work (own fault == -> =)
* Py3.x PyModule_Create didnt allow importing since it didn't add to sys.modules,
  Looks like they want us to use init-tab array, but this doesn't suit us since
  it needs to be setup before python is initialized.
* Documented GameLogic.globalDict
2009-06-16 07:16:51 +00:00
Guillermo S. Romero
573f2f34fa Separate "content reordering" from "plain menus". 2009-06-16 02:40:39 +00:00
Matt Ebb
172a3e9d0e small fix: ao energy is not a percentage 2009-06-16 01:51:51 +00:00
Brecht Van Lommel
1d0bc55e6c UI:
Revert revision #20879:
Enable non reordering menus option, it was disabled without explanation (?).

This changed the order of all header menus with the header at the bottom,
this doesn't seem acceptable to me. Additionaly, it doesn't make sense to
me that this would be the same option as the toolbox shape, they should be
separate options.


Here's the rationale from 2005 by Ton:

I didn't add the commenting out of correcting pulldown menu order, which
is based on location of the originating button in the UI. This uncommenting
didn't solve anything, since button definitions itself can be flipped too.
(Example: the data brose menus in top bar need to be corrected).

I can imagine the order flipping is sometimes annoying, but it still has
reasons to be there;
- the most important / most used items are always closest to the mouse.
  (like opening properties panel, or "Add new" for material.
- it follows muscle memory and 'locus of attention' (mouse position).
- menus are configured to open to the top for bottom headers, and to the
  bottom for top headers. We can expect the UI is configured consistantly
  for headers, so in general the menus will appear consistant as well.

Where menu flipping fails is especially for alphabetic listings, like in
the menu button of fileselect. However, that one should be configured to
open by default to the bottom, so ordering is consistant as well.
2009-06-16 01:32:33 +00:00