Commit Graph

28425 Commits

Author SHA1 Message Date
Janne Karhu
fed5393043 Fix for [#26053] Blender Crash with Particules Textures
* Particle textures weren't handled properly on texture slot move operations.
2011-02-13 11:45:04 +00:00
Janne Karhu
cc41de09a0 Added an operator warning for missing material & texture in response to [#26051] "Noise" not working. 2011-02-13 11:32:47 +00:00
Campbell Barton
0955c664aa fix for warnings from Sparse static source code checker, mostly BKE/BLI and python functions.
- use NULL rather then 0 where possible (makes code & function calls more readable IMHO).
- set static variables and functions (exposed some unused vars/funcs).
- use func(void) rather then func() for definitions.
2011-02-13 10:52:18 +00:00
Sergey Sharybin
f3bd89b1b7 Related to #26061: Camera does not appear selected in outliner when it is
Draw higlighting circle for active camera in outliner
2011-02-13 10:34:24 +00:00
Sergey Sharybin
dfb1395fa5 Fix #26064: blenderplayer is broken
This changes were forgotten in svn rev34810. Should work fine now.
2011-02-13 10:28:40 +00:00
Sergey Sharybin
9ac8c5315e Fix #26059: select_vertex_path fails when vertices aren't selected 1 by 1 in gui
Cicrcle and border selection doesn't add entry to EditSelection. Use cycle
through vertices rather than EditSelection stack to find two selected vertices.

No slowdown for case two vertices are selected (use this cycle to clear temporary
flag too), minor slowdown for unsupported selections.
2011-02-13 10:25:12 +00:00
Joshua Leung
90f543ba3a Reverting part of 34810
The changes here were breaking old rigs, for example the right eyeball
in the Sintel rig (which uses the Mirror Modifier and its vertex-group
mirroring functionality)
2011-02-13 07:39:43 +00:00
Joshua Leung
51d78b43de Fixing compiling on windows 2011-02-13 06:19:15 +00:00
Campbell Barton
867fc4b463 enforce string limits (reported by pedantic checking tools & some developers).
mostly replace strcpy with BLI_strncpy and multiple strcat's with a BLI_snprintf().
also fix possible crash if CWD isnt available.
2011-02-13 03:21:27 +00:00
Campbell Barton
9e03a0d476 remove unused var 2011-02-13 02:55:23 +00:00
Campbell Barton
93f061fac3 wrong length used with strncmp when comparing RNA path. 2011-02-13 01:59:16 +00:00
Janne Karhu
373fea6662 Small update for billboards:
* Renamed the old split uv's animate option "time" to "age" and added a new option to change the used split frame by frame. These are good changes were suggested/implied by Hannu Hoffren over 3 years ago in his tutorial video! (oh my how time flies)
* Also cleaned up the billboard ui quite a bit. For example now the uv channels can be properly chosen from the existing channels.
2011-02-12 23:25:03 +00:00
Janne Karhu
54b2127fad Fix for [#25857] create_dupli_list incorrect behaviour with particle systems
* Particle duplis are now always created with render percentage if G.rendering is set.
* This is not yet a perfect solution (hair for example won't yet work correctly), but
  it's good to have even partial functionality here until a proper way to handle this
  is implemented.
2011-02-12 21:54:50 +00:00
Janne Karhu
0a83817672 Small particle effectors update:
* Greetings from farsthary: particle rotation is now taken into account for particle effector direction.
** This gives all kinds of new possibilities as he shows in his blog http://farsthary.wordpress.com/2011/02/08/vortex-particle-simple-tut/.
**The only modification I made to his patch was to use the actual rotated particle direction as the effector direction as this defaults to the particle velocity vector, so no actual new options are needed.
* I also added an "effector amount" setting for particle effectors so that only a part of the particles can be considered as effectors. This makes it possible to create simple "farsthary vortexes" with only one particle system.
* Also some tiny reorganization of the falloff min/max values for a nicer ui.
2011-02-12 17:54:24 +00:00
Sergey Sharybin
d909e61d99 Sculpting on deformed mesh
==========================

Removed limitation of armatured-only objects for sculpting -- now all
deformation modifiers are allowed in sculpt mode. Use crazyspace corrections
like from transformation modules was used to support all deformation modifiers.

Internal change: all crazyspace-related functions were noved to crazyspace.c

P.S. Brush could make quite unexpected deformation for meshes which are
     deformed in specified way. Got patch for this and discussing with Brecht
	 if it's really needed or maybe it could be done in better way.
2011-02-12 17:51:02 +00:00
Sergey Sharybin
673ac43f2e Save one memory block allocation/disposing when propagating changes from
deformed PBVH to the base mesh.

It's not real bottleneck, but crazyspace corrections looks nicer now.
Real bottleneck is normals re-calculation, which calls plenty of
fsqrt's. We could avoid this for some modifiers (which don't use
normals), but such checking would make code less controllable.
2011-02-12 17:28:37 +00:00
Campbell Barton
55f68c3657 fix for more warnings.
- modifier code was using sizeof() without knowing the sizeof the array when clearing the modifier type array.
- use BLI_snprintf rather then sprintf where the size of the string is known.
- particle drawing code kept a reference to stack float values (not a problem at the moment but would crash if accessed later).
2011-02-12 16:54:24 +00:00
Janne Karhu
9eee1f962d Warning fix to my previous commit. Thanks to nazg-gul for noticing! 2011-02-12 16:06:27 +00:00
Mitchell Stokes
62602c797d Fixing a recounting bug so KX_Scene.pre_draw.append() and KX_Scene.post_draw.append() work. 2011-02-12 15:44:09 +00:00
Janne Karhu
fafbd9d71b Particles todo item: particle textures
* Effecting particle properties with textures was possible in 2.49,
  but not in 2.5 anymore.
* Now particles have their own textures (available in texture panel
  for objects with particle systems), which are totally separate from
  the material textures.
* Currently a basic set of particle properties is available for
  texture control. Some others could still be added, but the whole
  system is not intended as an "change anything with a texture" as
  this kind of functionality will be provided with node particles in
  the future much better.
* Combined with the previously added "particle texture coordinates"
  this new functionality also solves the problem of animating particle
  properties through the particle lifetime nicely.
* Currently the textures only use the intensity of the texture in
  "multiply" blending mode, so in order for the textures to effect
  a particle parameter there has to be a non-zero value defined for
  the parameter in the particle settings. Other blend modes can be
  added later if they're considered useful enough.
2011-02-12 14:38:34 +00:00
Campbell Barton
c8c86aa6a1 - fix leak on STL loading if realloc fails.
- transform code was using sprintf reading and writing the same string (undefined behavior).
- softbody had unneeded NULL check.
2011-02-12 14:25:54 +00:00
Campbell Barton
6e47ffcc0d fix for uninitialized value in BLI_path_cwd() if PWD wasn't defined and the CWD was longer then 160. 2011-02-12 10:37:37 +00:00
Campbell Barton
9e9e028f05 access past array bounds in layerInterp_mdisps, also make some vars const. 2011-02-12 10:18:21 +00:00
Campbell Barton
3396f73c17 fix for possible (but unlikely) problem with strncpy not adding \0 and then extending the string with strcat. use BLI_snprintf instead. 2011-02-12 09:58:28 +00:00
Campbell Barton
5af9e5fda9 - resource leak in pointcache, opendir without closedir()
- reading pointcache was using an incorrect, always NULL variable.
- commented NDof code, was giving warnings and isnt used now.
2011-02-12 09:09:52 +00:00
Campbell Barton
e70ca00f71 - move keyingsets_utils.py into modules.
- add gplv2 header
- define __all__ so when importing '*' it wont being in locally defined vars.
2011-02-12 08:12:00 +00:00
Campbell Barton
9bd57cd302 update templates for registration changes 2011-02-12 08:04:32 +00:00
Campbell Barton
0a4eb24ca0 fix for building with opencollada 833 on linux. 2011-02-12 06:25:04 +00:00
Campbell Barton
92672d0c1c quiet some clang warnings. 2011-02-12 05:12:26 +00:00
Campbell Barton
5470a7af5d render stats_background() was giving clang warning about unused argument and wasn't checking for buffer overrun (though this would be very unlikely).
write to the stdout directly rather then building a string and writing that. (no functional change).
2011-02-12 01:02:21 +00:00
Guillermo S. Romero
6554ae1460 SVN maintenance. 2011-02-11 19:36:58 +00:00
Ton Roosendaal
8e7a61b1c4 Bugfix #26021
On certain buttons, and only when not in triple buffer, pressing
RMB "Add shortcut" crashed Blender. NULL check missing.
2011-02-11 18:29:52 +00:00
Sergey Sharybin
91b967c79a Fix #26039: Relative Shapkeys have wrong coordinates after inserting vertices
There was invalid memory access for newly created vertices.
Added checking of keyindex value when calculating verticies offsets.
2011-02-11 17:56:25 +00:00
Sergey Sharybin
7f5dbb7de0 Fix #26040: Crash converting curve to mesh
Really stupid mistake :)
2011-02-11 17:43:56 +00:00
Sergey Sharybin
f9fb95b9c1 Made some function from DerivedMesh.c be avaliable from other modules.
Some naming changes to make naming more uniform. No functional changes.

It's necessery for further crazyspace changes and improvenments.
2011-02-11 15:15:35 +00:00
Janne Karhu
dcf7642f76 Bug fix for problem 2 in [#25973] Bake End Frame Not Configurable
* External caches didn't load for smoke straight away. Smoke caches store all necessary info in every file, so no need to try to look for an info file.
2011-02-11 14:59:19 +00:00
Campbell Barton
c50bf404d2 patch [#25978] mathutils fixes for bpy_types.py and vertexpaint_dirt.py
from Filiciss Muhgue (filiciss)
2011-02-11 12:30:17 +00:00
Campbell Barton
875f554cff patch [#26030] Debian spec fix (Patch for #26028)
from Shinsuke Irie (irie)
2011-02-11 10:29:47 +00:00
Lukas Toenne
69e72ea427 Removed the internal_select parameter from ntreeCopyTree. This was used just in one place when duplicating nodes, which is not an actual copying of the tree. The node duplicate operator now copies selected nodes itself. 2011-02-11 09:37:58 +00:00
Campbell Barton
a3d142fce0 update pacman spec for newer python and match naming convention to debian spec.
also pre-compile python modiles.
2011-02-11 09:28:11 +00:00
Lukas Toenne
9fea58ca91 Made group label callback function static. 2011-02-11 07:46:06 +00:00
Campbell Barton
7f6946d4f7 add torus script wasnt registering. 2011-02-11 03:42:36 +00:00
Campbell Barton
65b922ad88 cls.is_registered() class method for python subclasses of internal types.
Synonymous with ('bl_rna' in cls.__dict__)
2011-02-11 02:40:14 +00:00
Campbell Barton
17efeb310d bpy.utils.register_module() generator could go into eternal loop. 2011-02-11 01:27:00 +00:00
Campbell Barton
2f4f046b6f UI functions added to existing UI classes (operators adding their own menus for eg),
would stop the entire menu from drawing if they raised an exception.

now print the exception and continue.

Also added a verbose argument for bpy.utils.(un)register_module() to help test whats being registered.
2011-02-11 01:12:01 +00:00
Campbell Barton
b1cdf5c344 use weak references for the internal metaclass typemap,
this should help with blender leaking memory with python classes though the bug is still not fixed.
2011-02-11 00:39:07 +00:00
Campbell Barton
fb8c135584 minor python register changes.
- KeyingSetInfo classes are now collected like Panels, Operators etc so bpy.utils.register_module() can be used.
- move bpy.types.register() to bpy.utils.register_class
2011-02-11 00:11:17 +00:00
Dalai Felinto
8fd81ab9e6 BGE: frame start/end in action/fcurves/shapekey to support floats
after discussion over the mailing-list it seems that it really makes no sense to restrict that. Specially since we have the "Property" playback mode that usually will be a float.

Since there is no need for do_version or whatoever I don't see a problem. Any Thoughts? Maube to allow it only through the Python API?
2011-02-11 00:03:26 +00:00
Campbell Barton
4612034cf4 patch [#25809] Auto-Registration as utility function.
This removes auto-registration, committed by Martin r30961.
Realize this is a contentious topic but Brecht and myself both would rather opt-in registration.

TODO:
- addons need updating.
- class list will be modified to use weakrefs (should have been done for existing system too).
- will move bpy.types.(un)register functions into bpy.utils.(un)register_class, currently including these functions in a type list is internally ugly, scripts which loop over types also need to check for these.
2011-02-10 23:48:22 +00:00
Lukas Toenne
46bb5643b7 Different method for blur node aspect correction. Now the user can still set different sizes for x/y blurring in relative mode, but choose to use aspect correction on either of the axes. 2011-02-10 20:54:02 +00:00