Commit Graph

46939 Commits

Author SHA1 Message Date
Antony Riakiotakis
a074df37c7 oversight on scons, this should fix. 2013-04-12 17:59:38 +00:00
Antony Riakiotakis
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
Antony Riakiotakis
a305452275 Paint refactoring commit, non-disruptive (in theory :p)
* Fix precision overflow issue with overlay previews,
* Expose alpha mask mapping to UI (still not functional but coming soon).
* More overlay refactoring:

Overlay now does minimal checking for texture refresh.
Instead, we now have invalidation flags to set an aspect of the brush
overlay as invalid. This is necessary because this way we will be able to
separate and preview different brush attributes on the overlays, using
different textures:

These attributes/aspects are:

Primary texture (main texture for sculpt, vertex, imapaint)
Secondary texture (mask/alpha texture for imapaint)
Cursor texture (cursor texture. It involves brush strength and curves)

Modified the relevant RNA property update functions and C update callback
functions to call the relevant cursor invalidation functions instead
of checking every frame for multiple properties.

Properties that affect this are:

Image changes, if image is used by current brush,
Texture slot changes, similarly
Curve changes,
Object mode change invalidates the cursor
Paint tool change invalidates the cursor.

These changes give slightly more invalidation cases than simply
comparing the relevant properties each frame, but these do not occur in
performance critical moments and it's a much more elegant system than
adding more variables to check per frame each time we add something on
the system.
2013-04-12 17:21:31 +00:00
Antony Riakiotakis
8f658d4264 Add property update for radial control operator. It will be necessary
for upcoming overlay refresh commit, but since that commit is becoming
too big, better have this separate to avoid getting this lost in the
noise.
2013-04-12 15:45:44 +00:00
Lukas Toenne
58d211acdd Fix for user count when adding a new library node tree. This needs to decrease user count by 1 to compensate for increment in RNA_property_pointer_set. 2013-04-12 15:42:16 +00:00
Brecht Van Lommel
55ac53fcde Fix #34322: cycles crash with (undo) save during threaded render. The mesh save
code was modifying pointers in the Mesh which gave crashes with another thread
accessing the data at the same time. This could crash other threaded operations
like blender internal render or physics baking too but was less likely.

As a solution I've now changed the save code that it does not modify the mesh
data structure in place but rather a copy, as undo file saving should probably
be fully read-only regardless of how an improved threading architecture might
work.

Thanks to Sergey for tracking down the cause of this crash.
2013-04-12 15:33:09 +00:00
Brecht Van Lommel
22230ced41 Fix #34961: camera fly mode would reset camera scale. 2013-04-12 14:25:08 +00:00
Sergey Sharybin
27097d1373 Blender is compilable with strict compiler flags again 2013-04-12 13:01:50 +00:00
Ton Roosendaal
adb96478a7 Adding scrollbar default to Python console and Python Info log. 2013-04-12 12:30:05 +00:00
Bastien Montagne
0e4b092c2d More fixes for addon i18n messages management. 2013-04-12 12:19:50 +00:00
Lukas Toenne
c83925599a Added 'move' functions to the inputs and outputs node socket collections (similar to move function in CollectionProperty). This is useful to change the socket order in pynodes. Otherwise one would have to remember socket values and links, remove a socket, insert a new one and copy back these values, which is tedious and error prone. 2013-04-12 12:19:22 +00:00
Campbell Barton
e8474d64f8 minor edit to bake printouts which could get mixed because of \r. 2013-04-12 12:03:56 +00:00
Lukas Toenne
09a82f413d Removed a lot of now-unnecessary checks from node RNA. The typeinfo pointers in bNodeTree, bNode and bNodeSocket are now always pointing to valid type structs. If a tree, node or socket has an unknown type at load time it will be pointed to a dummy "UndefinedType" struct instead, which has default settings and allows for nice debugging. Checking if node->typeinfo etc. is NULL is not necessary any more, makes code a lot easier and smaller. 2013-04-12 11:43:21 +00:00
Sergey Sharybin
0d86c3f84c Image draw method option
This option replaces previously added GPU limit
option, which became tricky to follow after GLSL
display space conversion.

