Commit Graph

3971 Commits

Author SHA1 Message Date
Alexander Ewering
dfe3ad0d7b copy_softbody() didn't check if object actually was softbody! 2005-04-16 16:56:06 +00:00
Ton Roosendaal
5ff281eaec Li'll feat request;
When curve objects have no front/back faces, the bevels were only drawn
for the outer part. Now it also makes interior bevels, so yo can
have a curve become a 'solid' ring easily.
Note: only works when you disable filling option "Front" and "Back".
2005-04-16 15:51:44 +00:00
Johnny Matthews
56591ade33 The setup functions for SB and PI now initialize the vars to the defaults that are set in the UI when one of the panels are accessed. Current this happens whenever an SB or PI api function is called for the first time. 2005-04-16 15:33:38 +00:00
Ton Roosendaal
07ef51cdb1 More SoftBody stuff:
- after grab/duplicate the softbody didn't get a reset signal
- added 'copy properties' for softbody settings
- duplicate object didn't copy softbody yet
2005-04-16 15:06:02 +00:00
Ton Roosendaal
7943f7990e Softbody:
- Added browsing for vertex group for "Goal" in SoftBody buttons.
- Means the default name "SOFTGOAL" isn't needed anymore
- temporally, on file read, the "SOFTGOAL" vertex group is set, if exists
- removing vertex group possible too
- changed softbody.c code to use this
2005-04-16 14:01:49 +00:00
Ton Roosendaal
097726eb50 For the manipulator freaks; rotate widget with 'arcs' now displays the
transparant grey (ghosted) rotation where mouse click started.
2005-04-16 12:35:42 +00:00
Willian Padovani Germano
e7469acd16 Scripts: missed removing this one (was updated by jms and renamed to unweld.py simply) 2005-04-16 05:42:52 +00:00
Willian Padovani Germano
d65fc84a68 Note: this commit includes new functionality to save and restore scripts configure options. This is ongoing work, scripts still have to be updated to use this feature and more tests are needed, though many have been performed. The new Scripts Config Editor script is the main part of this. If anyone wants to check it, only the AC3D importer and exporter have already been updated to use it: simply open them (you can then cancel with ESC) to have the data created, then try the config editor.
Scripts:
- Thanks Jean-Michel Soler (jms) for updated versions of dispaint, fixfromarmature and unweld (also renamed to remove version part).
- Thanks Bart for the upgraded VRML exporter (great doc webpage!).  It is available as VRML 97 and the original VRML 2 is for now still there, to help users testing the new version.  For the next release the old one should be removed, of course.
- New script: Scripts Config Editor (Scripts win -> Scripts -> System).  Scripts with config options (simple data that is to be set according to user needs or preferences) can use this facility instead of providing a gui and writing config files to disk themselves.
- Added new menu: System, available in the Scripts win.
- Updated sys_info.py, help_browse.py and the AC3D importer and exporter.
- Removed use of the Scrollbar and added arrow keys and mouse wheel support instead in Daniel Dunbar's old doc_browser.py. The scrollbar events handling doesn't exist, Ton suggested removing the scrollbar from the API months ago.  For now its ref doc is gone and no bundled script uses it, until we get time to implement it properly.
- Added module BPyRegistry.py with functions to handle reading / writing config files automatically to the scripts/bpydata/config dir.
- Removing dir release/bpydata and its contents (moved earlier to release/scripts/bpydata/)
- Bug #2379: made small changes to bevel_center's ui to fix a problem reported by Alexander Ewering (intrr):
http://projects.blender.org/tracker/?func=detail&atid=125&aid=2379&group_id=9

