blender.git
8 years agosphinx doc gen: multiple examples possible and include the scripts docstring inline...
Campbell Barton [Wed, 16 Feb 2011 17:31:04 +0000 (17:31 +0000)]
sphinx doc gen: multiple examples possible and include the scripts docstring inline in sphinx.
also tag unused vars

8 years agoBugfix #26103
Ton Roosendaal [Wed, 16 Feb 2011 12:34:08 +0000 (12:34 +0000)]
Bugfix #26103

Halo texture: disabling texture slot with [] button didn't work.

Note: halos only allow 1 texture slot, UI allows to add more. This
rna template stuff for texture slots I rather don't touch though...

8 years agoMarker Drawing Bugfix:
Joshua Leung [Wed, 16 Feb 2011 12:00:53 +0000 (12:00 +0000)]
Marker Drawing Bugfix:

Removed superfluous blend-mode change which was causing some weird
white lines to appear, especially when using some markers that don't
have any names.

8 years agoFix for [#26102] Particle Texture mismapped on Multires (in some modes)
Janne Karhu [Wed, 16 Feb 2011 11:38:28 +0000 (11:38 +0000)]
Fix for [#26102] Particle Texture mismapped on Multires (in some modes)
* Particle modifier didn't check for particle textures using uv-coordinates properly.

8 years agoForgot to actually hook up this operator...
Joshua Leung [Wed, 16 Feb 2011 11:28:25 +0000 (11:28 +0000)]
Forgot to actually hook up this operator...

8 years agoParticle settings can now be pinned too:
Janne Karhu [Wed, 16 Feb 2011 10:57:58 +0000 (10:57 +0000)]
Particle settings can now be pinned too:
* Particle system's are comparable to texture slots, which can
  only exist within an id block. Particle settings on the other
  hand are idblocks which should be pinnable just like textures.
* When particle settings are pinned only properties that make
  sense without the actual particle system are shown in the
  particle panel.

8 years agoAdded full texture idblock controls for displace and wave modifier.
Janne Karhu [Wed, 16 Feb 2011 10:23:27 +0000 (10:23 +0000)]
Added full texture idblock controls for displace and wave modifier.

8 years agoCorrect texture pinning:
Janne Karhu [Wed, 16 Feb 2011 10:22:19 +0000 (10:22 +0000)]
Correct texture pinning:
* Now texture pinning works consistently for all textures.
* The only problem is that there is no way to pin textures if there are
  no textures in the context path, so it's for example impossible to pin
  the texture of a displace modifier without adding a texture somewhere
  else and selecting that texture first. I my opinion this is quite
  counter productive so perhaps a dedicated "only textures" texture
  context option is needed after all.

8 years agoenum-flag arguments were incorrectly documented.
Campbell Barton [Wed, 16 Feb 2011 10:19:14 +0000 (10:19 +0000)]
enum-flag arguments were incorrectly documented.

8 years agoBugfix [#22535] Dupliframes with keyframe Anim are broken
Joshua Leung [Wed, 16 Feb 2011 09:59:29 +0000 (09:59 +0000)]
Bugfix [#22535] Dupliframes with keyframe Anim are broken

So, it turns out that dupliframes weren't that bad to restore... the
old version didn't do truly accurate transform freezing as it didn't
update ancestors too. However, as a modelling tool, this will probably
suffice.

8 years agoThe modifications in mkktspace broke compilation on gcc 4.2.x
M.G. Kishalmi [Wed, 16 Feb 2011 08:49:27 +0000 (08:49 +0000)]
The modifications in mkktspace broke compilation on gcc 4.2.x
This is a patch proposed by sparky_ on irc.

8 years agoPoseLib Bugfixes, Cleanups, and Missing Operators
Joshua Leung [Wed, 16 Feb 2011 06:18:20 +0000 (06:18 +0000)]
PoseLib Bugfixes, Cleanups, and Missing Operators

* All the various index-related issues should finally be sorted now.
It seems you cannot just partially implement some of these active
index getter/setters...
* Standardised the call used by PoseLib operators to get the Object
from which they get the active PoseLib data from
* PoseLib operators which require some existing data to work now use a
poll() which checks for this
* Added back the operator used to make standard actions into ones
usable by PoseLib
* Added a dummy operator for the apply active pose button which really
just calls the same backend functions as "Browse Interactive", but
which has a nicer frontend (naming + description) for the purpose of
being used in this way
* Also, removed some useless code from here

8 years agodoc generation support for excluding some modules, without this a full rebuild takes...
Campbell Barton [Wed, 16 Feb 2011 05:18:10 +0000 (05:18 +0000)]
doc generation support for excluding some modules, without this a full rebuild takes too long to test changes.
also include own function definitions for blf_dir.c.

8 years agofix from mikes for building on apple with gcc 4.2.1
Campbell Barton [Wed, 16 Feb 2011 05:03:33 +0000 (05:03 +0000)]
fix from mikes for building on apple with gcc 4.2.1

8 years agorename IDPropertyGroup to PropertyGroup
Campbell Barton [Wed, 16 Feb 2011 02:51:56 +0000 (02:51 +0000)]
rename IDPropertyGroup to PropertyGroup
also renamed IDProperty to PropertyGroupItem (these are not referenced for common usage and we already have 'Property' defined).

8 years agobugfix [#26094] Going to Bone Roll menu brings up python error
Campbell Barton [Wed, 16 Feb 2011 02:25:03 +0000 (02:25 +0000)]
bugfix [#26094] Going to Bone Roll menu brings up python error
also correct for pep8 warnings.

8 years agoFix for compiler warning: forgot to hook up a poll callback I defined
Joshua Leung [Wed, 16 Feb 2011 02:10:26 +0000 (02:10 +0000)]
Fix for compiler warning: forgot to hook up a poll callback I defined
for unlinking PoseLib data

8 years agoPoseLib UI and Bugfixes:
Joshua Leung [Wed, 16 Feb 2011 02:05:41 +0000 (02:05 +0000)]
PoseLib UI and Bugfixes:
- Added operator button to show the current pose. This runs on top of
the interactive pose browse functionality, so the tooltip may be a bit
obtuse...
- Specifying a pose for the Pose browse functionality to set now works
correctly. Previously, some old depsgraph hacks were actually
interferring with correct updating (only the armature updated
correctly, but deforms didn't occur)
- Fixed a case of accessing freed memory, which I'm surprised no
static checkers have reportedly picked up on yet, or that nobody has
really had issues with (probably due to low memory "turnaround" so
far)

8 years agofix [#26098] python API: quaternion.rotate never seems to work.
Campbell Barton [Wed, 16 Feb 2011 02:05:36 +0000 (02:05 +0000)]
fix [#26098] python API: quaternion.rotate never seems to work.

8 years agoUgly hack to get PoseLib UI working ok (problem mentioned in log for
Joshua Leung [Wed, 16 Feb 2011 01:46:32 +0000 (01:46 +0000)]
Ugly hack to get PoseLib UI working ok (problem mentioned in log for
r34883).

Full description:
When defining an operator button in the UI layout code, trying to set
the value for such an operator's enum properties, where said enum uses
a dynamically generated list of items (which depends on using context
info), will "fail". No context info will be passed to the callbacks
used to generate this list of items, as PROP_ENUM_NO_CONTEXT is still
set on the operator properties (it seems these will only get cleared
when the operator actually runs, which is far too late already for
this usage) so RNA_property_enum_items() will pass NULL instead of a
context pointer *even* when one exists!

I'm not sure of why we even need this flag. It seems to have caused a
few other rounds of problems already, from quick searches I did on
this matter...

8 years agoBugfix: Browing Pose Libs should work now... RNA wrapping was missing
Joshua Leung [Wed, 16 Feb 2011 00:19:54 +0000 (00:19 +0000)]
Bugfix: Browing Pose Libs should work now... RNA wrapping was missing
an "editable" flag there

8 years agoPose Lib: Start of PoseLib UI in Armature buttons
Joshua Leung [Wed, 16 Feb 2011 00:17:22 +0000 (00:17 +0000)]
Pose Lib: Start of PoseLib UI in Armature buttons

This presents a UI from which PoseLibs can be assigned/removed from
Objects. From here, it is also possible to see the list of poses and
add/remove poses from this list.

Known Issues:
- [Py/RNA/Operators BUG ALERT!] If after immediately starting Blender
you try to remove a pose from the PoseLib using the UI buttons, you'll
get a an error the first time you do so (but not for subsequent
attempts). This seems to be caused by the "pose" enum (dynamically
generated) of the POSELIB_OT_pose_remove operator, which does not seem
to be getting initialised when the operator's exec gets called without
the invoke having been called previously
- Changing the active Pose Library still seems to be broken (to be
fixed soon)

Todos:
- Operator button to make the selected pose get shown in the 3d view
- Restore the "validate action" operator and add that to this panel
- Rename pose access

8 years agosmall correction to BGE as recent commits broken normal mapping in the GE
Michael Fox [Wed, 16 Feb 2011 00:04:37 +0000 (00:04 +0000)]
small correction to BGE as recent commits broken normal mapping in the GE

8 years agoFix from sparky for compile problem with older GCC
Nathan Letwory [Tue, 15 Feb 2011 19:57:33 +0000 (19:57 +0000)]
Fix from sparky for compile problem with older GCC

8 years agoremoved some more magic constants
Lukas Steiblys [Tue, 15 Feb 2011 19:22:08 +0000 (19:22 +0000)]
removed some more magic constants
another fix: the patch for #25806 was submitted by Riakiotakis Antonis and not by Andrew Wall

8 years ago- Do not use old anchor toggling operator. It used to set brush flags to
Sergey Sharybin [Tue, 15 Feb 2011 19:19:36 +0000 (19:19 +0000)]
- Do not use old anchor toggling operator. It used to set brush flags to
  unawaliable state.
- Also changed dynamic space bar menu, so it now also wouldn't allow to
  set brush stroke flags to unavaliable state.

Also tried to remove use_anchor, use_space, use_restore_mesh and
use_airbrush, so user would be unable to set flags to unavaliable state,
but it was quite difficult for non-sculpt paint modes. They don't support
all of stroke methods, so brush.stroke_method can't be used for them.

Keep this area unchanged for now.

8 years agopatch from IRIE Shinsuke, use systems openjpeg on *nix.
Campbell Barton [Tue, 15 Feb 2011 19:04:51 +0000 (19:04 +0000)]
patch from IRIE Shinsuke, use systems openjpeg on *nix.

8 years agoadded more code comments and removed some magic constants
Lukas Steiblys [Tue, 15 Feb 2011 19:04:00 +0000 (19:04 +0000)]
added more code comments and removed some magic constants

8 years agoa fix for bug #25806
Lukas Steiblys [Tue, 15 Feb 2011 18:36:42 +0000 (18:36 +0000)]
a fix for bug #25806
http://projects.blender.org/tracker/index.php?func=detail&aid=25806
Thanks Andrew Wall for the report and the patch

8 years agoCPack packaging support from Dan Eicher, tested to build redhat RPM's, a Mac bundle...
Campbell Barton [Tue, 15 Feb 2011 18:33:05 +0000 (18:33 +0000)]
CPack packaging support from Dan Eicher, tested to build redhat RPM's, a Mac bundle also defined.

8 years agomenu to select an enum from an RNA path:
Campbell Barton [Tue, 15 Feb 2011 18:12:41 +0000 (18:12 +0000)]
menu to select an enum from an RNA path:
eg,
   bpy.ops.wm.context_menu_enum(data_path="scene.tool_settings.vertex_paint.brush.stroke_method")

This saves us defining operators only for menus.

8 years ago- Use the same logic as for BEZIERs when making segment of between
Sergey Sharybin [Tue, 15 Feb 2011 16:37:44 +0000 (16:37 +0000)]
- Use the same logic as for BEZIERs when making segment of between
  first and last NURBS' control points (toggle cyclic flag)
- Show U/V selection menu only for surface objects. There's no
  much logic in asking U/V direction for simple curves.
- Set active spline when two segments were joined.

8 years agoFix #26087: in a curve, can't make segment if Fkey was pressed 2 times before on...
Sergey Sharybin [Tue, 15 Feb 2011 16:09:53 +0000 (16:09 +0000)]
Fix #26087: in a curve, can't make segment if Fkey was pressed 2 times before on a single vertex

- Disallow setting cyclic flag for single-point segment when this lonely
  segment is selected
- Clear cyclic flag for single-pointed segments when finding segments which
  can be merged

8 years agoDoc generator now makes 'bpy.context' api reference.
Campbell Barton [Tue, 15 Feb 2011 15:37:40 +0000 (15:37 +0000)]
Doc generator now makes 'bpy.context' api reference.
http://www.blender.org/documentation/250PythonDoc/bpy.context.html

strings are extracted from blender to ensure all values are included, currently there is no type info so this is stored in the doc generator.

8 years agoFix for [#26083] Animated Particle Textures have no effect
Janne Karhu [Tue, 15 Feb 2011 15:03:49 +0000 (15:03 +0000)]
Fix for [#26083] Animated Particle Textures have no effect
* Duplicating particle settings didn't duplicate texture slots.

8 years agomoving dir strings into global namespace for doc access (coming up)
Campbell Barton [Tue, 15 Feb 2011 14:38:43 +0000 (14:38 +0000)]
moving dir strings into global namespace for doc access (coming up)

8 years ago...and for blenderplayer
Campbell Barton [Tue, 15 Feb 2011 12:43:34 +0000 (12:43 +0000)]
...and for blenderplayer

8 years agofix for building with make on linux from recent new lib.
Campbell Barton [Tue, 15 Feb 2011 12:37:15 +0000 (12:37 +0000)]
fix for building with make on linux from recent new lib.

8 years agoPoseLib: Adding support for custom properties
Joshua Leung [Tue, 15 Feb 2011 11:47:09 +0000 (11:47 +0000)]
PoseLib: Adding support for custom properties

Custom properties are now supported by Pose Library. They will get
saved and restored correctly during previewing and pose adding.

To do this, I've changed PoseLib over from using the "LocRotScale"
Builtin Keying Set to the "Whole Character" one instead. One
consequence of this, is that now entire poses are stored in the Pose
Lib, irrespective of whether you only selected part of a pose to store
(i.e. facial controls only, or hand poses only). If this is enough of
a problem, I'll make a second Keying Set that does take selections
into account, and use that here instead.

8 years agocorrention for bpy.props docstrings.
Campbell Barton [Tue, 15 Feb 2011 11:43:35 +0000 (11:43 +0000)]
corrention for bpy.props docstrings.

8 years agoMove mikktspace code to own library, so it is clear that it is also
Nathan Letwory [Tue, 15 Feb 2011 09:24:35 +0000 (09:24 +0000)]
Move mikktspace code to own library, so it is clear that it is also
intended as a standalone library for use in other applications that
want the same tangent space as Blender.

This also keeps blenkernel clean(er) from extra math functions.

8 years agofix for own error with image info display, also dont draw if the mouse is outside...
Campbell Barton [Tue, 15 Feb 2011 04:06:13 +0000 (04:06 +0000)]
fix for own error with image info display, also dont draw if the mouse is outside the image.

8 years agofix warnings.
Campbell Barton [Tue, 15 Feb 2011 03:20:12 +0000 (03:20 +0000)]
fix warnings.

8 years agoUI Tweaks: Text field in Rename Markers popup now gets focus when the
Joshua Leung [Tue, 15 Feb 2011 01:24:12 +0000 (01:24 +0000)]
UI Tweaks: Text field in Rename Markers popup now gets focus when the
popup appears, saving an extra click

I've separated out the "XXX"-'d event-adding-hack section from the
search-menu code into a separate API function (as recommended there).
This call is used to make sure that textboxes in popups can get
activated by default, to allow typing immediately.

8 years agoCtrl-0 can now be used to just reset a single component of an array to
Joshua Leung [Tue, 15 Feb 2011 00:53:20 +0000 (00:53 +0000)]
Ctrl-0 can now be used to just reset a single component of an array to
its default value instead of resetting the entire array

8 years agoTweak priority so link error on Linux is solved. Reported by Hypercrush on IRC.
Nathan Letwory [Mon, 14 Feb 2011 21:00:49 +0000 (21:00 +0000)]
Tweak priority so link error on Linux is solved. Reported by Hypercrush on IRC.

8 years agomore vars made static
Campbell Barton [Mon, 14 Feb 2011 18:20:10 +0000 (18:20 +0000)]
more vars made static

8 years agoThis commit will switch blender to use tangent space generated within
M.G. Kishalmi [Mon, 14 Feb 2011 18:18:46 +0000 (18:18 +0000)]
This commit will switch blender to use tangent space generated within
the two files mikktspace.h and mikktspace.c. These are standalone files
which can be redistributed into any other application and regenerate the
same tangent spaces. The implementation is independent of the ordering
of faces and the vertex ordering of faces.

8 years agomade most variables which are only used in a single file and not defined in header...
Campbell Barton [Mon, 14 Feb 2011 17:55:27 +0000 (17:55 +0000)]
made most variables which are only used in a single file and not defined in header static for blenlib, blenkernel and editors.

8 years agoFix #26082: Fkey in a curve witch was empty before
Sergey Sharybin [Mon, 14 Feb 2011 17:17:05 +0000 (17:17 +0000)]
Fix #26082: Fkey in a curve witch was empty before

Stupid error in own previous commit to addvert_Nurb -- empty spline
had been added to spline list.

8 years agoBug fix #26021
Ton Roosendaal [Mon, 14 Feb 2011 17:09:02 +0000 (17:09 +0000)]
Bug fix #26021

Very nasty UI code issue: since every button is re-defined on a
redraw, having UI redraws while using a button was not possible.

This was solved long ago by copying over data from previous button.

However, this fails when buttons have callbacks with its own (or
a parent button) pointer.

This bug reporter found crashes in draw-overlap UI mode, this
draws entire UI over for every menu redraws, making previous button
pointers invalid. (for triple buffer, the UI is not redrawn, only
the menus).

In general: all systems falling back to old swapbuffers would have
suffered some instability because of this.

Fix is that now the old button gets lifted out from the previous
list and inserted in the new list. Works fine, but needs some tests!

Also in this commit: TIFF endian switching not needed for 16 bits tiff.

8 years agoPrevious commit to small optimization of sculpting broke smooth and layer
Sergey Sharybin [Mon, 14 Feb 2011 16:54:52 +0000 (16:54 +0000)]
Previous commit to small optimization of sculpting broke smooth and layer
brushes. They aren't using proxies, so deformation wouldn't be propagated
in sculpt_combine_proxies().

So, maye idea of getting rid of "extra" memory allocaiton/disposing was not
such cool due to it lead to such exception ways?

8 years agoFirst modifiers with deformMatrices callback used to be applied twice when
Sergey Sharybin [Mon, 14 Feb 2011 16:06:15 +0000 (16:06 +0000)]
First modifiers with deformMatrices callback used to be applied twice when
building crazytspace. Not sure why this worked.

8 years agocomments for how py-rna calls api new classes. small speedup for StructRNA.__new__...
Campbell Barton [Mon, 14 Feb 2011 11:30:35 +0000 (11:30 +0000)]
comments for how py-rna calls api new classes. small speedup for StructRNA.__new__(...) used for creating new classes and corrected exception type.

8 years agoimprove py/rna exception messages.
Campbell Barton [Mon, 14 Feb 2011 08:14:52 +0000 (08:14 +0000)]
improve py/rna exception messages.

8 years agopy rna api: turn class.is_register into a class property rather then a class method.
Campbell Barton [Mon, 14 Feb 2011 07:26:07 +0000 (07:26 +0000)]
py rna api: turn class.is_register into a class property rather then a class method.
eg:

if MySybclass.is_registered:
    ...

8 years agoconvenience targets for makefile
Campbell Barton [Mon, 14 Feb 2011 06:15:23 +0000 (06:15 +0000)]
convenience targets for makefile
clean, test, package_debian, package_pacman

8 years agoRevert incorrect fix for 26062 made in svn rev34828.
Sergey Sharybin [Mon, 14 Feb 2011 06:04:40 +0000 (06:04 +0000)]
Revert incorrect fix for 26062 made in svn rev34828.

8 years agoSVN maintenance.
Guillermo S. Romero [Mon, 14 Feb 2011 04:47:55 +0000 (04:47 +0000)]
SVN maintenance.

8 years agopython api renaming and added headers for some files which didnt have one, no functio...
Campbell Barton [Mon, 14 Feb 2011 04:15:25 +0000 (04:15 +0000)]
python api renaming and added headers for some files which didnt have one, no functionality change.

8 years agoBone Colour Sets (theme ones) can now be edited from the User
Joshua Leung [Mon, 14 Feb 2011 03:43:28 +0000 (03:43 +0000)]
Bone Colour Sets (theme ones) can now be edited from the User
Preferences UI again

8 years agoActive spline number should also be stored/restored by undo stack.
Sergey Sharybin [Mon, 14 Feb 2011 03:36:15 +0000 (03:36 +0000)]
Active spline number should also be stored/restored by undo stack.
It could point to nowhere otherwise.

8 years agomisc small changes:
Campbell Barton [Mon, 14 Feb 2011 03:15:55 +0000 (03:15 +0000)]
misc small changes:
- rename rna collection structs Main prefix to BlendData: eg, MainObjects --> BlendDataObjects
- printing python collection now prints its type (when available)
- renamed shadowed vars in bpy_rna.c.
- when making functions static I also made debugging/test functions static, reverse and add definitions to headers instead.

8 years agoForgot NLA Editor support for this...
Joshua Leung [Mon, 14 Feb 2011 03:04:59 +0000 (03:04 +0000)]
Forgot NLA Editor support for this...

8 years agoGraph Editor part of the changes in the previous commit...
Joshua Leung [Mon, 14 Feb 2011 02:50:52 +0000 (02:50 +0000)]
Graph Editor part of the changes in the previous commit...

8 years agoDopeSheet: Add menu entries and hotkeys to select all keyframes
Joshua Leung [Mon, 14 Feb 2011 02:30:33 +0000 (02:30 +0000)]
DopeSheet: Add menu entries and hotkeys to select all keyframes
left/right to current frame in dope sheet

This commit separates out this selection functionality out of the
click-selection operator into a separate operator, so that hotkeys and
menu entries can be assigned to it.

This is based on an idea+patch (#23738) submitted by Torsten Rupp
(rupp), though I've ultimately decided not to go with the suggested
implementation as I don't think this fits that well under the "column"
select operator.

Todo: Graph Editor support will be coming shortly...

8 years agofix for string copy error in own recent commit
Campbell Barton [Mon, 14 Feb 2011 01:31:44 +0000 (01:31 +0000)]
fix for string copy error in own recent commit

8 years agoFix #26062: build_debian.sh gives unappropriate deb version
Sergey Sharybin [Sun, 13 Feb 2011 19:47:57 +0000 (19:47 +0000)]
Fix #26062: build_debian.sh gives unappropriate deb version

Added subverison number to debian package version. Quick tests run ok,
but haven't checked if deb version comparation also goes fine.

8 years agoFix #26072: ctrl+LMB on an empty curve make Blender crash
Sergey Sharybin [Sun, 13 Feb 2011 19:04:01 +0000 (19:04 +0000)]
Fix #26072: ctrl+LMB on an empty curve make Blender crash

Crash was caused by keeping active segment index even when this
segment had been deleted. Fixed this and also changed behaviour
of creating new CV for case nothing is selected: new segment with
BEZIER type would be created.

8 years agowarning cleanup.
Campbell Barton [Sun, 13 Feb 2011 15:02:21 +0000 (15:02 +0000)]
warning cleanup.
- fix mistake with grease pencil UI (&& was intended but & used).
- use (void) rather then () across _all_ blenders code.
- a few minor edits, don't shadow stack variables in roll calculation & avoid running memset() for VBO vertex map.

8 years agoPatch 26068
Ton Roosendaal [Sun, 13 Feb 2011 14:55:39 +0000 (14:55 +0000)]
Patch 26068

Fast-gauss node didn't respond to socket-input "Size" factor.
Thanks Philipp Oeser for the fix!

8 years agomany functions in blender are not marked static but should be.
Campbell Barton [Sun, 13 Feb 2011 14:16:36 +0000 (14:16 +0000)]
many functions in blender are not marked static but should be.
most local modifier,GPU,ImBuf and Interface functions are now static.

also fixed an error were the fluid modifier definition and the header didnt have the same number of args.

8 years agoBugfix #26066
Ton Roosendaal [Sun, 13 Feb 2011 13:55:41 +0000 (13:55 +0000)]
Bugfix #26066

Shader node "Mapping" had buttons assuming it stored radians, drawing
the values converted wrongly. In this case the storage has degrees...

8 years agoSmall addition to particle grid distribution:
Janne Karhu [Sun, 13 Feb 2011 13:50:19 +0000 (13:50 +0000)]
Small addition to particle grid distribution:
* New option to distribute particles in a hexagonal grid.
* This is much more stable for fluids than normal grid distribution and looks quite nice otherwise too :)
* Also some small scale code cleanup of grid distribution code.

8 years agocorrected error from commit r34810.
Campbell Barton [Sun, 13 Feb 2011 13:07:12 +0000 (13:07 +0000)]
corrected error from commit r34810.

8 years agofix for error building.
Campbell Barton [Sun, 13 Feb 2011 12:50:40 +0000 (12:50 +0000)]
fix for error building.

8 years agoSome more fixes for particle textures:
Janne Karhu [Sun, 13 Feb 2011 12:35:26 +0000 (12:35 +0000)]
Some more fixes for particle textures:
* Moving a texture slot didn't keep the moved slot active.
* Copy & paste for particle textures didn't work.
* New textures weren't freed properly.

8 years agoFix for [#26053] Blender Crash with Particules Textures
Janne Karhu [Sun, 13 Feb 2011 11:45:04 +0000 (11:45 +0000)]
Fix for [#26053] Blender Crash with Particules Textures
* Particle textures weren't handled properly on texture slot move operations.

8 years agoAdded an operator warning for missing material & texture in response to [#26051]...
Janne Karhu [Sun, 13 Feb 2011 11:32:47 +0000 (11:32 +0000)]
Added an operator warning for missing material & texture in response to [#26051] "Noise" not working.

8 years agofix for warnings from Sparse static source code checker, mostly BKE/BLI and python...
Campbell Barton [Sun, 13 Feb 2011 10:52:18 +0000 (10:52 +0000)]
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.

8 years agoRelated to #26061: Camera does not appear selected in outliner when it is
Sergey Sharybin [Sun, 13 Feb 2011 10:34:24 +0000 (10:34 +0000)]
Related to #26061: Camera does not appear selected in outliner when it is

Draw higlighting circle for active camera in outliner

8 years agoFix #26064: blenderplayer is broken
Sergey Sharybin [Sun, 13 Feb 2011 10:28:40 +0000 (10:28 +0000)]
Fix #26064: blenderplayer is broken

This changes were forgotten in svn rev34810. Should work fine now.

8 years agoFix #26059: select_vertex_path fails when vertices aren't selected 1 by 1 in gui
Sergey Sharybin [Sun, 13 Feb 2011 10:25:12 +0000 (10:25 +0000)]
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.

8 years agoReverting part of 34810
Joshua Leung [Sun, 13 Feb 2011 07:39:43 +0000 (07:39 +0000)]
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)

8 years agoFixing compiling on windows
Joshua Leung [Sun, 13 Feb 2011 06:19:15 +0000 (06:19 +0000)]
Fixing compiling on windows

8 years agoenforce string limits (reported by pedantic checking tools & some developers).
Campbell Barton [Sun, 13 Feb 2011 03:21:27 +0000 (03:21 +0000)]
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.

8 years agoremove unused var
Campbell Barton [Sun, 13 Feb 2011 02:55:23 +0000 (02:55 +0000)]
remove unused var

8 years agowrong length used with strncmp when comparing RNA path.
Campbell Barton [Sun, 13 Feb 2011 01:59:16 +0000 (01:59 +0000)]
wrong length used with strncmp when comparing RNA path.

8 years agoSmall update for billboards:
Janne Karhu [Sat, 12 Feb 2011 23:25:03 +0000 (23:25 +0000)]
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.

8 years agoFix for [#25857] create_dupli_list incorrect behaviour with particle systems
Janne Karhu [Sat, 12 Feb 2011 21:54:50 +0000 (21:54 +0000)]
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.

8 years agoSmall particle effectors update:
Janne Karhu [Sat, 12 Feb 2011 17:54:24 +0000 (17:54 +0000)]
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.

8 years agoSculpting on deformed mesh
Sergey Sharybin [Sat, 12 Feb 2011 17:51:02 +0000 (17:51 +0000)]
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.

8 years agoSave one memory block allocation/disposing when propagating changes from
Sergey Sharybin [Sat, 12 Feb 2011 17:28:37 +0000 (17:28 +0000)]
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.

8 years agofix for more warnings.
Campbell Barton [Sat, 12 Feb 2011 16:54:24 +0000 (16:54 +0000)]
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).

8 years agoWarning fix to my previous commit. Thanks to nazg-gul for noticing!
Janne Karhu [Sat, 12 Feb 2011 16:06:27 +0000 (16:06 +0000)]
Warning fix to my previous commit. Thanks to nazg-gul for noticing!

8 years agoFixing a recounting bug so KX_Scene.pre_draw.append() and KX_Scene.post_draw.append...
Mitchell Stokes [Sat, 12 Feb 2011 15:44:09 +0000 (15:44 +0000)]
Fixing a recounting bug so KX_Scene.pre_draw.append() and KX_Scene.post_draw.append() work.

8 years agoParticles todo item: particle textures
Janne Karhu [Sat, 12 Feb 2011 14:38:34 +0000 (14:38 +0000)]
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.

8 years ago- fix leak on STL loading if realloc fails.
Campbell Barton [Sat, 12 Feb 2011 14:25:54 +0000 (14:25 +0000)]
- 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.

8 years agofix for uninitialized value in BLI_path_cwd() if PWD wasn't defined and the CWD was...
Campbell Barton [Sat, 12 Feb 2011 10:37:37 +0000 (10:37 +0000)]
fix for uninitialized value in BLI_path_cwd() if PWD wasn't defined and the CWD was longer then 160.

8 years agoaccess past array bounds in layerInterp_mdisps, also make some vars const.
Campbell Barton [Sat, 12 Feb 2011 10:18:21 +0000 (10:18 +0000)]
access past array bounds in layerInterp_mdisps, also make some vars const.