Commit Graph

108 Commits

Author SHA1 Message Date
0abe1911d5 - fix for access past the buffer size (paint / sculpt used some 2d vecs as 3d)
- remove redundant NULL checks on old code where it would crash if the result was NULL later on.
- add some missing NULL checks.
2011-09-16 06:47:01 +00:00
7f5c5f8eca Fix #28500: Reshape in multires modifier makes blender crash
Multires doesn't store displacement for base mesh and reshaping when
multires subdivision level is set to zero is crappy.

Add report that reshape can't work with base level and cancel reshape operator.
2011-09-04 11:38:53 +00:00
c96f28a718 - use %u rather tham %d for unsigned ints in string formatting funcs.
- replace (strlen(str) == 0) with str[0]=='\0'
2011-08-27 03:25:02 +00:00
495ce5c88b Fix part of #27858: crash trying to apply subsurf modifier as shape key,
fix found by Bastian Schreiber.
2011-07-05 10:35:48 +00:00
aff9f8ce81 Fix #27570: apply button for modifiers required the modifier to be enabled, we
now just enable the modifier before apply.

Patch Bastien Montagne (with some tweaks), thanks!
2011-06-13 14:11:29 +00:00
21f5a87999 fix for memory leak re-binding meshes. 2011-06-09 11:19:34 +00:00
155d589333 add the property as an argument to enum item functions, not used yet but needed for dynamic python enums. 2011-05-26 13:38:16 +00:00
7459133648 Patch [#27344] 300+ New/changed tooltips by Davis Sorenson (dsavi). Thanks a lot!
Reviewed by Tom Musgrove and myself. 

From the patch description:
ValterVB on #blendercoders submitted a long list of missing tooltips in Blender, and I went through the list and added all I knew. After that I crowdsourced the rest by putting a spreadsheet on Google docs and having people fill in the missing ones that I didn't know. So if there's some weird tooltip in there that doesn't make sense, that's why.

Thanks to Wolter, spacetug and others on BlenderArtists for contributing tooltips.
2011-05-15 17:59:48 +00:00
19eb07c63d Do not remove MDISPS customdata layer when removing multires modifier
and there are still another multires modifiers in the stack.

Helps to prevent loosing sculpt data when you occasionally added another
multires and reomved it with "X" button.
2011-05-15 13:13:51 +00:00
e5bf21898e Fix for [#26617] convert hair particles to mesh crash rev:35787
* Hair to mesh conversion wasn't making sure the hairs had valid keys
* Patch by Sergey Sharybin
2011-03-28 08:27:19 +00:00
c7fccc84bf use NULL rather then 0 for pointer assignments & comparison, modifier, imbuf & editors. 2011-03-05 10:29:10 +00:00
Nathan Letwory
95100afc12 doxygen: blender/editors tagged. 2011-02-27 20:29:51 +00:00
Nathan Letwory
5b607701a7 doxygen: prevent GPL license block from being parsed as doxygen comment. 2011-02-23 10:52:22 +00:00
94b9d2da54 checking wrong null pointer in edit_modifier_poll_generic(). 2011-01-14 19:35:59 +00:00
473838aec9 Fix for bug [#21534] Multires modifier strange deformations
This adds the "Apply Base" feature from my gsoc2010 branch.

Apply Base partially applies the modifier, in that the mesh is
reshaped to more closely match the deformed mesh. The upper-level
displacements are recalculated so that the highest multires level
appears unchanged.

Multires does not currently deal well with too large displacements.
An easy-to-reproduce example: create any mesh type, add multires,
subdivide a few times, then use the sculpt grab brush to drag the
entire mesh over a few units. At the highest level, and at level 0,
the mesh looks fine, but all of the intervening levels will have ugly
spikes on them.

This patch doesn't help with situations where you can't modify the
base mesh, but otherwise works around the problem fairly well (albeit
with a heuristic, not an exact solution.)
2011-01-07 21:12:47 +00:00
8f21a43535 split BKE_utildefines.h, now it only has blender specific defines like GS() MAKE_ID, FILE_MAXDIR, moved the generic defines to BLI_utildefines.h.
no functional changes.
2011-01-07 18:36:47 +00:00
831684fd8f Fix compilation, obvious typo. 2010-12-19 01:55:07 +00:00
43af26fa41 Bugfix [#25291] Objects that should not have subsurface modifier have
it (eg cameras)

When trying to add a modifier to non-geometry objects, warnings are
now shown instead of just adding some (useless) modifiers that cannot
be removed later.
2010-12-19 01:14:57 +00:00
c85adcc2e4 Use mdisps layer from edit_mesh when adding/removing multires modifier
when object is in edit mode.
2010-12-13 10:24:05 +00:00
b110c7c8f2 Dependency graph: changed DAG_id_flush_update to DAG_id_tag_update. Now it
only tags the ID and does the actual flush/update delayed, before the next
redraw. For objects the update was already delayed, just flushing wasn't
yet.

This should help performance in python and animation editors, by making 
calls to RNA property update quicker. Still need to add calls in a few
places where this was previously avoided due to bad performance.
2010-12-05 18:59:23 +00:00
51dcbdde03 use 'const char *' by default with RNA functions except when the value is flagged as PROP_THICK_WRAP.
Also use const char in many other parts of blenders code.

Currently this gives warnings for setting operator id, label and description since these are an exception and allocated beforehand.
2010-11-17 09:45:45 +00:00
6753882e42 bugfix [#24009] Crash when switching area types and performing ops 2010-11-04 15:59:09 +00:00
bb92265995 Fix for [#24319] Removing a cloth or softbody simulation in paticle mode problem 2010-10-19 10:17:19 +00:00
4d37cf90b9 remove G.sce, use G.main->name instead.
Both stored the filename of the blend file, but G.sce stored the last opened file.
This will make blender act differently in some cases since a relative path to the last opened file will no longer resolve (which is correct IMHO since that file isnt open and the path might not even be valid anymore).

Tested linking with durian files and rendering to relative paths when no files is loaded however we may need to have some operators give an error if they are used on the default startup.blend.
2010-10-18 06:41:16 +00:00
8268a4be71 most unused arg warnings corrected.
- removed deprecated bitmap arg from IMB_allocImBuf (plugins will need updating).
- mostly tagged UNUSED() since some of these functions look like they may need to have the arguments used later.
2010-10-16 14:32:17 +00:00
f81248265d tag UNUSED() for operator exec() and invoke() functions. 2010-10-15 01:36:14 +00:00
Nathan Letwory
3ae8d4b1dc Explicitely cast to MultiresModifierData pointer to silence compiler warning. 2010-09-27 09:43:21 +00:00
57527cb0ac - Save MDISPS layer when applying modifier.
All sculpting used to disappear before. Save MDISPS if new mesh has got the same faces amount.
  NOTE: maybe some other layers should be saved?
- Apply multires modififier if MDISPS was auto-created.
  Multires's applyModifier used to return unchanged DM when MDISPS was auto-created.
- Set multires totlvl from MDISPS layer when new multires was added to mesh with existing MDISPS layer.
2010-09-26 18:29:54 +00:00
b0c4b1216d Fix for [#21101] Switch off collision at collision object is not recognised by falling softbody Object
* When removing a modifier that effects the depsgraph the DAG_scene_sort has to be done after the update call so that dynamic systems can clear the collision surface properly.
2010-09-03 07:50:22 +00:00
5db18d474f "Fix" for [#23621] lattice modifier on particle hair when applied doesn't apply it to the hair
* Although not strictly a bug it is the expected behavior and won't mess anything else up.
* Note: the lattice is applied to the actual hair keys instead of the calculated strands so the applied result will differ a bit from the original.
2010-09-02 08:06:53 +00:00
5c75d6fa98 remove unused includes 2010-08-08 13:06:31 +00:00
5fa7d1c1b4 2.5: code changes to reduce the usage of G.main and pass it along
or get it from the context instead.
2010-08-01 12:47:49 +00:00
efeb8148c8 Fix #22213: applying deform modifier in front of multires modifier crashes,
should not do multires reshape in this case, but just regular apply.
2010-07-05 12:20:49 +00:00
51fd10a1b5 adding image strips wasnt working, use the 'directory' component of the file selector rather then the full 'filepath' to fix this.
added flags for filename/filepath/directory args to WM_operator_properties_filesel().
2010-07-01 19:28:45 +00:00
c2f36a4d6a naming changes
path -> filepath (for rna and operators, as agreed on with elubie)
 path -> data_path (for windowmanager context functions, this was alredy used in many places)
2010-06-14 03:52:10 +00:00
6cc6f8495f - added a flag argument to WM_operator_properties_filesel() currently only used for relative path option.
- added relative option to saving external multires data
- renamed multires external functiosn to have save / pack as suffix.
- added TODO's for file select operators that should support relative paths but dont.

- also disable openmp on linux cross compile, mingw currently isnt linking -lgomp
2010-06-09 14:04:34 +00:00
640fb84bed - Added checking if modifier is active in find_multires_modifier
- Pass MultiresModifierData to reshape functions
2010-06-06 15:22:27 +00:00
9f7c04944a Removed unused argument mmd from multires reshape functions. 2010-05-21 14:18:07 +00:00
70a96a1089 saving multires data didnt get the new filename when the external struct was alredy allocated (making save external fail) 2010-05-07 09:41:26 +00:00
43f0fd08b3 Fix [#22227] Unbinding calls bind operator
Problem wasn't that the same operators was being called, just seems like the code wasn't updated after rev. 28376
2010-05-03 02:01:38 +00:00
9957e926f9 warning cleanup 2010-04-22 11:35:36 +00:00
a2b6abeee1 Fix [#22097] missing panels in texture tab
Made texture/texture slot context a bit less flaky when dealing with active material and 
texture nodes inside a node material in the node editor. Now if the active material has 
nodes enabled, and there are no active material/texture nodes inside it, nothing will be 
shown in the texture properties (similar to 2.49).
2010-04-22 06:59:41 +00:00
5c94896490 Fix [#22078] Cannot apply modifier in python (context error)
Previously all modifier operators relied on the buttons layout data context pointer to 
decide which modifier to work on. This meant that these operators would only work 
from from the properties panel, and not from scripting/macros or for operator redo.

This commit makes all modifier operators take the modifier name as an operator 
property, so the operators can be re-done or executed outside of the modifier panel. 
When invoking the operators from the modifier panel, they automatically fill in the 
operator property from context.

This isn't a perfect API design, but it does bring these operators in line with the design 
of being able to access all UI functionality via other means like scripts.
2010-04-22 01:55:10 +00:00
403c1e2a8e Todo #21831: Deform modifier is applied to base mesh instead of
multires modifier if both are in the stack (patch #21965)

This patch also removes limitation of multires reshaping when
destination object has got modifiers after multires modifier.
2010-04-13 06:06:49 +00:00
4a451714d6 Fix [#21832] Add Modifier, Pinned Context
Added convenience function ED_object_active_context(C) to get either the
object in the data context, or if not, the active object.
2010-03-31 00:55:01 +00:00
f743b583bf more lint includes
Only source/blender/editors/ dir, should not give errors on different platforms
Only removing:  UI_*.h, ED_*.h, WM_*.h, DNA_*.h, IMB_*.h, RNA_*.h, PIL_*.h
2010-03-23 14:09:09 +00:00
1e9bf0cfdb spaces -> tabs, (4 spaces == 1 tab, only for white space preceding text) 2010-03-22 09:30:00 +00:00
1708ac0723 rename some functions to use easier to understand names.
'BLI_makestringcode' --> 'BLI_path_rel'
'BLI_convertstringcwd' --> 'BLI_path_cwd'
'BLI_convertstringframe' --> 'BLI_path_frame'
'BLI_convertstringframe_range' --> 'BLI_path_frame_range'
'BLI_make_cwdpath' --> 'BLI_path_cwd'
2010-03-09 17:36:23 +00:00
59db9a4061 Bugfix: multires save external was not working. Just disabled operator poll
for now, but there's actually a deeper issue here, the modifier is no longer
in context after the file browser, not sure how to solve this.
2010-03-08 15:44:26 +00:00
d0c70ad1d5 Constructive modifiers for curves and surfaces
Used approach with creating DerivedMesh for curves whet they've got such modifiers.

Available modifiers are: array, edge split, mirror, solidify, subsurf.
2010-03-05 16:47:52 +00:00