Commit Graph

290 Commits

Author SHA1 Message Date
a5c35fb27f Code cleanup: use booleans where appropriate 2014-01-28 04:00:04 +11:00
b64f897606 WM: add WM_operatortype_remove_ptr to remove a known operator 2014-01-23 19:05:56 +11:00
621bf47e91 Docs: doxygen file descriptions for BLF, GPU and WM 2014-01-19 23:15:25 +11:00
7ae1949517 Select Random: add option to de-select
also made metaball operator behave like the others.

Path originally from Walid Shouman, with own edits.
2014-01-13 20:39:12 +11:00
2dba2e72b7 Code Cleanup: de-duplicate text pasting which only used the first line 2014-01-08 17:39:12 +11:00
c6620905a7 Tooltips: abbreviate long python operator tooltips
Some tooltips would end up containing long string/array args spanning the screen.
2013-12-09 14:25:03 +11:00
6976866d5a User Interface: Ctrl+C over a menu copies the py command
also use bools rather then ints
2013-12-05 17:26:03 +11:00
285e09bceb Fix T37149: Macros store settings from a cancelled operation 2013-11-29 16:01:03 +11:00
02f90c0001 User Interface: don't show macro args in tooltips
was often making much too big strings to show in a tip.
2013-11-26 09:00:24 +11:00
63caaa2b12 Code Cleanup: rename vars for detecting change to be more consistent
rename change/is_change/is_changed/modified -> changed
also use bools over int/short/char and once accidental float.
2013-11-26 06:39:14 +11:00
ad34a5cc1b Fix [#34675] *AFTER 2.69* Info view shows duplicate operators with incorrect values of args
Refactored a bit WM api to generate operator's pystring, now it can also handle correctly macro operators. Thanks to Campbell for the review!
2013-11-06 20:56:18 +00:00
Lukas Toenne
c9fdec14f5 Fix #37261 Rendering a Render Layer from another scene doesn't update.
The scene pointer used for looking up the appropriate source of render result images in the image editor was always taken from context. This means that render results for a different scene would never be
displayed in the image editor.

To give feedback on running renders, try to get the running render job's scene pointer in the image editor for render result type images. This only happens during rendering, apart from that the regular
context scene result is displayed.
2013-10-31 17:20:31 +00:00
7267221715 remove return argument from wmOperatorType->cancel, was only ever returning OPERATOR_CANCELLED. 2013-10-30 23:08:53 +00:00
de3f6b3ec1 re-enable activating the text input field for new popup dialog boxes,
I'd disabled this for 2.68 since it caused bug [#36109].

This fix now only enabled text activation for popups. (so the toolbar textboxes are skipped)
2013-10-09 14:35:25 +00:00
fc2dbc20ff Fix #36800: closing render window during render crashes, the operator would be
cancelled before the job, causing invalid access to op->reports in the job thread.
2013-09-23 19:35:21 +00:00
b380dd9378 fix [#36537] "Grid Floor Scaling" can have some unexpected behaviour on new objects
curves and metaballs now behave the same as meshes wrt grid scaling.
remove WM_operator_view3d_distance_invoke(), and replace with a function called from exec which initializes defaults, this way operators can have their own invoke functions.
2013-09-16 04:19:48 +00:00
23626e0149 fix [#36444] view3d.viewnumpad operator should not animate
when running viewport operations with exec() rather then invoke(), perform the action immediately rather then using smoothview.
makes viewport operations usable from python scripts.
2013-09-16 04:04:44 +00:00
35cd649c66 rename cursor setting functions to make modal set/restore more clearly related functions. 2013-09-06 22:34:29 +00:00
29efa96940 style cleanup 2013-09-04 03:30:41 +00:00
35b61a7512 Move GCC attributes into a centraized defines
Instead of having ifdef __GNUC__ all over the headers
to use special compiler's hints use a special file where
all things like this are concentrated.

Makes code easier to follow and allows to manage special
attributes in more efficient way.

Thanks Campbell for review!
2013-09-01 15:01:15 +00:00
2c31bce47f Fix #36555: preview render in properties editor did not get cancelled and
restarted fast enough on resizing the editor, especially noticeable with
e.g. luxrender which does a progressive refining render.
2013-08-28 19:22:48 +00:00
0395b8eee8 border render with cycles had 1 pixel offset on the top-right edge of the image, issue was caused by wmSubWindowScissorSet adding 1 to the ar->drawrct, now only add the padding when drawing the entire area 2013-08-05 04:52:27 +00:00
02608d257a add api call for initializing events from the windows eventstate. 2013-07-29 08:29:04 +00:00
3ce280e825 Fix #35960, #36044: blender internal viewport rendering crash while editing data.
Now the viewport rendering thread will lock the main thread while it is exporting
objects to render data. This is not ideal if you have big scenes that might block
the UI, but Cycles does the same, and it's fairly quick because the same evaluated
mesh can be used as for viewport drawing. It's the only way to get things stable
until the thread safe dependency graph is here.

This adds a mechanism to the job system for jobs to lock the main thread, using a
new 'ticket mutex lock' which is a mutex lock that gives priority to the first
thread that tries to lock the mutex.

Still to solve: undo/redo crashes.
2013-07-08 17:56:51 +00:00
6fb6087c68 correct bad use of bool for cursor arg. 2013-07-04 18:58:00 +00:00
42f6136da8 Fix #35991: show warning message to when trying to edit driven values in number buttons. 2013-07-03 20:37:07 +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
c77179a3c2 code cleanup: comment/remove unused defines 2013-05-28 01:15:59 +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
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
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
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
85e53317be fix for bug where notifiers could hold pointers to freed data which listeners would operate on. 2013-04-08 13:03:04 +00:00
677172fd65 code cleanup: use bools in interface handlers, dont show translation menu when right clicking on splash, use less confusing args for copy/paste function. 2013-04-04 15:16:29 +00:00
3c5c4fb4f6 Remove unused function.
It was only used for movie clips prefetching, no need
in it nowadays.
2013-04-04 12:26:31 +00:00
7bbaf4853a code cleanup: use bools in UI and WM code, quiet some shadow warnings, remove unused function uiEmboss() 2013-04-04 02:05:11 +00:00
64d161de87 style cleanup:
also rename mesh_getVertexCos() --> BKE_mesh_vertexCos_get() to match curve function.
2013-03-26 07:29:01 +00:00
808ac6debf Prefetching for movie clips
This commit basically implements frames prefetching for
movie clip datablock.

Number of frames to be prefetched is controlled in User
Preferences, System tab, Prefetch Frames option.

Currently prefetching is destructive-less for movie cache,
meaning mo frames will be removed from the cache when while
prefetching. This is because it's half of simplier to
implement, but it also makes sense from tracking point of
view -- we could want to playback in both directions and
removing frames from behind time cursor is not always a
good idea.

Anyway, smarter prefetching strategy could be developed
later.

Some implementation notes:

- Added MEM_CacheLimiter_get_memory_in_use function to get
  memory usage of specified memory limiter.

- Fixed prototype of MEM_CacheLimiter_get_maximum which
  was simply wrong (used wrong data type for output).

- Added some utility functions to movie clip and movie
  cache for direct cache interaction and obtaining cache
  statistics.

- Prefetching is implemented using general jobs system.
  which is invoking from clip draw function.

- Prefetcing will stop as soon other job or playback starts.
  This is done from performance point of view. Jobs will
  likely require lots of CPU power and better to provide
  whole CPU to it.

  Playback is a bit more complicated case. For jpeg sequence
  playback prefetching while paying back is nice. But trying
  to prefetch heavy exr images and doing color space
  conversion slows down both playback and prefetching.

TODO:

- Think of better policy of dealing with already cached frames
  (like when cached frames from other clips prevents frames
  from current clip to be prefetched)

- Currently a bit funky redraw notification happens from
  prefetch job. Perhaps own ND_ is better to have here.

- Hiding clip while prefetch is active in theory shall stop
  prefetching job.

- Having multiple clips opened on file load will prefetch
  frames for only one of them.
2013-03-20 17:03:20 +00:00
e7c15beaf6 code cleanup: use booleans for mesh and selection code. 2013-03-19 23:17:44 +00:00
88cf1a2bc7 Screen: add exit callback for area and region types, this gets called when
hiding or removing an area or region.
2013-03-15 19:56:29 +00:00
aaa8a13c49 code cleanup: use const events for modal and invoke operators. 2013-03-13 09:03:46 +00:00
a02c8c4177 move toggle drag into a UI handler (was modal operator) 2013-03-03 03:29:57 +00:00
c1ca09b8c8 replace MEM_callocN with MEM_mallocN for events since their overwritten right after. 2013-02-11 10:01:32 +00:00
6341919354 code cleanup: make wmEvent's 'const' in interface code (reduces manual checking that they are not modified). 2013-02-01 01:01:20 +00:00
54223ed05b Add active region for operator execution.
This means you can for example, uv unwrap in quad-view and change settings in the toolbar without defaulting back to the first quad-view region available. 

This may be displayed to the user later, for now this is set on executing registrable operators.
2013-01-30 12:22:02 +00:00
761b380b84 fix [#33841] Disabling and re-enabling live addon crashes blender (modal/draw handler) 2013-01-22 06:16:49 +00:00
337695d496 draw the brush size with pressure applied (when the tablet is used), nice to see the actual size used. 2013-01-16 19:22:15 +00:00