Commit Graph

561 Commits

Author SHA1 Message Date
8a1dbea363 == Grease Pencil - UI Improvements ==
Based on user feedback, I've made some changes to the Grease Pencil UI (most notably in 'Time Editing' facilities). 
* 'Edit Timing' button gone
* Pin button and '<Grease Pencil Data' string gone from Action Editor
* Action Editor in 'Grease Pencil' mode now displays all grease-pencil datablocks for current screen. 
* AE: GP-Datablocks are drawn like 'groups', with an expand/collapse button to show/hide layers. Its name shows the type of space it comes from, and shows indicative status info (i.e. for 3d-view, it shows view-angle)
* Added refresh calls for action editor after editing relevant data.

I haven't tested all tools yet, but most should be stable. 

Also, I've removed some unnecessary buttons, and added a few tooltips. There's also some experimental code to try to get clearer indication of 'active' layer.
2008-07-23 12:27:08 +00:00
32d10bca2b == Grease Pencil ==
Grease Pencil is a tool which allows you to draw freehand in some views, allowing you to annotate/scribble over the contents of that view in either 2d or 3d. This facilitates many easier communication and planning abilities.

To use, simply enable it from the View menu (choose 'Grease Pencil...' and click 'Use Grease Pencil'). Then, click+drag using the left-mouse button and the shift-key held to draw a stroke.

For more information, check the following page on the wiki:
http://wiki.blender.org/index.php/User:Aligorith/247_Grease_Pencil
2008-07-22 09:53:25 +00:00
7e7791755a Sun,Sky and atmosphere for lamps(sun type), PATCH#8063 http://projects.blender.org/tracker/?func=detail&atid=127&aid=8063&group_id=9 2008-07-03 10:38:35 +00:00
5372def2b0 BGE patch: add state engine support in the logic bricks.
This patch introduces a simple state engine system with the logic bricks. This system features full
backward compatibility, multiple active states, multiple state transitions, automatic disabling of 
sensor and actuators, full GUI support and selective display of sensors and actuators. 
Note: Python API is available but not documented yet. It will be added asap.

State internals
===============
The state system is object based. The current state mask is stored in the object as a 32 bit value; 
each bit set in the mask is an active state. The controllers have a state mask too but only one bit
can be set: a controller belongs to a single state. The game engine will only execute controllers 
that belong to active states. Sensors and actuators don't have a state mask but are effectively 
attached to states via their links to the controllers. Sensors and actuators can be connected to more
than one state. When a controller becomes inactive because of a state change, its links to sensors 
and actuators are temporarily broken (until the state becomes active again). If an actuator gets isolated, 
i.e all the links to controllers are broken, it is automatically disabled. If a sensor gets isolated, 
the game engine will stop calling it to save CPU. It will also reset the sensor internal state so that
it can react as if the game just started when it gets reconnected to an active controller. For example,
an Always sensor in no pulse mode that is connected to a single state (i.e connected to one or more 
controllers of a single state) will generate a pulse each time the state becomes active. This feature is 
not available on all sensors, see the notes below.

GUI
===
This system system is fully configurable through the GUI: the object state mask is visible under the
object bar in the controller's colum as an array of buttons just like the 3D view layer mask.
Click on a state bit to only display the controllers of that state. You can select more than one state
with SHIFT-click. The All button sets all the bits so that you can see all the controllers of the object. 
The Ini button sets the state mask back to the object default state. You can change the default state 
of object by first selecting the desired state mask and storing using the menu under the State button. 
If you define a default state mask, it will be loaded into the object state make when you load the blend
file or when you run the game under the blenderplayer. However, when you run the game under Blender, 
the current selected state mask will be used as the startup state for the object. This allows you to test
specific state during the game design.

The controller display the state they belong to with a new button in the controller header. When you add
a new controller, it is added by default in the lowest enabled state. You can change the controller state 
by clicking on the button and selecting another state. If more than one state is enabled in the object
state mask, controllers are grouped by state for more readibility. 

The new Sta button in the sensor and actuator column header allows you to display only the sensors and 
actuators that are linked to visible controllers.

