Commit Graph

4818 Commits

Author SHA1 Message Date
Ton Roosendaal
dde68ec0e0 Orange; added a depsgraph update tag for the case a Group is being animated
with NLA, whilst the "NLA target" has no action or nlastrips itself.
2005-12-14 18:43:53 +00:00
Toni Alatalo
7998a07386 orange: added Object.insertPoseKey to continue with the attempt to make nla/path walkcycle baking to actions 2005-12-14 17:44:08 +00:00
Ton Roosendaal
e65e6237a2 Orange; Magical Group relink option. :)
This is the case:

- Empty has Group duplicator
- Empty has NLA strips to animate the group

On linking the Empty to another group (with button in ObjectButtons), it
checks for the current strips in NLA, and tries to find the proper objects
in the new Group, based on name matches.
If not found, it sets the strip-objects to zero.
2005-12-14 15:58:52 +00:00
Ton Roosendaal
a6cc7204d9 Orange: On adding constraints, names are now unique per object/bone, this
prevents confusing situations when adding constraint ipos.
2005-12-14 14:45:24 +00:00
Ton Roosendaal
2fd72143f6 Wednesday merger of Orange branch and bf-blender 2005-12-14 14:24:23 +00:00
Ton Roosendaal
564ca3cede Commit with fix for ActionStrip "Hold" missed two crucial features;
- if repeat is set on exact integer values, it jumped to first position
- code was missing the action start offset
2005-12-14 14:10:04 +00:00
Ton Roosendaal
9983c5f172 Orange: added proper stringcopy for creating/finding pose and action-
channels. This for python api development here... :)
2005-12-14 13:47:40 +00:00
Ton Roosendaal
f88a0a6efd Orange: more relative path code cleanup. Introduced a new call in the
blenlib to correctly convert a relative path to a clean new path:

BLI_cleanup_dir(const char *relabase, char *name);

Only works for directories now.
2005-12-14 13:21:32 +00:00
Ton Roosendaal
cb57d03e97 Orange; more relative path messing... the functions in Blender for it
don't work consistant;

BLI_makestringcode()
This one works correct for paths that go up; it then makes a relative
path like : //../lib/file.blend

BLI_convertstringcode()
This one delivers different paths when it expands, the previous case
will just append the relative path, like /work/project/../lib/file.blend.
That string cannot be compared with the original... which happened to find
out if a library was read already.

Solution for now is that only the relative paths are compared, but it
won't work if multiple relative levels are used... like for libraries
that link recursive. To solve that, the entire 'relative' concept has to
be redesigned.
2005-12-14 09:59:22 +00:00
Campbell Barton
d527b0e585 Added
Image.New(name, w,h,depth)
Image.start- for animtex
Image.end - for animtex
Image.speed - for animtex
Image.packed - read only bool

See the pydocs for details.
2005-12-14 03:27:35 +00:00
Ton Roosendaal
4f235db6e6 Tuesday merger of Orange branch with bf-blender 2005-12-13 20:32:39 +00:00
Ton Roosendaal
d1cc4b7a15 Orange reported fix: Stride bone offset was blending with any strip, even
when strips had no stride set... causing using multiple strips not to work
for stride.
2005-12-13 20:16:10 +00:00
Ton Roosendaal
904a478d9d Orange: two other cases with databrowser and menus that needed the upgrade,
as committed yesterday for NLA.
2005-12-13 19:23:22 +00:00
Ton Roosendaal
ff72f72546 Orange: Library linking half-assed-fix for files that mix linked "direct"
data (local data links to lib data) and "indirect" (lib links to same lib
data).

A real solution should be found though... there's a conflict in the code
I don't fully grasp yet.
2005-12-13 19:21:56 +00:00
Ken Hughes
d3338620b7 -- More of Bugfix #3580: Mesh_getFromObject() was not updating key->from
when it duplicated mesh data.

   I'm not thrilled with how I implemented this code, but currently don't
   know a better way.  If someone more familiar with how blender duplicates
   objects and converts things to meshes wants to have a look, it would be
   appreciated.
