Commit Graph

47594 Commits

Author SHA1 Message Date
Joshua Leung
ab8728df2a == Action Editor - Scrolling Fix ==
This fixes a problem introduced in http://lists.blender.org/pipermail/bf-blender-cvs/2007-May/010005.html

Now channels in older files will be in the view again upon loading.
2007-06-19 11:52:14 +00:00
Joshua Leung
3caf086137 == Action Editor - Long Keyframes ==
I've recoded the way long keyframes work a bit, so that more cases are handled accurately. Now, it takes into account the number of IPO-curves that have keyframes in them on the start/end frame of the long-keyframe, instead of just taking the total number of IPO-curves present for the channel being drawn.
2007-06-19 09:46:52 +00:00
Joshua Leung
25ec0533a9 == PyConstraints - BPy API Access ==
The BPy Access to PyConstraints. I have not implemented the setter for the PyC-ID-Properties access as I'm not too sure how this should be done.

Also fixed a few typos in the py-docs for the Limit Scale constraint.
2007-06-18 10:39:50 +00:00
Joshua Leung
01e8789f3f == PyConstraints ==
At last! The ability to code constraints in Python. This opens up many interesting rigging possibilities, as well as making prototyping constraints easier.

* A PyConstraint script must begin with the line 
#BPYCONSTRAINT
* It must also define a doConstraint function, which performs the core actions of the constraint.
* PyConstraints use IDProperties to store custom properties for each PyConstraint instance. The scripter can choose which of these ID-Properties to expose to a user to control the behaviour of the constraint. This must be done using the Draw.PupBlock method.

Credits to Joe Eager (joeedh) for coding the original patch on which this is based. I've made heavy revisions to large parts of the patch.

For more detailed information, and some demo scripts, see the following page:
http://aligorith.googlepages.com/pyconstraints2
2007-06-18 07:41:21 +00:00
Campbell Barton
770291b9ea missing decref.. win Window.RedrawAll() pointed out by ken 2007-06-16 13:57:39 +00:00
Campbell Barton
84749aa3ff Python API, more METH_VARARGS to METH_O 2007-06-16 13:17:41 +00:00
Ken Hughes
3e490c0203 Fix a Python memory leak with the armature weakref code. setup_armature_weakrefs() wasnt't deallocating the old list, instead just adding a new one to the dictionary. 2007-06-16 13:01:10 +00:00
Campbell Barton
39a526a963 Python PyMethodDef supports single argument methods (METH_O) but was using METH_VARARGS everywhere and getting the single args from the tuple.
Use METH_O where applicable.
2007-06-16 12:24:41 +00:00
Juho Vepsalainen
a499da7192 Curve Selection Tool Refactor:
This commit refactors curve selection system to use certain curve selections
functions that encapsulate setting of selection flags. New function to select
adjacent control points was introduced too. Refactoring made it possible to 
simplify certain existing selection functions quite a bit. 
New functionality was delivered as well. Select more/less works now with NURBS 
as expected. Also two new curve selection functions were added: Select Every Nth 
and Select Random. 

See http://wiki.blender.org/index.php/BlenderDev/Curve_Selection_Tools for 
further information.
2007-06-14 14:36:27 +00:00
Joshua Leung
0ed2e0e706 == Armature - Duplicating Bones ==
Duplicating bones now also duplicates the Transform Locks, and IK DOF settings, along with constraints. 

I have noticed a few random crashes while editing armatures recently, that seem to occur after duplicating a chain of bones. I've yet to find the cause though.
2007-06-14 12:29:56 +00:00
Jean-Luc Peurière
edc6512ba6 first workable version on Os X
work only in non camera mode in 3D view

need the external plug-in to be compiled separately

line 894 of ghostwinlay.c must be replaced with
values adapted at your system

see mailing list for features planned and how
to use
2007-06-12 20:01:28 +00:00
Campbell Barton
88cca5dc1a draw_mesh_fancy was using the original meshes stats rather then the derived mesh (that is being drawn)
This should not change teh way it works currently, however modifiers that add faces or edges need this so they render properly.
2007-06-12 05:59:37 +00:00
Campbell Barton
82eab51a29 fix own error - EXPP_getScriptLinks, was returning an unset list. 2007-06-12 05:17:35 +00:00
Nathan Letwory
12d32f5cf9 === Verse ===
* add preliminary verse method support to Blender. This gets really interesting whenever I get Verse Chat completed.
2007-06-11 10:42:38 +00:00
Nicholas Bishop
3026e853b3 == Multires ==
* When loading multires files, clear the temporary connectivity data
2007-06-11 01:30:00 +00:00
Nicholas Bishop
065c39389c == Multires ==
* In add_levels, moved the call to update_levels to the beginning rather than the end. This is slightly faster, as there's one less level to update. Also fixes a bug (introduced in rev. 10836?) that made multires's add_level differ slightly from the subdivide modifier.
2007-06-10 23:31:38 +00:00
Nicholas Bishop
52d6635528 == Multires ==
* Removed two unused structs from multires

