Commit Graph

27834 Commits

Author SHA1 Message Date
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
Campbell Barton
b0af2b5f3e bug [#25535] proportional editing bug
disable PET when rotating/scaling around face centers to make it more obvious its unsupported.
2011-01-10 06:00:56 +00:00
Campbell Barton
35d261fde0 edit to Ton's recent commit, r34177, only use the far clipping as PET max when not in Ortho view. 2011-01-10 05:40:41 +00:00
Campbell Barton
5feb46d814 callback function ptcache_particle_extra_read() was incorrect type, also fix some other compiler warnings with recent commits. 2011-01-10 05:17:53 +00:00
Campbell Barton
ede0d85522 comment/remove various unused vars,
also make rna function for new images require width and hight args.
2011-01-10 03:58:07 +00:00
Campbell Barton
a9faad8b37 comment unused vars from subsurf code. 2011-01-10 03:55:47 +00:00
Campbell Barton
293c1422de comment dead code from RNA_pointer_create(), was finding the id pointer type when 'id' was set, but not using it.
also comment a few unused vars.
2011-01-10 03:47:03 +00:00
Campbell Barton
91db8f6012 add constraint operator
- report an error if adding a pose constraint with no active pose channel.
- dont run update_pose_constraint_flags() when adding an object constrant to an armature object.
2011-01-10 03:30:27 +00:00
Janne Karhu
d9c6f51ee2 Compiler warning fixes for the same point cache things Joshua tried to fix earlier, don't know why I didn't notice these before. 2011-01-10 02:40:24 +00:00
Janne Karhu
83806d4042 Bug fix: particles dying in collisions could lead to crash in some cases
* Forgot to check for index range in own recent pointcache commit.
2011-01-10 02:20:30 +00:00
Joshua Leung
56db5f10aa Restoring "Pose Markers"
These were markers which belonged to an action instead of the scene,
and are used by PoseLib to keep track of where poses are.

To restore this, I've made this only available in Action/Shapekey
Editor modes, and only when an action is being shown and the "Show
Pose Markers" option in the Markers menu has been enabled. Other than
that, all the standard marker operators apply now (instead of using a
separate set of special operators).
2011-01-09 23:16:05 +00:00
Joshua Leung
3fba5cfe7a Bumping up margin for catching marker events in animation editors.
Old value of 30 px was perhaps a bit too strict, given that scrollbars
took up 16px and that standard icons are 16px, which in total would
have been 32px from the bottom of the region. Having said that, the
marker icons are only about half-size, though it seems that in general
people (can) only aim quite loosely...
2011-01-09 22:37:29 +00:00
Janne Karhu
9231ff4160 Viscoelastic springs for sph particle fluids, original patch by Stephen Whitehorn (chickencoop)
* Viscoelastic springs between the fluid particles can simulate all kinds
  of viscous and elastic substances, such as jelly and honey. This is
  achieved by creating springs dynamically between neighboring particles
  and adjusting their rest length based on stretching/compression.
* This nearly completes the currently intended functionality for particle
  fluids. The last missing thing is a surfacing extraction algorithm,
  which is needed for a proper representation of a sph fluid.
* I also cleaned up and renamed some of the fluid parameters to make the
  ui a bit easier to understand.
* One addition to the patch is an option to use "initial rest length" for
  the springs, which uses the lengths between the particles at the time of
  spring creation as the spring rest lengths instead of interaction radius/2.
  This makes the fluid keep it's original shape better (good for very
  viscoelastic materials), but can create large density differences inside
  the fluid (not really physically correct for a fluid).
* Viscoelastic springs are stored in point cache as extra data.
2011-01-09 19:09:41 +00:00
M.G. Kishalmi
84a464ab62 several cosmetic changes to the node-editor
+ changed lines connecting nodes:
   they now use a linewidth of 1.5px for the light foreground and 4px for the dark background.
   this should fix node-lines not being visible on almost black or all white backdrops.
+ muted nodes now also show a red tinted header if they are hidden (collapsed)
+ both active and selected nodes show a (now properly antialiased) highlighting frame
+ fixed a small error in dropshadow code resulting in a gap at borders
+ fixed a tiny error for the collapsing indicators (triangles) - they were not symmetrical.

Ton will add proper theme colors for the node-editor in the coming days.
2011-01-09 18:59:35 +00:00
Ton Roosendaal
4a8dd84625 Bugfix #25557
Using texture brush in Sculpt, was calling to use "osa tex"
without giving it osa sample vectors. This crashed in using
texture nodes.
2011-01-09 18:43:47 +00:00
Janne Karhu
1786923afc Replace uint32_t in pointcache code with unsigned int as it's supported in dna
* Not strictly necessary right now, but better for future.
* Struct data (only boids at the moment) is now written as structs (with dna) so they work between 64 and 32 bit machines too.
2011-01-09 18:23:41 +00:00
Ton Roosendaal
856d9c9057 Bugfix #25554
Actually a minor tweak: 
Auto-IK fails on correcting for constrainted bones in chains.
For that reason it stops including constrainted bones for it.

Now it does include constraints with influence zero, or which
were disabled by user input.
2011-01-09 17:49:38 +00:00
Campbell Barton
7bc46973d2 script now passes pep8 checking tool. 2011-01-09 17:35:29 +00:00
Campbell Barton
d9c24f7e7c patch from Andrea Rugliancich, dont export locations for bones which are connected to their parents.
note, we could be smarter about not exporting animation channels which are not needed.
2011-01-09 16:46:01 +00:00
Campbell Barton
99a835d482 warning from clang, possible crash:
'cd' could be NULL, all other particle draw types checked 'cd' except for PART_DRAW_AXIS, seems logical to have the check here too.
2011-01-09 15:28:43 +00:00
Campbell Barton
00b8c9e7ea rename BKE_assert() --> BLI_assert(). 2011-01-09 15:12:08 +00:00
Campbell Barton
9cb71d1159 update for change to Matrix class. 2011-01-09 15:09:18 +00:00
Campbell Barton
c9f353956c use PySequence_Size() rather then PySequence_Length(), this is only kept in python for backwards compatibility. 2011-01-09 14:53:18 +00:00