2005-12-13 18:39:50 +00:00
Ken Hughes
4085cc06a6 -- Calling mesh.verts.extend() on a mesh with vertex groups was not updating
mesh->dvert, eventuallu causing a crash.
2005-12-13 15:36:32 +00:00
Ton Roosendaal
985b43adc2 Bugfix #3580
Apparently python allows to create Key blocks without proper *from pointer
back to the owner of the Key. The Key unfortunately wasn't mean to be a
dynamic block linkable to any Mesh...

This patch sets the from pointer on any call to do_mesh_key, which is safe
to do anyway. I made a note to get rid of that convention once, but at
least now we got non-crashing blenders. :)

(In bugreport noted that we need to check Python code for it too!)
2005-12-13 15:07:21 +00:00
Joseph Gilbert
7bba26d24b *warnings fixes 2005-12-13 14:29:56 +00:00
Ton Roosendaal
5fa5392b04 Bugfix #3590
Adding Ipos to Sound strips in Sequencer didn't work anymore. Adding a new
curve with CTRL+click also wasn't smart enough to detect that only one
channel existed there... fixed that too.
2005-12-13 14:28:34 +00:00
Ton Roosendaal
082e589c1a Bugfix #3579
Saving envmap, with a filter set (like gauss) and with a percentage set
(like 50%), saved envmaps with empty pixels inbetween the sub images.
2005-12-13 13:38:14 +00:00
Ton Roosendaal
b284a95222 Bugfix #3552
Another ancient bug in unified render... the lamphalo wasn't filled in
correctly over sky, especially when the background had halos (or stars).

Only shows when using filters other than box though.
2005-12-13 13:17:29 +00:00
Ton Roosendaal
e0dc311fc2 With the introduction of fixed edge arrays in Mesh, the options to render
wire frame became very limited... the information of faces (vertex colors
and UV reside there) got lost.
Solved it nicely with creating a large index table, and use bsearch() to
get quickly the matching information.

Then I noticed the render code needed fixes too for wire, no proper UV's
were calculated over the wire edge.
2005-12-13 12:41:17 +00:00
Ton Roosendaal
e51f752e75 bugfix #3585
The tool "Single User" -> "Object data" missed a tag to recalculate the
geometry. This caused meshes to disappear after entering editmode on the
former linked mesh.
2005-12-13 08:44:07 +00:00
Campbell Barton
fadaa2fbe9 From kh_pylon:
You have to put Py_RETURN_NONE; inside { }; it's a two-line macro
Aparently breaks MacOS.
2005-12-13 00:27:10 +00:00
Campbell Barton
d73e312f88 Added Image.GetCurrent()
Previously the only way to get the current image was flaky and relyd on the image being assigned to a mesh.

try:
  me = Scene.GetCurrent().getAttiveObject().getData(mesh=1)
  image = me.faces[me.activeFace].image
except:
  image = None

...Can new be replaced by the following, and works even when there is no mesh.
image = Image.GetCurrent()

epydocs:
  Get the currently displayed Image from Blenders UV/Image window.
  When multiple images are displayed, the last active UV/Image windows image is used.
2005-12-13 00:00:11 +00:00
Ken Hughes
b72dc4585f -- Bugfix #3566: Entering very large numbers for scaling/rotation/translation
cause a write past end of string buffers in outputNumInput().  Patched to
   make large numbers (+-1.0e+10) display in scientific notation format.