* Replaced one-line get_float function with a macro

* During add_level, move the freeing of temp data to after the update_level, so that this data isn't calculated twice
2007-06-10 23:01:23 +00:00
Nicholas Bishop
2494a5ed0d == Multires ==
* Small optimization to multires based on profiling data; calculation of edge boudndaries is now cached along with multires mapping data to improve the performance of the catmull-clark code.

* Removed an unneeded call to create the temporary data when loading files.
2007-06-10 21:51:11 +00:00
Brecht Van Lommel
d39d2e7279 Patch #6717:
Select Inverse function in the UV editor, by Juho Vepsalainen.
2007-06-10 14:06:34 +00:00
Nicholas Bishop
2393896cee == Multires ==
Removed an unused integer from MultiresFace
2007-06-10 09:23:50 +00:00
Nicholas Bishop
c61198d006 == Multires ==
Modified the vert_edge_map and vert_face_map arrays in MultiresLevel so that the data is stored only for as long as it is needed -- for adding levels and updating levels. Once the modifications are 
complete, the mapping data is deleted, which provides a large reduction in memory usage for a minor increase in processing time for updating levels.
2007-06-10 06:00:42 +00:00
Campbell Barton
4d2cbdb038 only shadow didnt redraw 2007-06-09 14:25:05 +00:00
Campbell Barton
10a22bdba7 subsurfs EDGE_getSharpness function was looping when it didnt need to and also took an unused value.
removed loop and unused var, since this is a sensitive (and not my) area - I did some mesh comparisons and ran a comparison with the old function passing random values, so this should be ok.
2007-06-09 10:51:02 +00:00
Joshua Leung
c356f3d68f == NLA Editor ==
Yet another commit to fix Shift-S snapping for keyframes. The code to snap an Object's IPO block's keyframes to the current frame should be evaluated before the expanded/collapsed status of said object is evaluated.
2007-06-09 07:24:08 +00:00
Juho Vepsalainen
274b504d66 Fix for bug #6828:
It was missing checks for screen status.

Log for my previous commit.
Sorry for the hassle.
2007-06-09 05:56:43 +00:00
Juho Vepsalainen
ca1ccb84bc Index: source/blender/src/editscreen.c
===================================================================
--- source/blender/src/editscreen.c	(revision 10896)
+++ source/blender/src/editscreen.c	(working copy)
@@ -1403,7 +1403,7 @@
 				if(sc == NULL)
 					sc= G.main->screen.first;
 				
-				setscreen(sc);
+				if(is_allowed_to_change_screen(sc)) setscreen(sc);
 				g_activearea= NULL;
 				towin= 0;
 			}
@@ -1416,7 +1416,7 @@
 				if(sc == NULL)
 					sc= G.main->screen.last;
 				
-				setscreen(sc);
+				if(is_allowed_to_change_screen(sc)) setscreen(sc);
 				g_activearea= NULL;
 				towin= 0;
 			}
2007-06-09 05:51:11 +00:00
Juho Vepsalainen
9168c16dda Fixed following issues:
*if a vertex group was renamed in the outliner, the name was not updated 
correctly in visible buttons window
*certain buttons in Render panel didn't update other buttons windows in 
case their value was changed
*same goes for Logic context of the Buttons Window
*also cleaned up unnecessary code from Logic context and made Timer 
field to work correctly when pressed with left mouse button
2007-06-09 05:41:55 +00:00
Campbell Barton
3db1a55b2d added an optional window ID arg to Window.ViewLayers so you can set the layer for each viewport. 2007-06-08 15:41:31 +00:00
Jiri Hnidek
d1711b3972 Patch [#6729] from Juho Vepsäläinen. It adds inverse and random select for metaelems. I simplified random select a little. 2007-06-08 14:17:13 +00:00
Jiri Hnidek
dc8a10bf58 Missing menu items in header menu, Mark Sharp and Clear Sharp. Removed one debug print 2007-06-08 11:52:44 +00:00
Joshua Leung
4a9aa0e064 == Action/NLA ==
* Snap and Mirror tools for the Action Editor, now respect NLA scaling again. I accidentally omitted the relevant code when recoding.

* Snap tool in the NLA Editor, now works for the keyframes displayed for each object too. There's one case I've to check up on later, as there might be interesting conflicts.
2007-06-08 07:31:03 +00:00
Kent Mein
93a3b2b78a Some more coverity fixes.
This one moves some pointer checks up in the code 
(they were after the pointer was used, kind of useless at that point) ;)

Kent
2007-06-07 02:00:11 +00:00
Campbell Barton
25baab252c yafray settings access from Py API 2007-06-06 19:12:07 +00:00
Diego Borghetti
ee0c3245e7 Fix possible segfault in blender.
tname can be bigger of 21 character, in that case
strncpy don't put the final '\0' to the name this.
2007-06-06 15:11:16 +00:00
Joshua Leung
add68862b9 Bugfix #6809: K key in 3d viewport does not exit keyframe mode in Ipo Editor
Patch by Juho Vepsäläinen (BeBraw) included with the report fixes this issue.
2007-06-06 04:13:02 +00:00
Kent Mein
b22a6da7b8 initalize texvec[2] even though its not used, imagewrap checks to make sure its
in a given range.