A new state actuator is available to modify the state during the game. It defines a bit mask and 
the operation to apply on the current object state mask:

Cpy: the bit mask is copied to the object state mask.
Add: the bits that set in the bit mask will be turned on in the object state mask.
Sub: the bits that set in the bit mask will be turned off in the object state mask.
Inv: the bits that set in the bit mask will be inverted in the objecyy state mask.

Notes
=====
- Although states have no name, a simply convention consists in using the name of the first controller 
  of the state as the state name. The GUI will support that convention by displaying as a hint the name
  of the first controller of the state when you move the mouse over a state bit of the object state mask
  or of the state actuator bit mask.
- Each object has a state mask and each object can have a state engine but if several objects are 
  part of a logical group, it is recommended to put the state engine only in the main object and to
  link the controllers of that object to the sensors and actuators of the different objects.
- When loading an old blend file, the state mask of all objects and controllers are initialized to 1 
  so that all the controllers belong to this single state. This ensures backward compatibility with 
  existing game.
- When the state actuator is activated at the same time as other actuators, these actuators are 
  guaranteed to execute before being eventually disabled due to the state change. This is useful for
  example to send a message or update a property at the time of changing the state.
- Sensors that depend on underlying resource won't reset fully when they are isolated. By the time they
  are acticated again, they will behave as follow:
  * keyboard sensor: keys already pressed won't be detected. The keyboard sensor is only sensitive 
    to new key press.
  * collision sensor: objects already colliding won't be detected. Only new collisions are 
    detected.
  * near and radar sensor: same as collision sensor.
2008-06-22 14:23:57 +00:00
2bece8dcb5 BGE Patch: Add Shape Action support and update MSCV_7 project file for glew.
Shape Action are now supported in the BGE. A new type of actuator "Shape Action" is available on mesh objects. It can be combined with Action actuator on parent armature. Only relative keys are supported. All the usual action options are available: type, blending, priority, Python API. Only actions with shape channels should be specified of course, otherwise the actuator has no effect. Shape action will still work after a mesh replacement provided that the new mesh has compatible shape keys.
2008-06-18 06:46:49 +00:00
c84c0201e1 Collisions: Commit of collision cleanup, put kdop-bvh structure into BLI_kdopbvh (just like kdtree interface now), huge speedup for selfcollisions, also better normal collisions (merge from cloth branch) 2008-06-03 18:48:54 +00:00
10dde9b7d7 Merging revisions 14838-14945 of https://svn.blender.org/svnroot/bf-blender/trunk/blender 2008-05-23 20:36:05 +00:00
b6ab784c12 Fix for bug #12473: crash converting old particle system from
a linked file.
2008-05-23 09:23:57 +00:00
db3712a2d8 svn merge -r 14721:14810 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2008-05-12 12:24:52 +00:00
c8673be3d6 == FFMPEG ==
Add ffmpeg expert option (meaning _all_ ffmpeg option) to render dialog
using properties.

Also adds: H264 preset, that doesn't screw up output.
2008-05-11 20:40:55 +00:00
a68c03e409 Reason of all this work: Commiting my work-in-progress on reviewed collision system (better + general access to kdop, uses less memory, put it into BLI_* namespace and usage defined like existing BLI_kdtree_*). Deleted old kdop.c 2008-05-07 20:42:16 +00:00
1584d6a006 Possible fix for #9691: blender failing to allocate memory when rendering
particles on windows, now allocates smaller chunks of memory.
2008-05-07 19:25:43 +00:00
db9c14a574 fix gcc warnings 2008-04-29 08:24:33 +00:00
23660800b6 Cloth: Old RC1 and RC2 files with cloth should open again and not crash (after the DNA rearrangement to fix a bug yesterday). But be carefull your settings get lost. Best thing to do: 1. write settings down, 2. open blend in new (>=17 subversion) blender and just save the file (and ignore warnings on the command line.) Take this as a good example why not to use svn blender versions for production purposes ;) 2008-04-28 17:02:55 +00:00
57c1fbe557 remove old particle system.
also removed quat, dquat, and sumohandle from the Object struct since they aren't used anywhere.
2008-04-27 18:26:20 +00:00
b818118379 Fix for bug #9487: converting particle system with dupliverts
to the new system didn't work correct.
2008-04-21 10:15:01 +00:00
f8a29350ad Fix for bug #8957: undo lost scenes assigned to screens. 2008-04-14 13:09:08 +00:00
8355a71365 Fix for bug #8932: crash converting old particle system. 2008-04-12 13:00:01 +00:00
1fe5302cce Point Cache Refactoring
=======================

