Commit Graph

451 Commits

Author SHA1 Message Date
a8bc1f3397 fix for a crash in Blender.Mesh,
getting curve data from an object failed (with only 1 curve vertex)
Blender.Mesh didnt check this and crashed.
2007-05-28 16:49:48 +00:00
99135b0674 dont use tface hide or select anymore, since maintaining 2 sets of hide/select data for each face is annoying.
using mface->flag for both.

Also found that the cdDM_drawMappedFaces and cdDM_drawFacesTex_common could get normals mixed up when rendering hidden faces. because hidden/invisible faces used continue without advancing to the next normal.
2007-04-29 13:39:46 +00:00
836ccb8ab0 Bugfix #6614:
spurious "can't edit external libdata" for normal operations on proxy armature


Also, fixed two typos in code comments.
2007-04-28 03:01:12 +00:00
23f59a8e8a Removed unused variable and reorganised another 2007-04-27 11:32:11 +00:00
59384464ec SubSurf can be enable/disable in linked data. 2007-04-25 16:52:20 +00:00
13b1fbd665 made blender take hidden objects into account in more situations.
Ctrl+RMB used to select a hidden object as well as "Select Grouped -> Parent"

Also made OOps and data browser check for hidden objects.

Added a countall to hide/unhide objects.
2007-04-25 02:20:55 +00:00
94ad8c810c Changed TESTBASE and TESTBASE_LIB to check the hidden flag
Checked every instance of testbase to see this dosnt break anything, also changed TESTBASE and TESTBASELIB, both were used incorrectly in places.