BPython:
- Thanks Campbell Barton for new functionality: Blender.Get() now can also return all the paths from the user prefs -> file paths win and there is a new function: Blender.sys.expandpath() to transform Blender paths (those starting with '//' and ending with '#') to absolute paths.
- Added function Blender.ShowHelp(), to open the Scripts Help Browser with a given help page -- just a time saver for scripts.
- Improved function Blender.Run() to also work with gui and file select scripts.
- Found a (new?) crash related to NMesh.PutRaw when creating a new object while in edit mode.  Leaving / entering edit mode fixes the problem, so a check for obj created, edit mode and leaving / re-entering it were added to the code for now (gdb didn't help much, no backtrace)
- doc updates, including splitting intro page in two, with bpython related stuff (registering / documenting / configuring scripts and command line mode (thanks Chris Want for "use system variables to pass parameters to scripts" idea).
- Registry: functions have been updated to support writing to / reading from disk, for the config editor -- only simple config data supported, for large amounts coders should write to a file themselves.  This is done with a new parameter: Registry.GetKey(keyname, True) will also search for the key on the config dir, if not already loaded; equiv. for Registry.SetKey(keyname, dict, True).  Data is only written to / read from disk when needed and only scripts already used (assuming they support this functionality) will have config data saved.
2005-04-16 05:25:42 +00:00
Ton Roosendaal
8b664b924b In localview the Manipulator didnt center at correct 3d cursor location. 2005-04-15 21:39:36 +00:00
Ton Roosendaal
0f279e61ed Extrude normal correction part #4!
It works OK for faces extrude, but with only edges it should work too. :)
2005-04-15 21:33:41 +00:00
Ton Roosendaal
f6977da8e2 Another attempt to make extrude deliver correct normals.
Rule is flipped when it doesn't extrude a 'volume', in that case normals
point outside based on extruding in direction of original normals.
2005-04-15 20:29:08 +00:00
Johnny Matthews
ca9e54b6aa Fixes timecode to run frames 0 to (fps-1) rather than 1 to fps 2005-04-15 13:38:27 +00:00
Johnny Matthews
baa0b8ce25 Similar to last commit, This initializes the pd pointer if it is null for Particle interaction. for all the PI functions 2005-04-14 20:41:02 +00:00
Johnny Matthews
95994e937f This commit initializes the softbody pointer if it is accessed through python and has not yet been set up. 2005-04-14 20:11:10 +00:00
Johnny Matthews
4108a47720 Adds getTimeCode() to Rendering Context so that you can get current frame in HH:MM:SS:FF string format 2005-04-14 18:27:11 +00:00
Johnny Matthews
442f0d1411 Adds API for Particle Interaction Settings and Softbody Settings
Also adds docs for above API.

My testing cases seem to work fine. Please test to make sure I have not
missed anything!

Stivs, I got ascotan's signoff on thses. But please make any adjustments that
you deem needed.

Johnny
2005-04-14 17:56:37 +00:00
Daniel Dunbar
71f619cd23 - make sure object outline doesn't get drawn in faceselect mode 2005-04-14 13:46:49 +00:00
Daniel Dunbar
11ef47407d - bug fix, tface flags weren't checked correctly for INVISIBLE
- bug fix, tfaces weren't accessed correctly in presence of hidden/invis.
2005-04-14 13:46:05 +00:00
Chris Want
4741ad101a Having come to understand the nature of bug #1576 a little better,
I can now say that I declared it fixed erroneously before, and
I hope that when I call it fixed now it can really, truly be laid
to rest.

Sometimes when you escape a transform on an object that is the
target of an IK constraint on an armature bone, the rotations were
not restored correctly on the bones in the IK chain. This commit
fixes this problem in a rather brute force manner.
2005-04-14 03:11:41 +00:00
Jens Ole Wund
f2678b8dac hum ..
turned off quad optimization, which is a bug IMHO, since breaking a quad it 2
faces always needs a test on both faces
2005-04-13 20:32:28 +00:00
Ton Roosendaal
4714432110 Little cleanup in code to detect correct normal directions on extrude.
It also now inverts normals of copied faces for extrude, provided the
originals remain there.
2005-04-13 19:34:29 +00:00
Ton Roosendaal
f5cb2db604 Ack! Found out the bugfix commit #2411 was accidentally still calling to do
all actions (in all objects) instead of only the ones parented to
particle system.
2005-04-13 19:26:38 +00:00
Ton Roosendaal
c3221bac83 Two small corrections for subsurf + wire render;
- when edges data exists, it skips adding faces to renderlist
- edges are rendered according to "Optimal" subsurf setting
2005-04-13 14:03:10 +00:00
Jens Ole Wund
84359bf996 im going to dig a hole to hide in
beginners standard typo did break particles
2005-04-13 12:18:58 +00:00
Daniel Dunbar
48c5b10ea1 - quick fix for bug #2412, render normal was not initialized for mesh
edges. fix by average two edge endpoint vertex normals.
2005-04-13 12:06:59 +00:00
Daniel Dunbar
9b354599e0 - fix for bug #2385, mesh outline wasn't drawing in potatoe mode 2005-04-13 11:46:46 +00:00
Jens Ole Wund
22ccdea4d3 Rather give a pointer to a local copy of vital data to pdDoDeflection()
in sb_deflect_particle() than a pointer to data.

Changed de-swamping in sb collision to move along face normal.
2005-04-13 07:51:06 +00:00
Jens Ole Wund
c7b82c40c2 Did put softbody time scaling stuff to functions,
so we can decide later what proper timing is meant to be.
i've prepared something in static float sb_time_scale(Object *ob) [softbody.c] (ton :) )

'hacked in' particle collision system to match softbodies needs
naa .. i don't realy like the hack to int pdDoDeflection(..) in kernel .. effect.c  (but it works :) )
so .. until we'll have a 'nice' collision detector this is what 'softbodies simulator can live with'
did not remove intentionally test function static int sb_deflect_test(..) for further discussions

http://mitglied.lycos.de/mosebjorn/hidden/  sbcol6.blend should work for a while
2005-04-12 21:36:21 +00:00
Ton Roosendaal
14fe1cb215 Bug fix #2438
Snapping code checked for Hooks in object, but forgot to check first if
the Hook->parent existed. Crashed on 'empty' hooks.
2005-04-12 11:53:46 +00:00
Ton Roosendaal
5f237e67cc Bug fix #2323
The addition in 2.36 to correct bumpmapping for View and Object rotation,
made many nice bumpmap setups in older files less nice. Especially apparent
when you apply "flipped" mappings in "Map Input" Panel, like map the X to Z
and the Z to X. A correction then gives wrong results.

Since the "correct bumpmapping" is actually a new option, causing extra
rendertime too, I've made it an option now. With the "Map To" Panel being
fully used, I've put the new button option (temporally I hope) in the first
"Texture" Panel in material context.

Will be updated in release log page!
2005-04-12 11:45:06 +00:00
Ton Roosendaal
1bde293997 Bug fix #2394
While in camera view, going to local axis rotation (R, X, X) the view
became instable. Was still using the view3d view matrix, instead of
initialized TransInfo->viewmat.

Martin; you could check on the mouse motion in this case, for some reason
it only uses horizontal motion?

ALso; renamed button in InfoWindow "Disable sound" to "Disable Game Sound".
2005-04-12 10:08:04 +00:00
Alfredo de Greef
8be210bd7e Quick fix for bug #2393 (same as #2218), deformed meshes were not transformed
correctly anymore because of changes in other blender code.
2005-04-11 23:23:25 +00:00
Martin Poirier
2123721b5b Transform constraints with Ykey were mixed up, setting text to global
instead of local and vice versa.

Thanks to GSR's email for helping me notice that.
2005-04-11 22:29:20 +00:00
Martin Poirier
a3e5727f75 Small transform fixes.
Rotation acted weird in perspective mode. Works much better using viewinv
instead of persinv to get the rotation axis. What would be even better is
using real view vector depending on transformation center (with
getViewVector), but that can wait a bit.

Meta Element resize needed some code to reset radius changes or axis size
changes when switching from one to the other (my fault, I didn't think of this
when telling Jiri how to implement it).
2005-04-11 21:19:38 +00:00
Jiri Hnidek
78939c0cc0 - It is possible to scale radius of MetaElem again.
- It is possible to change dx, dy and dz params in 3Dview with manipulators
    or with some shortcuts (S-X, S-Y, S-Z).
 - User can scale stiffness when green circle is selected.
 - MetaElem is selected with RMB click at green or red circle, then user can
    grab or rotate with MetaElem as usual.

 - Screenshot:
    http://e-learning.vslib.cz/~hnidek/pics/scale_stiffness.jpg

 - Captured video:
    http://e-learning.vslib.cz/~hnidek/captured-videos/scale_stiffness.avi
2005-04-11 19:31:05 +00:00
Ton Roosendaal
52b7b978e3 Bug fix #2411
(Looks like big commit, but is mostly just change of API call!)

Particle emittors now can be parented to an armature Bone, and give the
correct path for each particle. Note that this doesn't work for deform!
And, for each particle the entire armature is evaluated, all actions and
NLA strips.

It used to work a little while BTW, but the code just called ALL armatures
and made ALL deforms again. Was quite slow... thats why the API call
change: do_all_actions() now accepts Object * to only do that one. With
a NULL it now does all still. Will disapppear in recode of course...
2005-04-11 17:55:20 +00:00
Ton Roosendaal
bb9548fd16 Silly pointer set on wrong place in code, caused Bones transform in
PoseMode not to work on branched armatures with multiple selected.

Thanks Richie for the test file!
2005-04-11 15:14:07 +00:00
Ton Roosendaal
8eaef2525f Bug fix #2413
Usage of uninitialezed pointer in 'extrude edges only' could crash.
2005-04-11 14:01:34 +00:00
Ton Roosendaal
618ac4a4e9 Bug fix #2415
Envmap rendering was using Gauss filtering, causing dark outlines in edges
of cube pictures. Now it temporally disables gauss in envmap render, which
isn't really noticable since the pics are filtered + gaussed anyway in the
end result.
2005-04-11 13:49:05 +00:00
Ton Roosendaal
cfc9a56f0d Bug fix #2428
The "Separate" and "Split" commands in editmode Mesh didn't take loose
edges into account correctly (leaving them in). These edges now get
removed correctly.

Note; this changes the tool XKEY "Delete->Faces" slightly. This already
removed entire faces and loose selected vertices. Now also removes loose
selected edges. More consistant, but maybe a bit confusing...
2005-04-11 10:45:20 +00:00
Ton Roosendaal
f08c0f388a Bug fix #2431
Underflow case in Blinn spec... resulting in large negative values to be
returned in certain cases, causing (again!) black dots.
Thanks randall for clear report with nice demo file. :)
2005-04-11 10:20:17 +00:00
Ton Roosendaal
4f55dd8c91 Bug fix #2424
With a sun lamp shining exact perpendicular to a face, the result was
undefined (black or full lit). Was caused by using acos() without checking
the input range. Float calculus can result in small under or overflows...
therefore: always use the arithb.c function saacos() !!!