Caching and Baking:
- The point cache is now cleared on DAG_object_flush_update(), and not cleared for time dependency graph updates.
- There is now a Bake button instead of Protect. Also cache start and end frames were added to softbody and particles.
- The cloth autoprotect feature was removed.
- The Ctrl+B menu now also bakes cloth and particles next to softbody and fluids. Additionally there are now frree bake and free cache menu entries.
- The point cache api has been changed. There is now a PTCacheID struct for each point cache type that can be filled and then used to call the point cache functions.
- PointCache struct was added to DNA and is automatically allocated for each physics type.
- Soft body now supports Bake Editing just like cloth.
- Tried to make the systems deal consistently with time ipo's and offsets. Still not sure it all works correct, but too complicated to solve completely now.

Library Linking:
- Added some more warnings to prevent editing settings on library linked objects.
- Linked objects now read from the cache located next to the original library file, and never write to it. This restores old behavior for softbodies. For local simulation the mesh and not the object should be linked.
- Dupligroups and proxies can't create local point caches at the moment, how to implement that I'm not sure. We probably need a proxy point cache for that to work (ugh).

Physics UI:
- Renamed deflection panel to collision for consistency and reorganized the buttons. Also removed some softbody collision buttons from the softbody panel that were duplicated in this panel for cloth.
- Tweaked field panel buttons to not jump around when changing options.
- Tabbing e.g. Soft Body Collision into the Soft Body panel, it now only shows Collision to make the panel names readable.
- I tried to make enabled/disabling physics more consistent, since all three system did things different. Now the two modifier buttons to enable the modifier for the viewport and rendering are also duplicated in the physics panels. Toggling the Soft Body and Cloth buttons now both remove their modifiers.
- Fixed modifier error drawing glitch.

Particles:
- Particles are now recalculated more often than before. Previously it did partial updates based on the changes, but that doesn't work well with DAG_object_flush_update() ..
- Fixed memory leak loading keyed particle system. Now keys are not written to file anymore but always created after loading.
- Make particle threads work with autothreads.

Continue Physics:
- The timeline play now has a Continue Physics option in the playback menu, which keeps the simulations going without writing them to the cache.
- This doesn't always work that well, some changes are not immediately updated, but this can be improved later. Still it's fun to get a feel for the physics.