added error_libdata() for library error messages that are everywhere.
added object_data_is_libdata to test if the object and its data's are from a library.
fixed 2 crashs in adding Curve points to a library object (remember to check, verify_ipocurve returns NULL!)
made duplicating and making dupli's real for lib objects possible, disabled joining into lib armatures and meshes.
2007-04-22 22:08:19 +00:00
3fe793f2b5 [ #6442 ] image.repack (Python)
- Modified pack so it can repack too, rather the n raising an error.

editobject - Dont need to recalc data when hiding and unhiding. rather do what layers do and re-sort the scene.
2007-04-19 23:45:33 +00:00
60b3268c32 adding a python function for cleaning strings (for filenames and export names) BPySys.py - used fotr obj and fbx export.
view.c - missed one smoothview/camera.
Brigg's hide object patch didnt change the object selection flag, other minor changes also.
2007-04-19 20:58:09 +00:00
f5a40315ca -> Keybindings for hiding objects
Small feature, added keybindings for setting the visibility restriction flags
that were previously only accesible via the outliner

HKEY 		Hides all selected
SHIFT-HKEY 	Hides all unselected
ALT-HKEY 	Shows all hidden
2007-04-19 19:47:51 +00:00
b95f4ba2ad added a hook menu for object mode, more commands can be added here but currently there is only Reset Offset and Recenter at Cursor
This functionality was requested by malfico when dealing with many hooks.
2007-04-17 16:14:41 +00:00
61b6f47faf Bugfix #6559
Issue in Blender 10 years ago already:

CTRL+L "Link Materials" reduced total amount of materials in cases, which
it should not.

It now just copies Material links from the active to selected Objects.

Note for developers: see how this now is 3 lines of code, instead of
like 30. I have no idea what I was thinking back then... the current
solution could have been coded back then too.
2007-04-14 10:21:05 +00:00
54efb4c916 external library, block locking spree. Many areas of blender allow changing of library data.
Added checks to the following areas
* half the material buttons
* multires, shapekeys, vert groups
* renaming a linked Object in the links could loose the object on next reload.

Made center functions check for library data as well as changing
the way it works.

Rather then centering all objects in the selection and stopping if it finds libdata, or a multiuser mesh.
It centers all that it can, and reports any objects that didnt center and why.
2007-04-13 09:39:25 +00:00
1e5bdbcb2f added another copy option 'protected transform' makes changing the protection values all at once possible 2007-04-12 06:12:17 +00:00
5a3ab0e32e Found a bug where "make dupes real" would crash, when the group was an extternal link. - 1 liner fix from Ton.
Also added "sort faces by selection" to the sort menu.


DNA_meshdata_types use C comments for GCC verbose warnings to be quiet
2007-04-10 11:45:07 +00:00
76420c2fec appending libdata no longer breaks all external references.
Existing data is flagged with LIB_APPEND_TAG and all_local only has an option to only operate on un-flagged data.

If you append an object thats linked to a material alredy linked in your scene, the material will not be made local.
So at worst youll need to make local some of the datablocks.

This is fairly simple and though my tests show it to work, do some tests on your own libraries before assuming its problem free.


scripttemplate_mesh_edit wasnt updated with PyAPI changes and moved some functions into generic places.
2007-04-07 17:35:47 +00:00
afdd54fa37 moved source and text to american spelling
* colour -> color
* centre -> center
* normalise -> normalize
* modelling -> modeling
2007-04-04 13:18:41 +00:00
ead26625c1 Bugfix #6486
Posemode: you can get a situation of an active object, in posemode, which
is not selected. That is very invisible, and gives issues for tools like
'clear rotation', because it checks for selected objects.

Als fixed clear (alt+g,r,s) options to only work on posemode for the active
object.
2007-04-04 10:37:28 +00:00
5371d956df curve center didnt update curve data.
add_mesh_torus - print's wernt removed
others, changed user visible text to american spelling - center
2007-04-03 08:20:17 +00:00
cbadf6523c added a null check for give_matarar with make_local, was crashing with some data 2007-03-20 16:54:31 +00:00
4f5065ac98 addad e new macro - BASE_SELECTABLE for checking if an object is selectable (restrict visible and restrict selected are off and its in the current view layer)
Made "Select Grouped" functions and "Select Linked" use BASE_SELECTABLE macro so they wont select objects they shouldent.
Made "Select Grouped" push an undo

Made "Select Grouped" and "Select Linked" only push add an UNDO if they make a change to the selection.

Fix for own bug. "Select Group" -> Hooks option could crash blender if an objetc hook was in another scene.
2007-03-19 05:09:56 +00:00
6b584a6504 many menu items would crash blender if there was no 3d view. added checks. 2007-03-14 09:08:41 +00:00
f523cce837 Bugfix #6167
Metaball delete could crash, if selected/active ball is not the 'mother'
ball.
2007-03-12 16:27:20 +00:00
e0c77c0f14 made all data adding functions accept a name such as add_mesh or add_curve, previously only some datatypes adding functions accepted a name.
also updated the Bpy.py epydocs
2007-03-11 16:25:17 +00:00
d0d9899e76 Bugfix #6201
Shape key drivers were not copied correctly, when choosing the option
"ADD NEW Scene -> Full copy".
2007-03-11 12:14:50 +00:00
c5a1582801 Bugfix (forum report):
Texture space copy (ctrl+c) crashed.
2007-03-07 14:57:01 +00:00
4b0db88d3e == Sculpt Mode ==
Removed special Sculpt Mode undo code. Sculpt Mode undo is no longer so useful, since in order to make it more correct it has gotten slower, so normal BIF_undo_push is used now. Fixes bug with Shape Keys, sculpting on a shape key wasn't doing undo properly.
2007-02-27 06:22:41 +00:00
05de3fb3d5 Bugfix #6053
When in sculptmode, enter editmode, add faces or vertices, exit editmode,
then undos/redos screw up mesh.

Now the stack for sculpt is freed. Later on one could precisely test why
this undo isn't resistant to such changes.
2007-02-15 20:32:08 +00:00
58d6e51cb5 Bugfix, email report.
Copying texture space from Mesh to Curve crashed. Bad code. cleaned up.
2007-02-14 13:52:30 +00:00
f26e67e9d6 Fix for bug #5976:
Object separated from mesh in edit mode did not draw in the correct
green wire color when part of a group.
2007-02-10 14:23:32 +00:00
a55c7cd99e Bugfix #5908
After conversion of Curve to Mesh, modifiers should be removed.
2007-02-03 13:17:05 +00:00
21f431047f Fixed bug #5742, Crash on sculpt mode. This bug was triggered when adding a new object while already in sculpt mode. Sculpt mode wasn't being deactived on cameras, lamps, etc. Fixed in add_object_draw() by turning off G_SCULPTMODE, also by adding a check in sculpt_init_session() to be sure any previous session is free'd before making a new one. 2007-01-18 07:04:08 +00:00
25361281a1 Removed set_sculpt_object. Tested with sculpt undo, sculpt+multires, sculpt+partial visibility, and sculpt+shapekeys, seems stable. 2007-01-12 05:13:36 +00:00
047cb06e8a Improved exiting retopo paint; clicking on either of the retopo toggles in editmode will popup a question to check whether retopo paint should be applied or canceled. 2007-01-09 00:47:23 +00:00
819b5d51f6 == Armature Centering Tools ==
After all these years, it is now possible to (re)center armatures like you
can do with meshes and curves.

At the moment, you can only access this functionality from the menus
(Spacebar->Transform) as the armature button panels are pretty
crowded.
2006-12-27 23:30:59 +00:00
57df3fb1b4 Switching editmode on then off again with multires enabled should update the edge visibility 2006-12-27 20:08:29 +00:00
fc00e73a83 removed the WKey "Split font" option. It doesnt work and corrupts memory
(saved files cannot read back, they crash).

The implementation of this option was plain accident that it even worked
once... you cannot use the API in blender that way.
2006-12-21 12:36:25 +00:00
253432bfc7 The Big Image refactor!
Please read:
http://www.blender3d.org/cms/Imaging.834.0.html

Or in short:

- adding MultiLayer Image support
- recoded entire Image API
- better integration of movie/sequence Images

Was a whole load of work... went down for a week to do this. So, will need
a lot of testing! Will be in irc all evening.
2006-12-20 17:57:56 +00:00
c41e0e205f A little bit of code cleanup:
* Moved BEZSELECTED macro to blendef.h as it is used in several files
* Removed other duplicated macros
2006-12-11 03:47:15 +00:00
902a69a7d3 Numerous fixes in Render code:
- Bug: material emit was ignored (showed in preview render backdrop)
- Bug: world exposure was ignored
- Bug: lamp halo was ignoring 'render layer light override'.

Further reshuffled the way shadows are being pre-calculated, this to enable
more advanced (and faster) usage of Material lightgroups. Now shadows are
being cached in lamps, using a per-sample counter to check if a recalc is
needed. Will also work (later) for Raytracing node shaders.

- New: Material LightGroup option "Always", which always shades the lights
  in the group, independent of visibility layer. (so it allows to move such
  lights to hidden layer, not influencing anything).
2006-12-08 09:40:44 +00:00
4f8079d49c Modifier Stack: Limit calculation to required data.
This commit upgrades the modifier stack to only calculate the data which is
needed, either by modifiers further down the stack or by other functions at
the end of the stack (e.g. drawing functions).

This speeds up modifier stack recalculation, especially where vertex
groups and UV coordinates are concerned. For example, a mesh with an Armature
modifier followed by a Subsurf modifier would previously have required the
Subsurf modifier to interpolate all the vertex groups in the mesh, slowing
down modifier calculations considerably. With this update, vertex group data
is not propagated beyond the Armature modifier, so calculations are faster.

Note that this depends on the order of modifiers in the stack. If the Armature
and Subsurf modifiers were swapped in the above example, the Subsurf modifier
would have to interpolate vertex groups, as they are needed by the Armature
modifier.
2006-12-05 17:42:03 +00:00
2d87c36efa Copy vcols wasnt working me->mcol[a] needs to be me->mcol[a*4] 2006-12-03 19:38:32 +00:00
b1f466e804 renamed Select Linked->Group to DupliGroup, was too similar to select Grouped Group and confusing.
made the copy menu not display in editmode. - was for object properties.
2006-11-28 20:06:23 +00:00
34f592af85 Bugfix #5305
Sculpt mode crasher; after deleting object and quitting blender. Was freed
memory hanging in sculpt undo data.
2006-11-25 18:40:53 +00:00
8106c0e721 Bone Layer feature: now also Armature layers have a hotkey menu; Shift+m.
Note that these menus again react to hotkeys, so making layer 4 visible
then is Shift+m, 4.
2006-11-24 18:58:59 +00:00
33f79ebd89 Vertex/Weight Paint now uses the regular global Undo.
Also cleaned up bad global variable stuff in vpaint.c, now only need a
good place to store the paint settings in file still...
2006-11-20 12:08:06 +00:00
e435fbc3c5 Added custom vertex/edge/face data for meshes:
All data layers, including MVert/MEdge/MFace, are now managed as custom
data layers. The pointers like Mesh.mvert, Mesh.dvert or Mesh.mcol are
still used of course, but allocating, copying or freeing these arrays
should be done through the CustomData API.

Work in progress documentation on this is here:
http://mediawiki.blender.org/index.php/BlenderDev/BlenderArchitecture/CustomData


Replaced TFace by MTFace:

This is the same struct, except that it does not contain color, that now
always stays separated in MCol. This was not a good design decision to
begin with, and it is needed for adding multiple color layers later. Note
that this does mean older Blender versions will not be able to read UV
coordinates from the next release, due to an SDNA limitation.


Removed DispListMesh:

This now fully replaced by DerivedMesh. To provide access to arrays of
vertices, edges and faces, like DispListMesh does. The semantics of the
DerivedMesh.getVertArray() and similar functions were changed to return
a pointer to an array if one exists, or otherwise allocate a temporary
one. On releasing the DerivedMesh, this temporary array will be removed
automatically.


Removed ssDM and meshDM DerivedMesh backends:

The ssDM backend was for DispListMesh, so that became obsolete automatically.
The meshDM backend was replaced by the custom data backend, that now figures
out which layers need to be modified, and only duplicates those.


This changes code in many places, and overall removes 2514 lines of code.
So, there's a good chance this might break some stuff, although I've been
testing it for a few days now. The good news is, adding multiple color and
uv layers should now become easy.
2006-11-20 04:28:02 +00:00
c1e4099365 Plumiferos request; additional option for subsurf hotkey.
Now alt+shift+o only toggles the 3d view subsurf flag, rendering remains
subsurfed.
2006-11-16 10:36:45 +00:00
95c7c41bd0 Bugfix #5224
Prob: selection sometimes gave wrong edges/faces

Selection code for editmesh was still using a short for calculating the
distance of a projected vertex/edge/face from the mouse position. In
zoomed in cases that'll give overflows and unpredictable results.

It was fixed only half before... now all shorts are removed for distance
calculus.
2006-11-15 10:02:57 +00:00
3d7e802c6c Bugfix, own collection.
Option "Make duplicators real" (shift+ctrl+a) didn't work for Group-dupli,
the relations between objects and modifiers were not restored.
2006-11-15 08:38:46 +00:00