Commit Graph

251 Commits

Author SHA1 Message Date
0955c664aa 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.
2011-02-13 10:52:18 +00:00
55f68c3657 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).
2011-02-12 16:54:24 +00:00
4cb79661eb Fix for [#25633] Particles display switching causes crash when Velocity disp. ON
* Particle draw data wasn't freed properly in some cases.
* Velocity + circle draw type also crashed due to missing null pointer check.
2011-01-15 12:29:22 +00:00
63018144ba remove redundant assignments & unused vars.
also minor functional changes
- OBJECT_OT_make_links_data() type property is now assigned to the operator property (so popup menu can find it)
- removing BG image now returns cancelled if no image is removed.
2011-01-12 03:41:12 +00:00
ede0d85522 comment/remove various unused vars,
also make rna function for new images require width and hight args.
2011-01-10 03:58:07 +00:00
99a835d482 warning from clang, possible crash:
'cd' could be NULL, all other particle draw types checked 'cd' except for PART_DRAW_AXIS, seems logical to have the check here too.
2011-01-09 15:28:43 +00:00
89c9aaaa25 remove references to BKE_utildefines where its not needed.
- move GS() define into DNA_ID.h
- add BLI_utildefines as an automatic include with makesrna generated files.
2011-01-07 19:18:31 +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
64c3ea272e Todo item: linked curve objects behaves incorrect with modifiers
Use object's displists for storing deformed tesselated curve. Was unable to
totally get rid of curve's displist because of how texture space is calculating.
2011-01-05 10:40:38 +00:00
f533630585 dont draw lamp volume when its being used as the view camera, would flicker annoyingly when flying the lamp about to position it. 2011-01-03 06:45:47 +00:00
f543fe1500 Bugfix #25341
Child-of constraint issue: on adding, it wasn't checking owner
correctly for Bones, resulting in a constraint working in wrong
space; it looked as if transform was applied double when moving
the object. Only adding via Py API went wrong btw.

Also found a silly check for drawing constraints, which caused
constraint initialization to happen for every object on every
redraw!

Implementation note: con->flag CONSTRAINT_SPACEONCE was only used
for child-of constraints in Bones, so I've patched it on file
reading to always set the flag. Marked with XXX, so it can be
removed one day. Now at least things get corrected well for
imported armatures.
2010-12-23 13:16:56 +00:00
b4f61f0733 remove View3D.customdata_mask, since its stored in the scene now there is no need for each view to store every views combine data mask. 2010-12-23 04:26:53 +00:00
3bed4cbf2b fix [#25283] Edge length display difficult to read
- made theme colors for mesh edge len & face angle/area display.
- use %g rather then %f for float display, trims unneeded zeros.
- store cached 2d and 3d text color as bytes rather then floats, compare when drawing to avoid setting the context.
- use unsigned char for more color functions, avoids casting to glColorubv().
2010-12-20 03:59:22 +00:00
93cbc840e0 Fix for [#25198] Smoke gets shown before simulation starts
* Smoke is now only drawn/rendered after the simulation frame range starts.
* This does not apply to simulation end frame though, so that any remaining smoke can for example be faded away nicely through material settings.
2010-12-14 14:45:56 +00:00
47d6166adb fix [#25088] Add spot lamp causing crash
this is actually an assert not a crash, when the lamp and view axis were aligned, the quat could not correctly be converted into a matrix.
Now fallback to the X axis in this case.
2010-12-08 00:58:15 +00:00
b5ab3980e8 Fix #25085: Enabling "Show Cone" on dupliverted buffer spots crashes Blender
Cone can't be drawn for duplicated lamps, because lamps with cone are drawn after
main draw function (from view3d_draw_transp) and list of duplicated object gets
freed to this moment.

Disable cone draw for lamps which are from dupli.
2010-12-07 20:22:35 +00:00
5c8dfc1d51 bugfix [#25057] Vertex paint - Cannot select or paint vertices of obscured vertices, even when obscuring faces are hiddden 2010-12-06 06:26:47 +00:00
8a65538fe0 fix for camera border going outside the clipping range while in camera view. 2010-12-05 02:16:01 +00:00
9dbb31383f remove shadowed definitions but keep them as zero this time. 2010-12-03 23:55:10 +00:00
1ebfb545ee Bugfix #2508
Campbell's cleanup commit  33442 today broke axes drawing.
Restored code.
2010-12-03 19:29:05 +00:00
cd97253502 - added GCC warning -Wstrict-prototypes
- fixed bug in paste material, exposed by stricter warnings.
- removed/renamed various shadowed vars.
- removed BGE lamp.colour, only allow lamp.color attribute.
2010-12-03 12:30:59 +00:00
dbf01ba68c Particle draw was calling glColorMaterial(...) after glEnable(GL_COLOR_MATERIAL), this is documented to be incorrect.
On my system it set the ambient color value to 1.0.
2010-11-26 23:38:23 +00:00
a7cce73fd0 fix [#24900] Texture paint mode broken
own commit r33070 broke this.
2010-11-26 00:52:37 +00:00
5fff1a98a1 Fixed missed selection oulines for curves/surfaces/fonts/armature when texture shading is active 2010-11-21 14:05:18 +00:00
b2a227b442 Tsk! Circle, cross and axis draw types for particles weren't using the particle draw size. 2010-11-19 16:19:15 +00:00
48524d6e91 fix [#24780] Metaballs are not drawn correctly in new scenes
this is a can of worms, at the moment blender depends on broken behavior for metaballs:
 find_basis_mball() can return a metaball object that fails a is_basis_mball() check which makes this logic very confusing (added note about this in mball.c).

Metaballs needs a refactor however at least make drawing fail consistently,
For wire draw is_basis_mball() wasn't being checked, for solid drawing it was (hence the strange wire frame).

For now the motherball needs to exist in the main scene else it wont work.
2010-11-18 04:26:50 +00:00
7be25eba13 fix [#24712] 3ds_import fix
Rather then applying the proposed fix, enabling 'Apply Transform' works in almost all cases including the reported one.

There are some files that don't work with 'Apply Transform', which is why the option is worth keeping.

also remove unneeded calls to paint_facesel_test()
2010-11-15 00:07:38 +00:00
80a650dfb1 BLF_draw functions take an extra length argument, so the console drawing doenst need to swap in NULL chars to draw word wrapping. 2010-11-11 06:35:45 +00:00
cc395e4d2f fix for not being able to select the camera while in the camera view, also draw the camera unscaled in the 3D view. 2010-11-08 09:38:48 +00:00
c300d58497 - when orbiting the view out of camera mode use the ortho/persp setting of the camera.
- display the physical size of a ortho camera since, unlike a perspective camera the ortho scale can be converted into a plane with real size.
2010-11-08 02:30:46 +00:00
12770dba0e use RV3D_CAMOB define, theres no reason to use >= comparison either.
also fixed opengl render ortho test.
2010-11-07 10:36:06 +00:00
7569a25a4f centralize function for calculating pixel size. (no functional changes) 2010-11-05 05:26:34 +00:00
fe8d5b81b0 use c90 compatible static initializers. 2010-11-03 06:31:53 +00:00
b349f7c99d Minor speedups for 3D view text drawing ~10-15% improved frame-rate with particle display.
- ascii text drawing functions, slightly faster since they dont have to do hash lookups & utf8 conversions for each char.
- used ascii drawing functions for the view3d's number display.
- each text item was using fixed 128 chars, now only allocate the string length needed.
2010-10-30 23:02:38 +00:00
7869c7ee85 Fix for [#24383] Particles using "circle" as display, are disabled on opening file 2010-10-25 17:20:12 +00:00
Nathan Letwory
715fa82769 Make sure separation between modifier keys is communicated from GHOST upwards too (BGE at least uses this). 2010-10-24 12:45:47 +00:00
1de1d6537e Fully disable AUD's FFTW3 usage. 2010-10-24 00:09:23 +00:00
a781157047 Fix for bugs [#24316] Changing particles path step in particle mode makes lines invisible and [#24318] Particle lines disappear if view particles are enabled. 2010-10-19 09:28:38 +00:00
a7734cf3c0 bugfix [#24314] Motion path (ghosting/onioning) numbers are displayed with offset 2010-10-19 02:41:09 +00:00
b7ad16983c Camera object drawing now shows shift (not especially important but the tracker is being unusably slow) 2010-10-18 08:11:34 +00:00
a9197c3aa2 remove unused args in draw*.c and some in view*.c, tag some as UNUSED(). 2010-10-14 01:22:14 +00:00
1579c1a5c9 weight-paint in solid draw mode would draw the wire twice, also change wire drawing to draw all edges and better visibility over yellow areas. 2010-10-10 22:15:48 +00:00
8a4fe62843 misc fixes found with clang's static checker. 2010-10-07 10:04:07 +00:00
0eeeab515b bugfix [#23506] Bevel Modifier display problem
This is a more general problem that drawing functions would skip faces when the original index could not be found, screw result for example wasnt visible in editmode too.
Fixed by adding a material set argument to DerivedMesh->drawMappedFaces(), this was already being done in some of the other drawing functions.
2010-10-05 11:25:34 +00:00
2e44e06450 minor adjustment to camera object drawing so arrow stays same size independent of aspect. 2010-10-01 13:27:59 +00:00
690397efb2 bugfix [#23908] Irratic manipulator scale at far out distances 2010-09-28 04:25:16 +00:00
efbda5c53e Fix #23754: glsl + constructive curve modifier not drawing correct. 2010-09-20 21:57:29 +00:00
8737dcfc7b bugfix [#23722] Artifact in 3D View with empties saved to default .blend. 2010-09-08 02:55:48 +00:00
4a427fa4ff Particle billboards weren't created properly 2010-09-01 10:29:03 +00:00
7d0e4ac889 simplify pass drawing, give each pass its own list, avoids some context switching.
- also fixes a problem where xray+transp+alpha1.0 objects wouldnt draw at all.
- the patch worked by adding twice but this leaked memory.
- solve by adding the xraytransp object to the xray list if the alpha is 1.0
2010-08-25 14:23:02 +00:00