Todo:
- Point cache can get out of sync with and undo and changing a file without saving it.
- Change the point cache file format to store a version (so old point cache files can be either converted or at least ignored), and to do correct endian conversion.
- Menu item and/or buttons for Ctrl+B.
- A system("rm ..") was changed to remove() since the former is very slow for clearing point caches. These system() calls were already giving trouble in a bug in the tracker, but really most use of this system("") should be changed and tested.
- The Soft Body Collision and Clot Collision panel titles don't mention there's point cache settings there too, doing that makes them unreadable with the default panel setup.. but may need to make the names longer anyway.
2008-04-10 11:39:20 +00:00
e7384c9dd2 Commit patch #8799: Realtime SetParent function in the BGE
This patch consists in new KX_GameObject::SetParent() and KX_GameObject::RemoveParent() functions to create and destroy parent relation during game. These functions are accessible through python and through a new actuator KX_ParentActuator. Function documentation in PyDoc.
The object keeps its orientation, position and scale when it is parented but will further rotate, move and scale with its parent from that point on. When the parent relation is broken, the object keeps the orientation, position and scale it had at that time.
The function has no effect if any of the X/Y/Z scale of the object or its new parent are below Epsilon.
2008-04-06 18:30:52 +00:00
49c65433cc Fix for bug: [#8117] Particles with fluid broken
-Handling of fluid particles was not coded at all
-Now things should work properly, but as fluid particles are not very familiar to me I'd appreciate some thorough testing
2008-04-02 17:48:46 +00:00
5fa576a89f UV Unwrap (lscm, project from view, cube etc) now default to correcting for the active images aspect ratio.
This is now default but can be disabled in the UV Calculation panel. At the moment its called "Image Aspect" but another name could be better.
2008-03-26 14:50:29 +00:00
1930a925c8 Removing some compiler warnings.
(Note to who-ever made all the changes referring to r.scemode:
r.scemode is an int, not a short!)
2008-03-21 23:10:23 +00:00
af8c68ddc4 Cloth structure names update: Sorry about this commit, it will kill all your cloth settings in old files but I had to do it before release because naming convention was really bad in cloth (e.g. using SimulationSettings instead of ClothSimSettings in DNA). Same for some structure in CollisionModifier but with no sideeffects. 2008-03-20 18:28:40 +00:00
Ken Hughes
3c7308614a Python API
----------
Bugfix #6543: Blender.Library.Load() could segfault if called more than once
with a library of different endian type.  In the process discovered an
invalid memory reference in other another function calling library_append().
Thanks to Brecht for the pointers on tracking this old bug down.
2008-03-20 04:59:59 +00:00
3bec4f5f87 my last commit to readfile.c crashes some files, must look further into this. 2008-03-14 09:46:53 +00:00
2c78254f96 line commented out with the orange merge is needed for library linking when linking in objects that indirectly point to groups that are already directly linked in. This has been a problem for many peach scenes. but saving and reloading made the objects appear. 2008-03-13 21:41:28 +00:00
4c6ff955ed quick fix for null check that crashed blender when reading some files. 2008-03-12 10:20:45 +00:00
0ec0f2a02f Add an option for saving/loading DPX with in log color space with
reference black, reference white and gamma.

Added 16 bit TIFF saving.

This needs more work to cleanup code and add 16 bit TIFF reading, but
committing it now so it can be tested.
2008-03-10 11:39:37 +00:00
205ad1580c own missing null check 2008-03-07 22:39:45 +00:00
b4e13ae575 Another big purge of warnings. (Main culprits this time were Campbell and Geoffrey):
* no newline at end of file (2-3)
* uninitialised vars (1)
* unused vars (1-2)
* assigning/comparing pointers and ints (numerous)
* etc.
2008-03-07 03:24:23 +00:00
08f306c81c Made python scripts save and load in the blend file so you can have the same scripts running when you open a blend file.
Also scripts will re-run on undo rather then closing.

This is done by saving and loading the name of the script or textblock of the 'Script' datablock, connected to the ScriptSpace. This way when there is a name but the script dosnt run.
Blender runs the script or text block if available.
2008-03-06 21:25:15 +00:00
4037ef7714 Fix for undo optimization commit, compiler error on msvc. 2008-03-05 17:51:35 +00:00
4f764637e6 Undo optimization: now big chunks of memory are not written as single
memory blocks anymore, but smaller fixed size blocks, so that diffing
can be more effective. For example helps in sculpt mode when making
only local changes to the mesh, previously it would copy the whole
MVert array for each undo step.
2008-03-05 15:13:41 +00:00
4165ae42cc == Sequencer ==
Fixed a bug with ibuf caching on startstill / endstill.

The new blend modes happened to force start and endstill to be rendered
over and over again. This could get very annoying especially on scene
strips.

We therefore now cache the original start or endstill ibuf seperately
and copy on demand.
2008-03-02 14:54:45 +00:00
97517528d4 Bugfix: texture effectors didn't link in their textures. 2008-02-28 11:39:13 +00:00
905a2d374a Cloth: 1. Bugfix for possible memory leak reported by Kenneth Styrberg (via mailing list), 2. Bugfix for friction again, 3. Preset menu on GUI (thanks to help from nudelZ (#blendercoders), 4. Possibility to disable autoprotect cache, 5. Some cache bugs fixed, 6. Some speedup in generating cloth 2008-02-28 00:01:19 +00:00
931ac1cebd Bugfix: recent rollback of premul changes gave issues. The premul
flag bit was changed and not changed back, and the flag was moved
back from image user to image. This meant that files saved both
before and during the premul changes did not read premul settings
correct anymore.

Now it uses the old premul flag bit again, which also keeps forward
compatibility.
2008-02-26 11:38:32 +00:00
e601994b15 Fix for bug #8324: J-key render buffer switching had various issues.
One problem was that the previous render buffer was stored in the
render window or image window itself, which means that when closing
it, or switching from one to the other, things didn't work as expected.
Also in the image editor, color sampling the previous render buffer or
saving it didn't work correct.
2008-02-24 19:23:58 +00:00
d16daa2c13 Removing duplicate PyConstraints version-patch. I guess it was a result of some merge gone wrong or so. 2008-02-24 09:51:07 +00:00
f312611a92 =ID Property Bugfix=
There was an extraneous line causing ID property groups
to have the wrong length, causing crashes in code that
relied on it.

This commit both fixes that and adds a version check to
fix group lengths for older .blends.  The subversion
was incremented to 15 for this change.
2008-02-23 02:12:50 +00:00
0e233b3213 =Reversion of premul bugfix=
Reversion of premul bugfix, as it was apparently not
working all that well.

Note that this brings back the bug where the erase alpha
paint tool won't display correctly, since the UV image
editor just draws images in key alpha now.
2008-02-22 22:23:58 +00:00
3790c95ab5 Crasher in patch for premul flag: missing NULL check
Also converted ugly short pointer casting with the standard ID
define GS(), Get Shorty!
2008-02-19 09:00:39 +00:00
ccac67d3ea Further work on the premul option for ton. This option
(which basically tells the renderer and compositor to expect a
key image) is now done at the image user level.

This does have some caveats, as image users don't always work
the way I thought they would/should (for example, the same image user
structure is apparently used in the uv image editor for all images,
which is kindof odd).

The UV image editor also now smartly detects if the premul option is
set and draws the image using key alpha, instead of premul

The subversion level was upped to convert the old premul flag, which was at
the image level, to the new one, which is at the image user level.
2008-02-18 23:50:12 +00:00
ef17600b5c Old particles didn't interpolate between keypoints at render time so regression test hairball.blend didn't render properly. Now all converted particle systems have path display and render steps set to 0 so that only the keypoints are used. 2008-02-17 15:46:03 +00:00
b12793fb4f Render Simplification
This adds a few settings to control global render quality, for faster
renders when tweaking lighting etc. The implementation is not so great,
and this should really be part of a proper render profile and preset
system. So for now it's a hidden Peach feature, enabled by setting rt
to 1. Before the next release, I'll either remove or improve it.

Settings are:

- Maximum subsurf level
- Child particles percentage
- Maximum shadow map samples
- AO and SSS quality factor
2008-02-13 11:18:08 +00:00
Nathan Letwory
16514e3ddb * Merge of PyNodes to trunk. Finally!
See http://wiki.blender.org/index.php/BlenderDev/PyNodes and
  http://wiki.blender.org/index.php/BlenderDev/PyNodes/API
  For current documentation.

  Very very big thanks go to William Germano for fixing the memory issues left
  and for improving on the code.

  In the coming time documentation will be finalised and further stabilising
  of PyNodes is to be expected.
2008-02-09 23:17:15 +00:00
f11ea1eb8e Bugfix for recent alphaover premul commit, crashed existing files
and on adding a new node, maybe the commit was incomplete?
2008-02-04 21:17:15 +00:00
47b53510a5 merging game_engine branch changes into trunk, 2d-filters and opengl speedup 2008-02-04 02:33:27 +00:00
Ken Hughes
ab662ae85c More fixes for gcc warnings. 2008-02-03 18:50:03 +00:00