2005-12-12 23:03:32 +00:00
Ton Roosendaal
556451345b Bugfix #3583
Auto-IK confused a routine that checked for IK on bones... causing
drawing errors in buttons and 3d window.
2005-12-12 22:27:30 +00:00
Ton Roosendaal
ba237f5170 Bugfix #3565
Enabling FluidSim on non-mesh object crashed... it uses DerivedMesh. :)
2005-12-12 22:04:34 +00:00
Ton Roosendaal
f27350174a Bug #3562
Strips with a repeat fraction (like 3.51) should also "hold" on the
fraction of .51 when indicated so.
Patch provided by Roland Hess, but cleaned up (exisiting) mess a bit too.
2005-12-12 21:56:32 +00:00
Ton Roosendaal
bf412134d4 Bugfix #3556
Unified render didn't treat the alpha for raytraced transparent correct...
unified is based on layering with alpha, so it cannot support alpha in
raytraced transparent correctly.

I'm going to kill unified one day... its giving me headaches. :)
2005-12-12 21:16:24 +00:00
Joseph Gilbert
540e5bb77d *Armature api documentation 2005-12-12 20:12:50 +00:00
Ton Roosendaal
ebfe09a223 Bugfix #3544
First two vertices of a hair strand were not transformed OK, causing weird
results with especially thicker hair, or very short ones.
2005-12-12 19:06:34 +00:00
Joseph Gilbert
9ae9527c51 - Armature/Bone API for python
* this resolves a number of outstanding issues with the armature api and gets this ready for release
- add/remove bones possible
- rolls work correctly now!
- ik'ing to parent should work
- flags for tip/root/bone selection
- etc.
2005-12-12 18:46:26 +00:00
Stephen Swaney
d32b100464 bugfix: #3420 Indent/Unindent in text editor not undoable
contributed by Mr. TextEditor - themyers.  Thanks!
2005-12-12 18:35:15 +00:00
Ton Roosendaal
46c18b3e95 NLA editor, adding actions wasn't possible when amount of actions was over
30, the databrowse option didnt work.

Made popup menu to go to 60 now, in 3 collums max. Databrowse works too
now.

Next commit; check all other databrowsers for it.
2005-12-12 16:29:47 +00:00
Joilnen Leite
c452e8672c Rewrote TimeLine_getFramesMarked func with better coding
.
2005-12-12 11:57:58 +00:00
Ton Roosendaal
d2a3d5e79c Debug commit;
If a group duplicator uses a group with no users, it draws in red. Needed
because this seems to happen in unknown cases...
2005-12-12 09:18:56 +00:00
Alexander Ewering
6c3e8ac2e1 Fix confusing (too early) waitcursor when selecting rand fac for fractal
subdivide.
2005-12-12 03:02:29 +00:00
Ton Roosendaal
7daa8d0bca Sunday merger of orange branch with bf-blender 2005-12-11 23:04:27 +00:00
Ton Roosendaal
51d1b52286 Fix #1 to resolve corrupted NLA files with lib-linked groups.
- If a library became unreadable, with a print like:
  ERROR: can't find lib //../../../../../../..//jorma_light.blend
  Then set the F10 "rt" button to 111. :)
  That will read files with a stripping routine to fix it.

- For lost actions in strips: press Lkey in NLA editor, this is the new
  "re-link action" option. To get it work, dont forget to fill in the
  proper Armature in NKey panel.

The real fix, for the code that corrupted relative paths, will be
part of the bf-blender branch merging, which follows.
2005-12-11 22:54:46 +00:00
Ton Roosendaal
e58eecbea5 Fix: reading library files with option "Relative Paths" set, whilst library
was read already AND relative, caused the path for libraries to corrupt...

Error caused big headaches in studio Orange... :)
2005-12-11 22:03:04 +00:00
Ton Roosendaal
83f8cb0806 Added depsgraph update call on 'add group'. 2005-12-11 18:01:09 +00:00
Ton Roosendaal
d3113b5184 Orange: made duplicators work for dynamic particle systems. Meaning; a
particle generator can be duplicated.

Note that the particles are only generated once, on the original, and just
get duplicated.
For static particles it worked already OK.

