Commit Graph

647 Commits

Author SHA1 Message Date
77ed2d8ca9 code cleanup: remove paranoid NULL checks (these cases would crash earlier of the vars were in fact NULL) 2012-09-15 06:29:32 +00:00
7a71f58af3 fixes for NULL checks, remove some redundant checks and add some in that have been removed by accident as code has been updated. 2012-09-14 06:17:14 +00:00
aa2d84da37 style cleanup:
also remove some redundant conversions int -> short -> int
2012-09-09 00:00:21 +00:00
56534ecdcb style cleanup: also add debugging print function for derived mesh DM_debug_print_cdlayers() 2012-09-03 02:41:12 +00:00
fe9b1c644f Fix #32458: changing UV image in image editor not working when the active face
was not selected. Now changed it so that the active face must also have its
UVs shown in the image editor to be used as the source of the image shown.
2012-08-31 15:01:40 +00:00
65dbeabdc6 style cleanup: indentation, also quiet double promotion warnings for despeckle node. 2012-08-23 16:17:47 +00:00
1465b06fad code cleanup:
- pass wire color to camera draw_viewport_object_reconstruction() rather then getting the theme color directly.
  this makes a change where selection color wont be used for unselected cameras (which IMHO is better, drawing selected wire color on nonselected cameras was confusing).