There're 4 modes available:
- AUTO which will try to guess which mode is
  best to use.
  Currently It'll try using GLSL and if it fails,
  will fallback to 2D textures.
  Probably it'll make sense checking on whether
  2D textures works well but currently such behavior
  shall be sufficient.
  Later we could make this method smarter (for example
  don't try to use GLSL on certain GPU or so).
- GLSL will currently behave the same way as AUTO,
  but it is intended to always try using GLSL
  (unless it can not be used because of existing
  limitation of dither and RGB curves).
- 2D Textures will use CPU-based color space conversion
  and use OGL 2D Texture to display the image.
  Image will be displayed in tiles, so there shall be
  no big GPU memory consumption.
- DrawPixels will straightly fallback to glDrawPixels
  without trying to use any fancy GPU stuff.

Hopefully this will also fix
#34943: Blender crashes when resizing the Compositing Screen Window
2013-04-12 10:52:47 +00:00
Campbell Barton
677a96e189 add render slot cycle forward/backwards menu items. 2013-04-12 10:19:31 +00:00
Lukas Toenne
be35762950 Made the update callback in bNodeTree registerable in RNA, this was still missing for pynodes. This update callback can be used for "global" updates of the node tree as a whole, as opposed to "local" updates of individual nodes. Any kind of update that takes node connections into account (such as dependency sorting) and does not just work on a single node should be done in the nodetree.update function rather than node.update. 2013-04-12 08:43:08 +00:00
Lukas Toenne
048df1a07c Small change to the node space RNA function for opening a node group: pass the node tree as explicit argument plus an optional group node, instead of trying to get the node tree from a node property. This is more flexible for future nodes that want to change the node editor. Node group operators can rely on group node types, but the generic RNA functions should not. 2013-04-12 07:35:49 +00:00
Campbell Barton
ba845f6313 fix for own recent addition of transform indervidual-axis in editmode, not working if the object was rotated. 2013-04-12 02:16:44 +00:00
Dalai Felinto
1c80388a73 bge fix: framing mode "Expanded" not updated when resizing blenderplayer
now, with a 'resize' routine for the engine we can/should also recreate some
buffers that are created only at init time (e.g., 2d filters, dome fbos, ...).

This bug was always present in Blender (since 2.49 at least).

Bugfix supported by NF-UBC Nereus Program as part of the development
of OceanViz/NereusViz
2013-04-12 01:52:30 +00:00
Campbell Barton
502ddd3128 code cleanup: warnings and style. 2013-04-12 00:50:40 +00:00
Brecht Van Lommel
742c1cb328 Related to #34558: clarify the description for the "default" parameter in bpy.props.EnumProperty. 2013-04-11 18:10:57 +00:00
Jens Verwiebe
bd07cac232 Correct stub for snapObjectsRayEx 2013-04-11 15:40:57 +00:00
Jens Verwiebe
f8293b8068 Add stub for snapObjectsRayEx 2013-04-11 15:35:16 +00:00
Jens Verwiebe
8128444bad Add stub for snapObjectsRayEx 2013-04-11 15:33:10 +00:00
Thomas Dinges
e835863254 And another compile fix for Windows / scons for r55946. 2013-04-11 15:33:04 +00:00
Thomas Dinges
38cf856ea9 Compile fix for r55970. 2013-04-11 15:21:03 +00:00
Brecht Van Lommel
120fe74ffe Fix #34817: improve OpenGL preview render speed, it got quite a bit slower since 2.60.
Doing linearization with GLSL was already faster, but even faster is to just read the
bytes instead of floats and convert those to linear, since byte => float is just a quick
256 entry table lookup. Also made it assign the bytes directly to the image buffer so
they do not need to be converted back from float to byte for file saving, and made sky
render write the background color with OpenGL instead of doing it on the CPU.
2013-04-11 15:15:06 +00:00
Brecht Van Lommel
7164596891 Fix #34956: rendering animation with audio would crash with an older ffmpeg
after recent changes.

New ffmpeg versions accept align = 0 as a parameter and will set it to 1
automatically, but older ones need to pass align = 1.
2013-04-11 14:46:41 +00:00
Sergey Sharybin
07580e71a6 Fix issue with bright frames appearing in clip editor when compositor is open.
Allocate float buffer outside of image buffer,
so work-in-progress color space conversion doesn't
interfere with other parts of blender.

Covers most of cases -- since image buffer wouldn't
have partially-update float buffer all the rest
areas would be happy.

However, if there're places which updates float
buffer from byte buffer, it's still possible
some WIP color space conversion is displayed on
the screen.

But what a heck someone will do such a crappy
conversion anyway!
2013-04-11 14:15:52 +00:00
Antony Riakiotakis
5c4a080021 Fix #34954, due to hardcoded key release it was impossible to change key
for sample color and exit the operator. Also tweaked stencil to behave
similarly, so it is now possible to assign custom keys to stencil
control.
2013-04-11 14:15:25 +00:00
Brecht Van Lommel
4d7db8e59e Fix #34929: windows would show a "No disk in drive" error popup when one of the recently opened files was on a DVD that's no longer there in the DVD drive. 2013-04-11 14:13:20 +00:00
Sergey Sharybin
daaca80664 Hide preview for nodes created with Setup Tracking Scene 2013-04-11 13:34:51 +00:00
Sergey Sharybin
432a260869 Setup tracking scene shall work with Cycles now 2013-04-11 13:29:51 +00:00
Konrad Kleine
f2ff494b24 Added circle selection menu entry for lattice, pose and armature. 2013-04-11 13:29:01 +00:00
Sergey Sharybin
c6606986cc Fix for Setup Tracking Scene operator
- Ported to new node add operator
- Alpha mode shall be set to Transparent
2013-04-11 13:25:05 +00:00
Sergey Sharybin
6569ab813f Fix for material icon rendering with cycles
Materials icons used to miss transparent background
and were using world environment which didn't give
so nice results.

Reviewed by Brecht, thanks!
2013-04-11 12:49:57 +00:00
Antony Riakiotakis
fa3770eb66 Fix #34923 Images that have their alpha calculated should not get de-premultiplied. 2013-04-11 12:37:33 +00:00
Campbell Barton
94c9010e24 make scene.ray_cast() behave like object.ray_cast(), add distance arg to snapObjectsRayEx(). 2013-04-11 10:17:06 +00:00
Campbell Barton
2c6a82dd0a py api: minor change to operator attribute access, do identity comparison with None (no functional change). 2013-04-11 10:16:18 +00:00
Campbell Barton
bf77ad00b3 py api:
ray cast function, very useful to be able to cast rays into the scene for scripts.

  hit_co, hit_no, success = scene.ray_cast(start_co, end_co)
2013-04-11 09:57:26 +00:00
Sergey Sharybin
548f0fb88c Use SWS_FULL_CHR_H_INT for SWS context for more accurate conversion
Suggestion by Bjeorn Sonnenschein from report #34755.
2013-04-11 09:37:52 +00:00
Lukas Toenne
549fa84afa Fix #34948, bug in Cycles node groups. The proxy node maps used to identify external connections of node group nodes were having name clashes with input/output sockets of the same name, leading to invalid cyclic connections in the cycles shader graph that were subsequently removed (prints warnings in terminal). Solution is to use two separate maps for inputs and outputs so group node sockets can safely use the same identifier. 2013-04-11 09:16:36 +00:00
Campbell Barton
577a1b9239 fix [#34805] Bake action ignores parent motion
in fact this is more feature request.
add an option to bake a parented objects animation, then clear the parent and apply the action.
2013-04-11 08:42:25 +00:00
Campbell Barton
acac5b8402 fix for crash in own recent commit. searchbox's need their own keynav state since they won't always be in a uiPopupBlockHandle. 2013-04-11 08:33:19 +00:00
Campbell Barton
075a655cc6 fix [#34936] Unable to select items using only the arrow keys
ignore small mouse motions for menu/search-box after using the keyboard to navigate.
2013-04-11 02:28:34 +00:00
Campbell Barton
b77acc2879 add 2d length functions for testing pixel coords. len_manhattan_v2_int, len_manhattan_v2v2_int 2013-04-11 02:23:45 +00:00
Campbell Barton
e2a37db1d1 fix own mistake in recent inset-interpolation option, some faces were not interpolating. 2013-04-11 00:23:09 +00:00
Campbell Barton
1143b658a0 fix [#34947] Alt-F Fill not working
Regression in r54579.
2013-04-10 23:59:37 +00:00
Campbell Barton
ece766ee7e code cleanup: unused defines, remove unused scanfill success value from BLI_scanfill_begin(). 2013-04-10 23:52:07 +00:00
Campbell Barton
c68ae745b6 interpolate verts as well as loops for inset.
- add vertex option to BM_face_interp_from_face, also expose via python.
2013-04-10 23:25:44 +00:00