Found more acos() usage in rendercore (in blinn and arealight too), removed
all of them. Might solve the white or black dots people were complaining
about?
2005-04-11 08:49:42 +00:00
Martin Poirier
218ee423d9 Resize didn't work with bezier handles correctly. That is because bezier has preleminary work for Individual Center in edit mode.
While I was there, I cleaned up individual center a bit, it was messing with helpline.

For fun, set the center mode to Individual Center, create a bezier circle, change handle to free (H) and Resize or Rotate. Fun isn't it! :)
2005-04-10 20:09:31 +00:00
Martin Poirier
4ea8947ea7 Merged all the internal transform includes into transform.h and moves it to /src to /include.
Split the conversion fonctions and sorting functions from transform.c into transform_conversions.c
Update MSVC 6.0 projectiles and SConscript accordingly.
Editview still included transform.h, replaced that for BIF_transform.h, the external include.
2005-04-10 18:33:19 +00:00
Daniel Dunbar
6fa9f9b7f5 - don't apply creasing to edges with no adjacent faces... things
go wacky.
2005-04-10 15:04:52 +00:00
Daniel Dunbar
6fabf998e8 - bug fix #2433, mesh not drawn correctly when only edges
(and Mesh.medge).
2005-04-10 14:31:04 +00:00
Stephen Swaney
e8a6bf6fb9 Bugfix for disappearing hilight bug and code re-org for text editor
from Ricki Myers (themyers).

