Commit Graph

28056 Commits

Author SHA1 Message Date
Campbell Barton
0384be9644 bugfix [#25595] Adding Torus when in edit mode strange behavior.
also added Align View option and made local view cursor work.
2011-01-12 15:45:00 +00:00
Campbell Barton
70fefd81ea fix [#25600] Cannot add meta-object when in edit-mode 2011-01-12 14:08:11 +00:00
Janne Karhu
4e15c169c6 Fix for [#25572] crash when changing vertex group density in particle mode
* Hair was freed & redone on changes, but particle mode data wasn't updated.
2011-01-12 10:01:33 +00:00
Nathan Letwory
4043830cf8 fix compile error for MSVC; no va_copy here. Patch pasted to me by Keith Boshoff 2011-01-12 10:00:47 +00:00
Campbell Barton
792bf1535f add x3d/vrml importer into the menu. 2011-01-12 08:20:09 +00:00
Campbell Barton
ac64114d1b vrml/x3d import
now its basically usable, next step is to add menu item.

update for changes in mathutils api.
- fix radians/degrees usage
- correct matrix multiplication order
- primitives were being imported twice the size they should be.
- uv transformations were not working.
2011-01-12 08:02:27 +00:00
Campbell Barton
eba91f8e81 modification to Joshua's commit r34270,
replace NlaTrack.active() function with a property, since this is used everywhere else.
2011-01-12 07:16:24 +00:00
Campbell Barton
baaaceb3eb comment array/collection skip(), since there was some confusion in this area which caused bugs on index lookups. 2011-01-12 06:16:15 +00:00
Campbell Barton
9a70c609e0 BLI_dynstr_vappendf() was cutting off the last character when allocating strings. 2011-01-12 06:01:07 +00:00
Campbell Barton
e2e5361eb2 BLI_dynstr_vappendf() was crashing with strings above 256 chars, this happens with some long reports.
Problem was using va_list value more then once, fix by using va_copy().

Note, va_copy() is c99 spec but only alternative I can see is to turn BLI_dynstr_vappendf() into a macro which calls va_start/end inline.
2011-01-12 05:49:33 +00:00
Campbell Barton
63018144ba remove redundant assignments & unused vars.
also minor functional changes
- OBJECT_OT_make_links_data() type property is now assigned to the operator property (so popup menu can find it)
- removing BG image now returns cancelled if no image is removed.
2011-01-12 03:41:12 +00:00
Joshua Leung
21fc4cabaf Patch [#25409] Changes to panels header "open/close" and "drag" zones
Submitted by: Peter Tarasenko (pit)

This patch switches the screen real-estate given to the "open/close"
and "drag" zones for panels.
- Now, the entire header is used for resizing (open/close) panels
instead of just the triangle widget being used for this. This makes it
a larger target for clicking on, making it easier to do so (Fitt's Law
in action!)
- Dragging panels now is relegated to the "grabber" zone on the top-
right corner only now. This reflects the lesser importance of panel
reordering in the panel designs now over being able to open/close
them.
2011-01-12 02:15:38 +00:00
Joshua Leung
bbdf47aa0b Patch [#24808] B-Bone display size
Submitted by Dan Eicher (dna)

Adds the ability to resize b-bones (ctrl+alt+S) using the python api

Bone.bbone_x
Bone.bbone_z
2011-01-12 01:36:12 +00:00
Joshua Leung
610a759ecc Patch [#24763] NLA Track & Strip methods
Submitted by: Dan Eicher (dna)

<quote>
Adds:

AnimData.nla_tracks.new(prev)
* (optional) prev -- add new track after this track

AnimData.nla_tracks.remove(track)

AnimData.nla_tracks.active(track)
* (optional) track -- track to set active
* returns active track

NlaTrack.strips.new(name, start, action)
NOTE: fails if the strip can't fit in the track as opposed to the
operator which will create a new track and add the strip to that.
* name -- name for new strip
* start -- start frame of new strip
* action -- action to assign to strip

NlaTrack.strips.remove(strip)
</quote>

---

I've resolved the issue (noted in the original patch) regarding the
validation of the created strip by creating and using a "dummy
AnimData" block to solve the missing dependencies.
2011-01-12 01:17:13 +00:00
Joshua Leung
144fb8ed1f "Pointer" properties can now be reset to some kind of "default" value
when using the Numpad0 feature to reset properties to their default
values.

While this implementation here is not a full/proper implementation, as
you cannot truly specify a default value for some pointers that may
require something other than NULL (i.e. nothing), this should be good
enough for the vast majority of (editable) cases which are fine if set
to NULL.

This is most noticeable with the Active Keying Set field in the
TimeLine header, where it's now possible to simply use Numpad0 to
clear it instead of using a confusing click+backspace+enter dance to
do the same thing.
2011-01-11 22:32:18 +00:00
Sergey Sharybin
37b903e32c Fix #25594: Adding mesh while in edit mode with multires - crash.
That primitives, which used ri crash blender, flips normals just after creation
and this normals flipping calls layers interpolation, but MDISPS layer
contains no data still.

Just added checking to layerInterp_mdisps.
2011-01-11 22:06:44 +00:00
Joshua Leung
0a535feef6 More missing descriptions for operators 2011-01-11 21:46:11 +00:00
Joshua Leung
f5929ced95 Gave all armature operators descriptions (for tooltips and API
reference docs)
2011-01-11 21:37:23 +00:00
Joshua Leung
19c02ae981 Added operator to show all armature layers (similar to the 3D View
"Show All Layers"). This has been mapped to Ctrl-Accentkey

If necessary, you can alter your keymaps so that this operator is
invoked with its "all" property disabled. This will only toggle the
first row (first 16) layers, which is useful in most rigs for only
enabling all the layers with rig controls and not showing the layers
with rig mechanics.
2011-01-11 21:12:48 +00:00
Ton Roosendaal
f7611b0fd3 Bugfix #25580
Raytracing didn't show soft shadow in reflections, nor did it do any
derivative even. Added a basic version for it in raytracer now, still
needs improvement on heavily curved surfaces. But it's better!

Examples:

Glass sphere, mirror cube and sphere, look how it ignores bump and shadow
http://www.blender.org/bf/derivative256.png

in svn now:
http://www.blender.org/bf/derivative-svn.png
2011-01-11 18:40:44 +00:00
Campbell Barton
1d4f1d2e41 bugfix - collection index lookups was not working correctly when some items were skipped. 2011-01-11 17:01:12 +00:00
Campbell Barton
c603fa9f7d revert own recent fix for collection length, this is incorrect, the bug needs to be fixed elsewhere. 2011-01-11 14:39:14 +00:00
Ton Roosendaal
52a470041e Bugfix #25581
Pressure sensitivity for Sculpt 'strength' got lost in code cleanup.
Added warning in code, the function call is confusing.
2011-01-11 14:01:23 +00:00
Campbell Barton
8397e3e476 continued x3d/vrml import update from 2.4x version
- parsed over 1000 vrml test files
- animataion import works again
- importing curves works again
2011-01-11 13:42:22 +00:00
Ton Roosendaal
d1b14e7878 Bugfix, own testing
When pressure was zero, a sculpt brush was still being executed
with step amount divided by zero, and thus entering eternal loop.

Maybe tablet-specific this but I wonder how this never got reported...
2011-01-11 12:36:49 +00:00
Joshua Leung
4134e4f3ae Adding script template for adding Builtin Keying Sets 2011-01-11 11:25:24 +00:00
Joshua Leung
7225efeba0 - Added operator to clear all transforms from Pose Bones. This makes
it easier to reset a rig to its default pose again
- Refactored clear pose operators to separate out the common parts,
and made sure that they all had descriptions
2011-01-11 11:09:37 +00:00
Campbell Barton
8d385404ab bugfix [#25542] do not work? "Bind camera to Markers" 2011-01-11 10:00:21 +00:00
Campbell Barton
ca3d4052de py/mathutils fix for eternal loop with Matrix.Rotation().
rotation range clamping used a while loop which would run forever when the value was so big subtracting a full revolution didnt change the value.

Solve by using fmod() and double precision angle.
2011-01-11 09:41:26 +00:00
Campbell Barton
5bcee8cd0a remove misc unused vars and correct theme name for face angles. 2011-01-11 07:40:31 +00:00
Campbell Barton
fded5e5ce5 comment/remove unused vars from particle and multires code.
also remove calls to dm->getFaceDataArray() within a loop for particle grid distribution,
instead call this once at the start and reuse the result.
2011-01-11 07:38:16 +00:00
Campbell Barton
37420b2cf2 use size clamped string copying,
also some compilers complain of using sprintf(val, str) so replace with BLI_strncpy().
2011-01-11 05:58:47 +00:00
Campbell Barton
94f1e8df79 change rna function action.fcurves.add() so options an enum flag rather then booleans.
(rna flags were not available when this was originally written)
 action.fcurves.add(frame, val, 1,1,1) --> .add(frame, val, {'REPLACE', 'NEEDED', 'FAST'})
2011-01-11 04:52:17 +00:00
Campbell Barton
1b9c56c423 bugfix [#25577] Ctrl-Z after adding Color Ramp key resets ramp.
buttons would not add an undo event if the button had no tooltip/draw-string.

 add a fallback string 'Unknown Action' so undo's are predictable.
2011-01-11 03:22:37 +00:00
Campbell Barton
22577d98c9 initial x3d/vrml importer port from 2.4x.
some files import now.
- no animation support yet
- no rad/deg conversion changes from 2.4x
- matrix multiplication still needs switching.
2011-01-11 02:49:01 +00:00
Campbell Barton
35e68e9785 - bpy.data.lamps.new() now takes a type argument since lamp type also sets class type this avoids needing to use ugly lamp.type_recast() after changing type.
- default vertex color layer name was UTTex when added from python.
2011-01-11 02:30:01 +00:00
Joshua Leung
d72639323b "New Action" Operator:
When creating new actions using the "new" button the Action Editor
header databrowse, or the NLA editor's "Animation Data" databrowse,
the existing action will get copied (if it exists) instead of an empty
action getting added everytime.

Apparently this behaviour is very good for being able to "version"
actions within a single .blend file (Bassam?)
2011-01-11 00:39:59 +00:00
Campbell Barton
571ad40e48 tag unused vars. 2011-01-11 00:21:43 +00:00
Nathan Letwory
dbb67b4d4c Fix [#25575] Collada import problem with Maya2010 exported collada files
Reported by Morten Mikkelsen

It seems that the maya export may generate invalid joint UIDs. Skip these joints to prevent crash.
2011-01-10 23:31:14 +00:00
Joshua Leung
ac4eb52abf - Local Markers are now taken into account correctly for operators
that used markers. I might've missed a few still, but at least a few
more cases will work now
- Accidentally broke keyframe selection on group channels in gpencil
commit, after misreading a call name.
2011-01-10 22:31:34 +00:00
Joshua Leung
cf25b10eb5 Todo #22395: Restoring Grease Pencil Editing Mode in DopeSheet Editor
This commit restores some basic functionality for retiming Grease
Pencil sketches. Some of the functionality that existed before still
hasn't been restored (namely snap/mirror tools as well as copy+paste),
though it should be possible to use this for basic retiming and
sketch-frame management again.

- There's still a lot of work required to get this up to the standard
of the rest of the animation editor code, as some of this code was
originally just hacked in based on the old-style code.
- Work is already required to not have to directly access the main db
global to get the list of Grease Pencil datablocks to show, but that
can come along with pending cleanups of the filtering code.
2011-01-10 22:10:28 +00:00
Guillermo S. Romero
d841a20631 SVN maintenance. 2011-01-10 21:30:14 +00:00
Campbell Barton
795ca28a82 action paste properties were assigned to copy operator instead. 2011-01-10 17:48:38 +00:00
Campbell Barton
dd69f1968e rna collection sizes for face data layers were invalid.
This meant python could do...
  mesh.uv_textures[0] 
...on a mesh with 1 vertex color layer instead.
2011-01-10 17:46:34 +00:00
Campbell Barton
bfcea85c6f x3d import now passes pep8 checker 2011-01-10 13:56:14 +00:00
Campbell Barton
ff204a1e4d x3d import tabs -> spaces 2011-01-10 13:16:04 +00:00
Campbell Barton
f5c203af73 copy x3d/vrml importer from blender 2.4x.
svn cp https://svn.blender.org/svnroot/bf-blender/branches/blender2.4/release/scripts/import_web3d.py release/scripts/op/io_scene_x3d/import_x3d.py
2011-01-10 13:11:56 +00:00
Luca Bonavita
3b413b6fa8 [bugfix] Curve tilt button in 3d toolbar showing wrong shortcut
Added Ctrl-T to Curves Tilt button in the toolbar (edit mode), currently was reporting Alt-S for tilt
(reported by Rickyx here http://www.kino3d.com/forum/viewtopic.php?f=21&t=8485&start=0)

Also added the label "Tilt" to the tilt transform in the Curve > Control points header submenu, currently was just "Transform"
2011-01-10 12:50:46 +00:00
Janne Karhu
dab4ffa85b Bug fix: effectors in pre 2.5 files didn't work due to a forgotten flag in do_versions. 2011-01-10 11:53:07 +00:00
Joshua Leung
1b19ffb8c7 "Available" Keying Set bugfix:
This builtin Keying Set is supposed to insert keyframes for every
F-Curve that exists for the selected data (usually objects and/or
bones only). However, as coded, it was only useful for objects, since
it would just go through all the F-Curves for the object's action,
instead of just the F-Curves relevant to a selected bone.

Tweaked the code to make this case (and similar ones) hopefully work
better by default.
2011-01-10 10:22:08 +00:00