Kent
2007-06-05 19:39:19 +00:00
Kent Mein
cf528cc946 Again lets check for -1 from BLI_filesize before continuing.
Kent
2007-06-05 15:51:24 +00:00
Kent Mein
0a436e01e2 filelen is set to the return result of BLI_filesize
which can return -1.  So lets check for -1 before calling malloc
and doing more work.

Another coverity fix.

Kent
2007-06-05 15:43:20 +00:00
Kent Mein
d01d36ddd6 Another bug found thanks to Coverity.
typo was indexing past last element in an array.

Kent
2007-06-05 15:11:39 +00:00
Joshua Leung
25935dbdb1 == Action Editor - Major Recode ==
I've just spent two days rewriting the Action Editor to unify its code and bring it under control again (it was 107kb, now it is around 73 kb). 
* This means that there are no longer separate functions for each tool for Actions and Shapekeys in the Action Editor, and also no more missing tools for either. 
* Also, I've gotten rid of the need for those complicated, hierarchial loops used for action channels, as they were a pain to keep consistent with each other.
* Baking functions have been removed. See user-level-changes for more details.
* Reorganised and completely rewrote code in editaction.c, thus the lengthy diff.

User Level Changes:
* For the meantime, border-selecting Action Channels has been disabled
* Baking functions have been removed. As far as I have been able to find out, these were really non-functional anyway. Besides, I don't think they really belonged in editaction.c
* Editing Shapekey keyframes now yields the same feature set as for those in Action Channels.
* There shouldn't be any major bugs left, but I might have missed something.

Further Work:
* Do a cleanup like this to the Action Editor drawing code in drawaction.c
* Baking??? (harkyman seems to be doing something about this)
2007-06-05 12:11:00 +00:00
Juho Vepsalainen
6b9fe36e0b Fixed outliner to update when scriptlinks are altered. 2007-06-05 08:26:18 +00:00
Geoffrey Bantle
ba958bea0f -> Custom Properties for Mesh entities
In order to give import/export script authors the ability to add properties
to inidividual faces, vertices and edges in the same manner as they are able
to do with ID structures three new custom data types have been added to blender
for floats, integers and strings.

Things to note:

-Since property Layers are custom data, they are added to all verts, edges 
 or faces at once.
-Only one property layer for each unique property name may exist. In  other 
 words, you cannot have a float layer as well as an integer layer
 both with the same name.
-No user interface for this exists at the moment.

The following methods and attributes have been added to the Blender.Mesh
Python module and it's object types:

->MVert/Edge/FaceSeq:
	addPropertyLayer(name, type)
	removePropertyLayer(name)
	renamePropertyLayer(original name, new name)
	properties(readonly list.)

->MVert/Edge/Face
	getProperty(name)
	setProperty(name, value)

->Mesh module
	PropertyTypes (readonly dictionary)
2007-06-04 19:18:19 +00:00
Campbell Barton
d5ee6fc865 interface_draw.c - when the char panel was displayed it would mess up font size for other panels.
drawview.c - removed unneeded comment (as GSR pointed out)
2007-06-04 10:53:37 +00:00
Campbell Barton
f368b60baf OBJ smooting groups exported enabled for by default for the first smooth group (should have been disabled)
gen_library.c - Own error, hashing did not decref the tuple it created.
Draw.c - callback also missed a decref
2007-06-04 08:15:27 +00:00
Nicholas Bishop
531ffedba9 == Sculpt Mode ==
Kind of fixed [#6688] sculpt - if 2.44 blend is openned in 2.43 with flatten brush selected causes crash

* Added better handling for new brushes; if more brushes are added they will no longer cause a crash (but this doesn't help older Blenders compiled without this fix.)
2007-06-04 08:03:37 +00:00
Campbell Barton
8e530d5074 Patch from GSR [#6595] Ortho/Persp reporting in the View names 2007-06-04 00:35:19 +00:00
Campbell Barton
9e1b15ff19 [#6787] OOPS window draw changes patch from Matthew Plough (meestaplu)
And added groups to the oopsview
2007-06-04 00:09:41 +00:00
Nicholas Bishop
4287796f61 == Multires ==
Fixed bug [#6798] Multires eventually destroys Meshes with Shapekys

* Moved the check for multires on adding shapekeys into insert_shapekeys rather than on the "Add Shape" button click
2007-06-03 20:24:09 +00:00
Ton Roosendaal
0016aa9e71 Bugfix #6799
Particle system was messing up depsgraph tags, causing bad results
in commandline renders especially (or in rendering first frame of
animation).

Fixed with introducing a temp storage tag in Objects. The real fix
should be to make particle systems behave nice inside the depsgraph.
2007-06-03 08:34:32 +00:00
Brecht Van Lommel
98a77bc9c6 Bugfix: SSS with negative lights gave artifacts. 2007-06-02 22:53:19 +00:00