Added note for previous grouping commit; group-duplicators should support
fully all animation systems, including modifiers and particles.
2005-12-11 14:28:22 +00:00
Ton Roosendaal
feb14b9b66 Orange: Removed old duplicator stuff from renderconverter.c... 2005-12-11 13:37:05 +00:00
Ton Roosendaal
d7bee8c117 Big commit with work on Groups & Libraries:
-> Any Group Duplicate now can get local timing and local NLA override. This
   enables to control the entire animation system of the Group.

Two methods for this have been implemented.
1) The quick way: just give the duplicator a "Startframe" offset.
2) Advanced: in the NLA Editor you can add ActionStrips to the duplicator
   to override NLA/action of any Grouped Object.

For "Group NLA" to work, an ActionStrip needs to know which Object in a
group it controls. On adding a strip, the code checks if an Action was
already used by an Object in the Group, and assigns it automatic to that
Object.
You can also set this in the Nkey "Properties" panel for the strip.

Change in NLA: the SHIFT+A "Add strip" command now always adds strips to
the active Object. (It used to check where mouse was). This allows to add
NLA strips to Objects that didn't have actions/nla yet.

Important note: In Blender, duplicates are fully procedural and generated
on the fly for each redraw. This means that redraw speed equals to stepping
through frames, when using animated Duplicated Groups.

-> Recoded entire duplicator system

The old method was antique and clumsy, using globals and full temporal
copies of Object. The new system is nicer in control, faster, and since it
doesn't use temporal object copies anymore, it works better with Derived
Mesh and DisplayList and rendering.

By centralizing the code for duplicating, more options can be easier added.
Features to note:

- Duplicates now draw selected/unselected based on its Duplicator setting.
- Same goes for the drawtype (wire, solid, selection outline, etc)
- Duplicated Groups can be normally selected too

Bonus goodie: SHIFT+A (Toolbox) now has entry "Add group" too, with a
listing of all groups, allowing to add Group instances immediate.

-> Library System

- SHIFT+F4 data browse now shows the entire path for linked data
- Outliner draws Library Icons to denote linked data
- Outliner operation added: "Make Local" for library data.
- Outliner now also draws Groups in regular view, allowing to unlink too.

-> Fixes

- depsgraph missed signal update for bone-parented Objects
- on reading file, the entire database was tagged to "recalc" fully,
  causing unnecessary slowdown on reading.

Might have missed stuff... :)
2005-12-11 13:23:30 +00:00
Campbell Barton
e0d20e00ce Added some details in the Mathutils documentation. 2005-12-11 04:20:37 +00:00
Ken Hughes
76e7905736 -- Bugfix #3573: Deleting a scriptlink when some other scriptlinks were no
longer linked to a script would cause a crash.  We now delete all
   scriptlinks which are not linked.
2005-12-10 19:36:05 +00:00
Ken Hughes
080eb9b3fa -- Bugfix #3564: Texture.getImage() always returned None for Env maps, even if
an image was assigned.
2005-12-09 23:19:00 +00:00
Ton Roosendaal
ccb285006c Bugfix #3526
Division with zero caused wrong pixels to be rendered with Ortho camera.
2005-12-09 17:22:50 +00:00
Ton Roosendaal
485dd1d376 Orange; WIP commit for inclusion of "Tangent" vector in rendering.
This first implementation only supports it for Meshes with UV maps, and
only tangents in V direction.

Tangent diffuse:
http://www.blender.org/bf/0001_0080.avi
Tangent spec, diffuse, and bump:
http://www.blender.org/bf/20001_0080.avi

NOTE: since UV coordinates are still very badly subsurfed, this won't work
well for subsurf meshes... on the todo.

On the todo;
- generate tangents for meshes without UV (with some options)
- use tangents from Curve/Surface
- add the Ashkimin shader from tracker

-----

Important bugfix; curves didn't render anymore since yesterday. :)
2005-12-09 15:14:32 +00:00