- use rgb_uchar_to_float()
2012-08-17 12:32:13 +00:00
219fb7ad79 more draw code cleanup: was making wrong guess about wire color for empty-image draw types. also pass wire color to the metaball. 2012-08-16 18:37:30 +00:00
54196f0e94 change to draw extra wire (draw_wire_extra)
- was changing color and changing glDepthMask even when the object type didnt support wire drawing and no wire would draw.
- was setting the color when no wire would draw.
2012-08-16 17:42:06 +00:00
009b212300 re-work mesh drawing a little since we know the wire color some checks can be avoided. 2012-08-16 17:23:47 +00:00
723408cb9b fix for odd bug/drawing glitch where loose mesh edges would draw with the wrong wire color.
This was because the draw code was ignoring the wire color and incorrectly try to figure it out again.
2012-08-16 16:32:50 +00:00
e71d3ee394 use filtersize of 1.0 for distort and uv - compositor nodes.
Experimenting here and 0.765625f is too sharp, but 1.0 wont blur with 0 distorted pixels but gives nice interpolation otherwise.
2012-08-16 16:07:00 +00:00
c567cf3fab code cleanup: WM naming conventions 2012-08-11 21:35:24 +00:00
f0951f58ca code cleanup: rename G.afbreek --> is_break, G.rendering --> is_rendering 2012-08-08 18:37:06 +00:00
d417cdc9f4 edit fix for [#32177] - drawing text isnt really needed for selections. 2012-07-25 13:55:16 +00:00
c017f91089 Fix [#32177] 'Display Pivot' segfaults blender (Rigid Body Constraint + 3dview)
draw_rigid_body_pivot() didn't check it could actualy use the given ob_wire_col...

Also silenced a compiler warning, and removed (replaced) a potential dengerous pointer cast (char *[4] -> int* is not safe on 64bit machines!).
2012-07-25 12:55:55 +00:00
8904429287 Fix #32156: Blender crashes on linking armature with custom shape
Crash was caused by using NULL pointer as a wire color for drawing
object selection when drawing flag is set to DRAW_CONSTCOLOR.

Solved by not calling drawObjectSelect when DRAW_CONSTCOLOR flag
is set, which seems reasonable -- rather than adding checks deeper
in all possible functions which are being called there easier to
just not call that functions using a single check.
2012-07-22 14:22:07 +00:00
62a73381a7 use fabsf when using floats. 2012-07-21 15:27:40 +00:00
32cf7fcdb1 code cleanup: spelling 2012-07-16 23:23:33 +00:00
7cc5af4ef3 minor refactor for rect functions. more consistent naming. 2012-07-15 00:29:56 +00:00
0361909ab4 style cleanup 2012-07-08 20:36:00 +00:00
84bf3e48c0 style cleanup: use c style comments in C code 2012-07-06 23:56:59 +00:00
53d33d853b game engine & viewport, dont show collision bounds for convex hull or triangle meshes - really visual distraction and they are not used, 2012-06-29 20:26:07 +00:00
f0c724219d Internal refactoring of tracking module, should be no functional changes
- Re-arrange functions in headers and implementation file to make them
  more grouped by entity they're operating with. Also order of functions
  in implementation file should match order of functions in header for
  easier navigation.

- Rename some functions to match conventions of naming public functions.
- Some code de-duplication, still some room for improvements tho.
- Split main 2D tracking functions into smaller steps to make it more clear.

Accidentally OpenMP was disabled in some of previous commits, re-enable it.
2012-06-15 11:03:23 +00:00
6ba5650428 code cleanup: rename flag --> dflag (draw flag), since this is overly generic name and was passed about to many functions. 2012-06-10 10:15:49 +00:00
742171f609 fix for crash with recent color commits to draw-object, this case wasnt handled correctly before. 2012-06-07 15:20:51 +00:00
3140cd993d fix for crash with selecting camera bundles. 2012-06-07 14:21:25 +00:00
bc961c90a2 fix for armature specular material color overriding the wire color when instanced in a dupli 2012-06-07 09:04:45 +00:00
a921ca86f7 fix for error in previous commit.
- dupli-group armatures with pose bone objects set would draw with uninitialized color
- also fix old bug - armature were over-riding the constcolor option - so drawing dupli-groups for eg - would ignore the DRAW_CONSTCOLOR flag.
2012-06-07 08:02:48 +00:00
e69ec8be55 Bugfix [#31735] Performance issue related to object parenting to armature
In the file included with the bugreport, framerates were dropping from 60fps to
11fps for an armature with several lattices parented, and a 5fps drop everytime
an object was parented to the armature.

Upon (re-)inspection of the code, it became apparent that this was being caused
by a block of code that would recalculate the parent (perhaps recursively) as it
thought the parent state was for the wrong timestamp. However, the timestamps
this was using was never really updated (except for a single place, which set it
to a single fixed value to force recalculations to take place), which meant that
this branch was run all the time. AFACT, this is a remnant from some of the old
timeoffset stuff + pre-Depsgraph timestamping hacks that are no longer used/set.
2012-06-07 05:29:10 +00:00
b53b03ac1c pass the object wire color along to drawing functions, too many places would use glGetFloatv(GL_CURRENT_COLOR, curcol), which also become confusing to debug if in some cases the color was set beforehand. 2012-06-06 18:00:08 +00:00
1931aac1f7 style cleanup: (indentation) 2012-06-06 14:48:39 +00:00
3a190396dd Fix [#31621] Face Angles Drawn in Strange Places
When do_global is True, don’t compute face angles/area positions based on ob-matrix-transformed coordinates!
2012-05-28 09:01:43 +00:00
032d83ecc4 style cleanup: defines with braces 2012-05-27 20:13:59 +00:00
ed98de3398 code cleanup: dutch -> english (comments) 2012-05-26 13:31:57 +00:00
57c292daf0 style cleanup 2012-05-25 09:51:53 +00:00
c4bbc5abfc Fixed smoke 3D-view issues: Preview became invisible from certain angles if domain size was < 1.0 and density+shading strength changed depended on domain size. 2012-05-25 09:40:56 +00:00
19dd66cf3b 3D View: add Backface Culling option, to hide faces when seen from the back side,
found in the Display panel.

Patch by Simon Kirk and Irie Shinsuke, refactored to also work for non-mesh objects
and avoid globals.
2012-05-25 09:26:47 +00:00
f883d12e0c Smoke: Start fixing scaling issues which happen with non cube-shaped domains.
Detail: Smoke solver and Blender side of smoke now share the same cell length.

First reported by the Sintel artists long ago, again reported by MiikaH.

Part of my Smoke Development Project Phase III.
2012-05-24 23:50:20 +00:00
dab1d8e487 style cleanup 2012-05-22 22:03:41 +00:00
3fc3c9f3b4 style cleanup: relating to skin modifier 2012-05-22 16:09:31 +00:00
417ac69320 Draw skin vertex roots in edit mode.
Roots are drawn with a view-oriented dashed red circle around the
vertex location. The circle's radius is the average if the skin
vertex's X and Y radii.

Skin modifier documentation:
http://wiki.blender.org/index.php/User:Nicholasbishop/SkinModifier
2012-05-22 15:29:27 +00:00
2d2d36fe3b code cleanup:
- style - multi-line ifs move braces onto new lines.
- iterators - convert some to macros, other split up and move brace.
2012-05-20 19:49:27 +00:00
436b63eea5 Fix [#31535] Radian Unit System Button Ignored for Face Angles display.
Also avoid multiplying each vertex three times with obmat...
2012-05-19 20:16:29 +00:00
af3e348430 code cleanup: use TRUE/FALSE rather then 1/0 for better readability, also replace do prefix with do_ for bool vars. 2012-05-19 13:28:19 +00:00
1b6600c3e8 Fix [#31432] Angles values stuck at 60 degrees. 2012-05-16 20:35:09 +00:00
fc576add9f Fix issue with linked dupli objects not being displayed in the viewport, if they
have no object bounding box. Better fix will be to figure out why they are the
bounding boxes are not made.

Thanks to Campbell to tracking down the commit that caused this.
2012-05-16 14:36:15 +00:00
9bcf305431 fix [#31474] Crash when object has parent and dupli_type == 'FRAMES' and show_x_ray, show_transparent are set to True
dupli objects should never be added to after-draw, added an assert to ensure this (and make fixing such bugs easier).
2012-05-16 08:42:50 +00:00
caba2601ea fix for fix, own fix for [#31368] didnt work right, now move shadeless & wire paint drawing into draw_mesh_paint(). 2012-05-10 06:32:24 +00:00
1f223801d4 some speedups for face angle drawing
- avoid calculating face center when the face isnt used at all.
- avoid copying vectors when its not needed.
2012-05-09 16:43:09 +00:00