Comes with nice juicy commit msg, too!

- source/blender/blenkernel/BKE_text.h

	- Removed indent_paste, uncommen, unindent_lines, comment_paste,
	uncomment_paste, uncomment, set_tabs.

	All these functions cut and re-added text (I felt this was
	unsafe). whicch is was caused the highlight loss.


	- Now the only functions are Indent, Unindent, comment, uncomment,
	  setcurr_tab. 	All these functions only take one @parm (struct Text)

	-indent(struct Text *text)
		copy's the selected text in a MEM_mallocN line by line added a
		tab at the begginning

	- Unindent(struct Text *text)
		Tests if current line starts with a tab.
		if TAB remove it
	- comment(struct Text *text)
		copy's the selected text in a MEM_mallocN and adding a # at the begginning

	- Uncomment(struct Text *text)
		Tests if current line starts with a #.
		if # remove it

	- setcurr_tab (Text *text)
		Checks for Tabs pri. to any text
		if : is found and not in a comment then Tabs is increased by one
		if "return", "break", "pass" is found then Tabs is decreased

- blender/source/blender/src/header_text.c

	Changed:	txt_cut_sel(text);
			indent_paste(text);
	TO:
			txt_order_cursors(text);
			indent(text);
	* no more cutting of the text

- source/blender/src/drawtext.c

	set_tabs(Text *text) just calls setcurr_tab(text);
2005-04-10 14:01:41 +00:00
Rob Haarsma
28064baa5c Uncommitted my last commit. 2005-04-10 08:46:47 +00:00
Daniel Dunbar
b1675a345a - made shadedisplist not free all object displist data...
this messed with data caches which messed with assumptions made
   by drawing code (and was just silly not to mention). here
   be dragons...
2005-04-10 00:00:34 +00:00
Chris Want
ae91ba8ba6 Fix for bug #1576.
Constraints on bones that point to objects/bones outside of
an armature weren't working. The figure_pose_updating()
does a bunch of flagging based on the constraints on the
scene to figure out what armatures/bones need updating
(even when it is not the armature that is being manipulated).
2005-04-09 23:38:35 +00:00