Commit Graph

2065 Commits

Author SHA1 Message Date
02fbfa5c70 Fix unnecessary 3D viewport redraws in various cases, in particular when editing
node materials.

Area and region listener callbacks now get the screen and area pointers passed, so
they can do more fine grained checks to see if redraw is really needed, for example
depending on the 3D view drawtype.
2013-06-24 22:41:33 +00:00
2df82a2a2b Code cleanup: fix some vs2012 compiler warnings 2013-06-21 12:33:19 +00:00
033089d286 Usability:
For users without middle-mouse buttons, they can now use Circle and Border
deselect by holding SHIFT. Middle mouse still works too.
2013-06-19 15:20:50 +00:00
447e9a4cd5 add option to enable auto-execute scripts, but exclude certain directories. 2013-06-18 18:11:52 +00:00
e6c54c26ae use booleans for operator check functions. 2013-06-18 15:30:51 +00:00
Nathan Letwory
11f104a4a3 Fix [#35728] "Load Factory Settings" changes temp fonder to "/temp/\"
This was actually being reset to "/tmp\".

Initialisation for the temp dir was missing after the userpref reload.
2013-06-15 20:12:16 +00:00
bff8a4c594 correction to typo in r57327, ui-load wasnt working on splash screen.
also minor changes:
- update the load-UI flag when changing in the preferences.
- remove unused initialization values for subdivide.
2013-06-10 10:55:57 +00:00
0d699fb46a minor edit to previous commit, only show option to reload the file if its been saved. 2013-06-10 02:05:38 +00:00
412c043474 Python script auto-execution changes:
- script execution is off by default

- if a blend file attempts to execute a script
  this shows a message in the header with the action
  that was suppressed (script/driver/game-autostart) and 2 buttons to either reload the file trusted, or to ignore the message.

- the file selector will always default to use the trust setting in the user preferences,
  but reloading an open file will keep using the current setting (whatever was set before or set on the command-line).

- added SCons setting WITH_BF_PYTHON_SECURITY, this sets the default state for the user prefereces not to trust blend files on load.
  ... this option was in CMake before, but always off, now its enabled by default for SCons and CMake, and forced on in CMake for now.
2013-06-10 00:42:16 +00:00
e7a487d1e9 code cleanup: group python reset functions in BPY_python_reset() 2013-06-09 23:31:53 +00:00
c24be7ec6e Usablity:
Textbuttons: double click now selects entire words (like on file path segements)
Triple click was requested too, but that's not a WM event type yet.
2013-06-07 15:42:26 +00:00
a6b505ef0b style cleanup 2013-06-06 06:02:46 +00:00
601e5ad2f4 Fix #35624: rendering to a new window, then switching scene in the main window,
would still continue to render the previous scene in the render window on F12.
2013-06-04 15:36:00 +00:00
2a195b7825 fix [#35501] Operator log: some property changes log as [...].(null) = ... 2013-06-03 00:46:20 +00:00
0c004723fe fix [#35434] Segmentation fault switching screen layout from python
(take 2), only free popup handlers.
2013-06-02 20:59:00 +00:00
c6d1b6c3fc Bug fix, own collection while testing
New OSX "Life resize" was also being called during opening of windows - when things are
not initialized yet. Crashed on opening full-screen window (which is animated in OSX).
2013-06-01 15:24:15 +00:00
9fb3d3e032 remove redundant includes from cmake and scons. 2013-05-30 02:16:22 +00:00
225c5fee6b move BLO_sys_types.h -> BLI_sys_types.h (it had nothing todo with loading)
remove MEM_sys_types.h which was a duplicate.
2013-05-28 19:35:26 +00:00
c77179a3c2 code cleanup: comment/remove unused defines 2013-05-28 01:15:59 +00:00
7e9fdd97ba fix for incorrect type casting when checking macros exec() functions.
infact this worked by accident, but didn't crash.
2013-05-25 22:07:21 +00:00
b9817cd207 Live resize on Windows. Based on Ton's patch for mac.
Removing old resize stuff. 
Windows has resize lag, which creates black gap with openGL. Still looking to fix it.
2013-05-25 21:59:34 +00:00
24321d4891 Solving ancient Blender window sizing issue;
- Removed grid-snapping for area coordinates on scaling windows. 
  That caused the areas to shrink or expand, and eventually corrupt screen layouts.

- Added simple but efficient life resize for OSX. I need to know why this is so much
  code for Windows... I suggest Windows to just copy same method; dispatch the queue,
  and just let the event system draw.
2013-05-25 14:08:56 +00:00
b6a4ea3d95 Bug fix #35481
Browsing screens via menu disabled screen editing (area divider drag) and made
popup menu hanging (select same editor for example).

Caused by bug fix #35434, commit gets rewinded, and report reopened.
2013-05-23 15:10:36 +00:00
cd6b27f2b5 remove return value from MEM_freeN, it wasn't used anywhere and was cast to a different function signature. (which evidently works but error prone). 2013-05-21 07:37:59 +00:00
7b36dea115 code cleanup: scons - binreloc include was copied all over the place for no reason, -pthread too. 2013-05-20 18:55:08 +00:00
6de829cb7a code cleanup: split scons includes onto multiple lines, reduce chance of include conflicts later on. 2013-05-20 18:42:28 +00:00
5cdddb12d9 fix [#35434] Segmentation fault switching screen layout from python 2013-05-20 05:06:52 +00:00
c70a900736 More work on 3d view render:
- reverted fix for bug 32537 (error report drawing after thread job didn't show)

  This solves very bad 3d view render updates while using transform, it was
  getting into an eternal feedback loop for dependencies. (jobs sending mousemoves
  causing jobs to end, causing mousemoves, causing etc).
  
- The render-update code was not going over all windows, but over every screen to
  send signals (also the invisble ones)
2013-05-17 16:46:59 +00:00
ebda20150d fix for crash with toggle-drag on a popup (when the popup is closed while dragging). 2013-05-17 13:54:44 +00:00
00f0ac8107 Fix #35368:
* Editing number of segments for particle hair did not update the viewport.
* Hidden particles were confusing, the paths were drawn but without the points.
  Now it draws the path faded to indicate that they are hidden/locked.
* Select tips/roots operators now have options to select/deselect/toggle/invert.
2013-05-16 00:07:01 +00:00
ac43397767 Fix action zones not drawing properly while sculpting, due to recent bugfix.
Partial redraw doesn't work so well with these, now I've changed the action
zones to just draw as part of regions instead of as a special overdraw done
at the end, which fits better with partial redraw by avoiding any special
exceptions.
2013-05-15 17:59:55 +00:00
e1229b2978 Attempt to fix #35057 and #35372: slow texture painting performance.
After the paint refactoring for 2.67, the OpenGL texture was getting updated for
every stroke point, rather than once for every redraw. With a small brush radius
and low spacing the number of stroke points can be quite large, which might have
a big performance impact depending on the graphics card / drivers.

Also for 2D image paint, avoid redrawing the button panels and properties editor
during painting.

There is another possible cause for slowdowns with 3D texture painting which was
not fixed. Projection painting is creating and destroying threads for every stroke
point. Depending on the CPU/OS there might be a lot of overhead in doing that if
the brush size is small.
2013-05-15 14:37:05 +00:00
71775dc2a4 Fix another cases where painting long brush strokes with small radius was slowed
down, this time by the operator properties getting converted to a string for
display in the info window.

With 1000+ stroke points this can get slow, and takes up too much space anyway,
so now it's (somewhat arbitrarily) limited to printing only 10 points.
2013-05-15 14:37:01 +00:00
2914d15241 Fix #35337: sculpt performance regression, partial redraw was not working anymore
due to paint cursor redraw problem.
2013-05-13 13:32:42 +00:00
00014949c8 Fix #35262: assiging shortcuts from e.g. delete or selection mode menus did not
work anymore. This was due to a bugfix to show missing shortcut keys for e.g. the
mesh > vertices > separate menu. Both should work now.
2013-05-10 23:41:41 +00:00
a9fb183901 rename BLI_ghashIterator_notDone() -> BLI_ghashIterator_done()
was renamed fairly recently but other similar iterators not negated
	like this, would prefer to keep it as it was
2013-05-08 12:58:11 +00:00
13c0ef139f Fix OS X 32 bit build error, and bring buildbot config in sync with default. 2013-05-07 18:32:37 +00:00
12db4f3eae Revert fix for #34822
Allowing any-key modifiers to work is cool, but this needs more work.
My previous fix made overlapping key presses (where you release key 1
just after pressing key 2) to not register as valid shortcuts.
2013-05-02 15:10:24 +00:00
def15f275d fix [#35156] Edge slide gg shortcut brings up wrong settings.
switch operator types from transform, this would normally be problematic, but transform operators share callbacks so it can be supported.
2013-04-30 03:44:03 +00:00
4ca0df348e move modal view3d keymaps out of main list of keymaps into the view3d section. 2013-04-29 17:59:44 +00:00
2e89f6350d edgeslide fixes/tweaks
* re-executing edgeslide was using initial mouse coords only.
* allow negative smooth
* allow more then 10 cuts in RNA limits.
2013-04-26 18:12:05 +00:00
6d83322841 add support for macro redo if all operators in the macro have an exec()
this fixes [#35079]
2013-04-26 17:36:54 +00:00
feeab1ad53 Fix #34997: when starting the game engine in one window and switching to a second
window, the game would stop drawing in the first and mess up the OpenGL state of
the second.

Also fixes glPushAttrib/glPopAttrib getting out of sync in some cases.
2013-04-18 16:28:39 +00:00
58a00e7396 Bug fix #34822
Tiny tweak in "Any key modifier" code. It now refuses to accept events when you hold
any key, and then press another key - unless that has key-modifier set.

This enables Houdini style "Hold Spacebar - Leftmouse" view moves.
2013-04-18 14:55:04 +00:00
ae58968e0a Blender Internal Render in viewport
Because of our release soon, feature has been added behind the Debug Menu.
CTRL+ALT+D and set it to -1. Or commandline --debug-value -1.

When debug set to -1, you can put the viewport to 'render' mode, just like
for Cycles. Notes for testers: (and please no bugs in tracker for this :)

- It renders without AA, MBlur, Panorama, Sequence, Composite
- Only active render layer gets rendered. Select another layer will re-render.
- But yes: it works for FreeStyle renders!
- Also does great for local view.
- BI is not well suited for incremental renders on view changes. This only
  works for non-raytrace scenes, or zoom in ortho or camera mode, or for 
  Material changes. In most cases a full re-render is being done.
- ESC works to stop the preview render.
- Borders render as well. (CTRL+B)
- Force a refresh with arrow key left/right. A lot of settings don't trigger
  re-render yet.

Tech notes:

- FreeStyle is adding a lot of temp objects/meshes in the Main database. This
caused DepsGraph to trigger changes (and redraws). I've prepended the names
for these temp objects with char number 27 (ESC), and made these names be
ignored for tag update checking.

- Fixed some bugs that were noticable with such excessive re-renders, like 
  for opening file window, quit during renders.
2013-04-16 17:39:20 +00:00
03d6319862 Fix: when using a search menu with an operator's enum prop, the operator was previously always executed with default options (appart from the search-set enum, of course). Now we store the op's properties in search button, so that you can specify non-default options (as it was already possible with e.g. pop-up menu from an operator's enum prop).
To achieve this, some code (callbacks and search button creation) was moved from wm_operators.c to interface/interface.c, and a new UI function was added, uiDefSearchButO_ptr.

Note: This new code uses the fact that uiButHandleFunc callbacks get executed before operator when one of its arg is the button itself!

Many thanks to Campbell who helped me a lot with this patch!

Cleanup: also removed two unused pointers from uiBut struct.
2013-04-15 15:01:12 +00:00
c9a10b99ff Cycles: optimization for 3D viewport border render with heavy scenes, the OpenGL
render of objects could slow things down when redrawing the view each time a new
sample is displayed.

Now it does a partial redraw of the viewport with only the render border area,
skipping OpenGL object drawing while the render is refining.
2013-04-14 21:42:58 +00:00
d867cefa32 Bug fix #34896
The feature "Keep Session" was also loading that session when you double-click
on a .blend to open it, or when a .blend file was on commandline.

Moved this feature to the main() in creator.c, so it can check on it properly, skipping the
kept session when a file was loaded.
2013-04-13 12:03:20 +00:00
2c47244954 code cleanup: use const char for args and replace wm_keyconfig_list_find() -> BLI_findstring() 2013-04-13 04:28:04 +00:00
d0beabb642 Add function to query maximum texture size. Also, make texture upload
functions aware of this limit.
2013-04-12 17:56:07 +00:00