- When changing clip in clip editor, remove all frames
from it's cache to free memory for new clip.
- When changing proxy render settings, free cache as well.
Made it an operator instead of automatic prefetching.
Filling the whole memory with frames is not always
desired behavior.
Now prefetching is available via P-key, or from Clip
panel in toolbox or from Clip menu.
Also enabled prefetching for non-proxied movies.
rather then getting the longest edge, get the edge which which is most different from the 2 others ends up giving more useful results: for an isosceles triangle it returns the base weather its longer or shorter then the other sides.
- GLSL shader wasn't aware of alpha predivide option,
always assuming alpha is straight. Gave wrong results
when displaying transparent float buffers.
- GLSL display wasn't aware of float buffers with number
of channels different from 4, crashing when trying to
display image with different number of channels.
This required a bit larger changes, namely now it's
possible to pass format (GL_RGB, GL_RGBAm GL_LUMINANCE)
to glaDrawPixelsTex, This also implied adding format to
glaDrawPixelsAuto and modifying all places where this
functions are called.
Now GLSL will handle both 3 and 4 channels buffers,
single channel images are handled by CPU.
- Replaced hack for render result displaying with a bit
different hack.
Namely CPU conversion will happen only during render,
once render is done GLSL would be used for displaying
render result on a screen.
This is so because of the way renderer updates parts
of the image -- it happens without respect to active
render layer in image user. This is harmless because
only display buffer is modifying, but this is tricky
because we don't have original buffer opened during
rendering.
One more related fix here was about when rendering
multiple layers, wrong image would be displaying when
rendering is done. Added a signal to invalidate
display buffer once rendering is done (only happens
when using multiple layers). This solves issue with
wrong buffer stuck on the display when using regular
CPU display space transform and if GLSL is available
it'll make image displayed with a GLSL shader.
- As an additional change, byte buffers now also uses
GLSL display transform.
So now only dutehr and RGB curves are stoppers for
using GLSL for all kind of display transforms.
Was caused by recent change in image_buffer_rect_update which
was writing data to ibuf-rect_float. Apparently, this buffer
could point to different render layer than came from RenderResult.
Made quick fix for this, which ends up in skipping float buffer
update in image_buffer_rect_update and skipping GLSL when image
has both byte and float buffers.
This will bring speed down a bit, but slower blender is better
than broken blender.
Proper fix will arrive later this week.
* deduplicated a bunch of code and moved it into outliner_dropzone_find()
* moved all the per-dropzone checks into the poll functions
* one functional change, disable drop parenting on self & self->parent
The basic assumption: if poll() == true then outliner_dropzone_find() will return a valid TreeElement
Suggested by Brecht Van Lommel and Campbell Barton through code review comments.
Previously style modules were external Python script files whose absolute paths
were kept in .blend files. Now style modules are stored in .blend files as text
datablocks.
Style modules are configured in three steps:
1. Open an external style module file (or create a new text datablock) in the
Text Editor in Blender.
2. Add a style module to the list of style modules (by pressing the "Add" button)
in the Render Layer properties window.
3. Click the name entry and select the style module from the drop-down menu.
even if nothing is attached to input.
They'll use black image with render resolution
as a background if nothing is attached to mask input.
Was a request from 4K ToS project.
Uses GLSL for drawing image in Image Editor space.
This requires change in image_buffer_rect_update, so
original float buffer is being updated as well. This
is unlikely be something bad, but will keep an eye
on this change.
Also no byte buffer allocation happens there, this
is so because byte buffer used for display only
and in case of GLSL display such allocation and
partial update is just waste of time.
Also switched OpenGL render from using CPU color
space linearization to GLSL color space transform.
Makes OpenGL rendering pretty much faster (but
still slower than in 2.60).
internal changes:
- Added functions to setup GLSL shader for color
space conversion in colormanagement.c. Currently
conversion form a colorspace defined by a role to
linear space is implemented. Easy to extend to
other cases.
- Added helper functions to glutil.c which does
smarter image buffer draw (calling all needed OCIO
stuff, editors now could draw image buffer with a
single function call -- all the checks are done in
glutil.c).
- Also added helper function for buffer linearization
from a given role to glutil.c. Everyone now able to
linearize buffer with a single call.
This function will do nothing is GLSL routines fails
or not supported.
And one last this: this function uses offscreen
drawing, could potentially give issues on some
cards, also will keep an eye on this.
The Scopes and Histogram (Image editor, Sequencer) were not updating on
changes in color or display settings.
- Missing notifiers for refreshing
- Missing code to draw correct for managed byte buffers.
Historically, F shortcut was for 'add edge/face' in Blender.
In Node editor, F makes a noodle, ctrl+f made a noodle replace too.
To keep ALT+F work for "Unattach from frame", the solution I now propose
is to make CTRL+F for finding nodes, and SHIFT+F for 'add noodle with replace'.
Added a sanity check to the ED_node_link_insert function to ensure it exits gracefully if no suitable sockets can be found. This was the problem with custom pynodes, which don't define the 'type' DNA of old sockets. The operator will have to be generalized for future nodes, but for now just not crashing seems good enough.
Script node crashes in #34810 were caused by uninitialized 'type' integer as well. This is now done in the set_typeinfo function for sockets (like for trees and nodes too), to avoid any potential remaining issues of this kind. Note that new files need to be loaded and saved again once to be forward compatible again.
well as I would like, but it works, just add a subsurface scattering node and
you can use it like any other BSDF.
It is using fully raytraced sampling compatible with progressive rendering
and other more advanced rendering algorithms we might used in the future, and
it uses no extra memory so it's suitable for complex scenes.
Disadvantage is that it can be quite noisy and slow. Two limitations that will
be solved are that it does not work with bump mapping yet, and that the falloff
function used is a simple cubic function, it's not using the real BSSRDF
falloff function yet.
The node has a color input, along with a scattering radius for each RGB color
channel along with an overall scale factor for the radii.
There is also no GPU support yet, will test if I can get that working later.
Node Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Shaders#BSSRDF
Implementation notes:
http://wiki.blender.org/index.php/Dev:2.6/Source/Render/Cycles/Subsurface_Scattering
New operator "Find Node".
Opens search menu, and allows to find a node based on name or label.
On selecting name, menu selects/activates the node and moves the view to it.
Shortcut: ALT+F
Menu: Node editor, "Select"
This reverts rev55642 and fixes issue in a different way.
The thing here is: isolated vertices are for sure not in BVH
and updating keyblock could not only rely on idea that all
vertices are in BVH (no idea why it was noticed just now).
Solved in a way, that uses old keyblock coordinates as new
keyblock, and then refines it using coordinates from BVH.
Hopefully it'll cover all cases now :)
* Add a poll function that only activates the operator when a stencil
brush is active
* Change shortcuts to RMouse - translate, Shift - RMouse Scale, Ctrl -
RMouse, rotate. MUCH faster and simpler workflow.
* Change shortcut of colour sampling to S. Sampling is important but not
as important as warranting the Right Mouse button.
* Add a notifier so that toolbar gets updated texture rotation when
rotating the stencil
Also,
* Slight rearrangement of options so that jittering is more accessible
(easily more often used than smooth stroke)
* Using masking is determined only by the presence of the texture,
remove extraneous DNA flag (might cause issues later but in practice
brush options are not harmful)
* Overlay and angle sliders are active during stencil mapped brushes
* Only draw the overlay if there's a texture.
Most changes in revision 55228 were reverted and Freestyle edge/face marks
were re-implemented using CD_ORIGINDEX layers of edge/poly custom data.
For this implementation to work properly, modifiers were updated so that
required CD_ORIGINDEX layers will be set. As pilot cases, the Mirror and
Solidify modifiers were updated (see comments in the code).
Some Freestyle-specific code is necessary in DerivedMesh.c so that the
CD_FREESTYLE_EDGE/FACE layers will be transferred from meshes to derived
meshes. This seems unnecessary, so further investigation is foreseen.
Stencil style texture mapping. Ready for field testing and user feedback.
This commit adds stencil like brushes, like those that existed on old ptex branch.
(with the exception of clip colour)
To control the position of the stencil, you use
Q: translation
Shift - Q: scaling
Ctrl - Q: rotation
There's extra work that has been done to make this work:
* Support for coloured overlay in vertex/texture painting
* Also made A button do stroke mode selection like in sculpt mode,
when mask painting is inactive.
There are some TODOs to work on during bcon3:
* Support tiled and stencil mode in 2D painting. Support alpha textures also.
* Tidy up overlay code. There's some confusion there due
to the way we use the primary brush texture sometimes for alpha, other times
for colour control.
WIP design docs will be in
http://wiki.blender.org/index.php/User:Psy-Fi/New_Brush_Tool_Design
sculptification commit. We have a drop menu to select the stroke mode
now. Jitter controls appear under stroke panel under all modes (As they
should! They stroke control options). Also enable jittering for all
modes. I really fail to see why not.
Implemented using GLSL API from OpenColorIO library and
some general functions were added to it's c-api:
- OCIO_setupGLSLDraw prepares OpenGL context for GPU-based
transformation for a giver processor.
This function compiles and links shader, sets up it's
argument. After this transformation would be applied
on an image displaying as a 2D texture.
So, glaDrawPixelsTex called after OCIO_setupGLSLDraw will
do a proper color space transform.
- OCIO_finishGLSLDraw restores OpenGL context after all
color-managed display is over.
- OCIO_freeOGLState frees allocated state structure used
for cacheing some GLSL-related stuff.
There're some utility functions in IMB_colormanagent which
are basically proxies to lower level OCIO functions but
which could be used from any place in blender.
Chacheing of movie clip frame on GPU is also removed now,
and either glaDrawPixelsTex or glaDrawPixelsAuto are used
for display now. This is so no code duplication happens
now and no large textures are lurking around in GPU memory.
Known issues:
- Texture buffer and GLSL are no longer checking for
video card capabilities, possibly could lead to some
artifacts on crappy drivers/cards.
- Only float buffers are displaying using GLSL, byte
buffers will still use fallback display method.
This is to be addressed later.
- If RGB curves are used as a part of display transform,
GLSL display will also be disabled. This is also thing
to be solved later.
Additional changes:
- glaDrawPixelsTexScaled will now use RGBA16F as an
internal format of storing textures when it's used
to draw float buffer. This is needed so LUT are
applied without precision loss.
bookkeeping variables from when the code was shared with texture
painting) Also texonly now is always zero, probably another leftover
from 2d/3d painting entanglement era.
- pass string size to BLI_timestr() to avoid possible buffer overrun.
- quiet warning for mingw.
- include guards for windows utf conversion funcs.
- fix for mistage in edge-angle-selection check.
- some style cleanup.
* Reflect changes stated in prev commit about contexts in py code.
* Add a "Plural" context, to handle cases where english does not mark plural at all (e.g. shorten labels of only one adjective). Not so happy with that, but can't see any other way to do it, for now.
* Abuse "ID_CURVE" context for all falloff curves (this should solve some confusion issues, e.g. "sharp"...).
Couple of precision issues here:
- Interpolation was rounding trunkcating colors, and because
of some precision issues value 254.999 became 254 leading
to troubles later.
Now color interpolaiton will do rounding to nearest int.
- Subtract was setting channels to something negative which
confused color management (especially negative alpha),
Now subtract effect will clamp channels to 0 from bottom
and also do some tricks to prevent small alpha which
could also confuse color management.
To complete previous commit:
New "Activate same type next/prev" operator - replaces the two not working previous ones.
This selects/activates and views the next or previous node of same type.
Shortcuts: Shift ] and Shift [
This is the first half of the commit, it's going to be reviewed further.
It also depends on other work in node drawing (to not reshuffle order on
every select/activate).
At least it works quite nice for the shortcuts shift [ and shift ]
"View selected strip(s)" now includes the active strip (which can be deselected
in cases). Less confusing this way, also because active strip is being drawn
very visible.
Issue was caused by delayed or missing image user frame
number update, which lead to image loading failure in
cases node is updating from image signal callback.
Solved in a way that file from image datablock is used
for sockets detection instead of loading image for
current frame.
The time it was printing was excluding the time spent on color and file saving.
Now it includes this too, plus it prints the time spent on color/files.
Makes quite a difference when you do sequencer conversions or grading in
terminals - time that was printed was very misleading.
For readablity of logs, also added an extra empty line after this print.
In this case edgenet_fill operator failed and it would fallback to filling as unordered vertices which was mostly fine but failed on some concave loops.
Add a new bmesh operator 'edgeloop_fill' fills in closed loops even if they don't make a valid edge-net.
Added new build option WITH_JACK_DYNLOAD for CMake and
WITH_BF_JACK_DYNLOAD for SCons, which means there'll be
no build-time linking against libjack and getting symbols
from libjack will happen runtime using dlopen and dlsym
tricks.
Alternative would be to use weak linking, but it'll require
having wrapper for preloading libjack.
This new options are disabled by default and they only
intended to be used on linux. Other platforms shall not
be using this and there shall be no functional changes
on non-linux platforms at all.
There was no good way to UV project from a camera with non-square view-border without it stretching the image (even using 'Correct Aspect').
While this isnt a bug its useful to do a UV projection without stretching the image, added 'Camera Bounds' option.
- Scopes in Sequencer were not drawing OK (drawing code assumed alpha)
- Histogram in Sequencer now uses same formula to quantify R G B as the
other histogram in Blender (per channel).
I seriously thought of dropping this, and add the same sidebar here as we
have for Image window. However, what stops me is that current code is
very optimized, and has OMP hints.
Will check instead on cleaner drawing here now.
After this revision BLI_stringdec worked incorrect
in cases there's no digits in original file name,
making head one character shorter than it should be.
Time to cover BLI with unit-tests?
Brought back old tools "Remove Gap(s)" and "Insert Gap".
It's actually one of the first tools I ever coded for it in 90ies, so useful!
* Remove Gap(s)
This checks if there's no strip at a given position, and slides all strips
together to the left, until the gap is closed.
- BackSpace key, remove gap at current frame (or first gap at right of frame)
- SHIFT+BackSpace, remove all gaps at or to right of current frame.
* Insert Gap
Shifts all strips to right of current frame with 10 frames. (Amount can be
set in Toolbar redo panel).
- Revert some stylistic changes made in branch
They weren't directly related on freestyle project
and better be handled in trunk. Helps reading patches
ad prevents possible merge conflicts.
- Solved issue introduced with recent deprecation of
RenderData.maximize,
Project the triangle pair into 2d coords before measuring.
before/after - http://www.graphicall.org/ftp/ideasman42/beauty_fill_fix.png
note: I committed this r54403 but it caused eternal looping so I reverted for 2.66 release.
ran extensive tests and its not giving problems so re-applying this improvement.
- make it clear that navmesh visualize option only works in path mode.
- use 2 decimal places for motion-blur shutter speed (user request).
- use 'const' for some bmesh functions.
The way beauty fill was working was too fragile and prone to eternal loops,
Solution used is to is to store previous states and ensure edges don't get rotated back into those.
Also added an optimization to avoid testing the same edge rotation many times - using edge tags to only re-test edge rotations around areas that have been modified.
As those two properties do not need a custom set func, yet need recalc of strips drawing/positions in addition to usual rna_Sequencer_update() (cache invalidating), I renamed rna_Sequence_frame_change_update to do_sequence_frame_change_update, and made a new rna_Sequence_frame_change_update which is directly usable as RNA update func, and call both the strip and cache update funcs.
Thanks to Sergey for advices!
Now prefetching happens from cursor up to scene end frame
and then from cursor down to scene start frame.
Also disabled prefetching for non-unidistorted proxies
because of issues with timecodes (seek horribly fails
in some cases). This seek need to be fixed since it's
actually happens for manual timeline scrubbing as well,
but that's another story..
When trying to load file below actual sequence range
(like trying to load file for scene frame 10 when clip's
start frame is 20) first frame from file sequence is used.
Before this change first file used to be loaded for every
scene frame below start frame, which polluted memory with
unwanted data.
Now first frame would be loaded only once in this case.
- Theme color for the brush popup was not correctly coded. Now it follows menu item
style correctly, which also allows all the themes we have to give readable text.
- RMB cancel also added for slider buttons and the color picker.
In text editor, the CTRL+F find now opens property region (or keeps it) and
activates the search button for input.
That's already nice! But next step should be to do a search on exit of
the button (or while typing). That's stuff I need Campbell to help with though.
Notes:
- Probably Py api for property buttons could get an "operator=" arg?
- The warning menu "not found" should go away
- I also suggest to make "wrap" search default for new editors
Conflicts resolved:
source/blenderplayer/bad_level_call_stubs/SConscript
Partly reverted changes to intern/cycles/blender/addon/ui.py in revision 52899
to make it easier to merge trunk changes.
Node Editor and Sequencer were not using grid theme color, but 'back'.
This commit adds versioning to copy background color to grid. I do this
without increasing sub-version, which allows to add correct drawing when
the subversion has to go up anyway for something else.
* Remove already commented "use_radiosity" flag from RNA.
* Remove some commented exceptions for old 2.4x 3D View preview region.
* Remove empty and commented function declarations from 2.4x UI times
and RNA for it independent of the build flag for enabling Freestyle. Suggested
by Sergey Sharybin through a code review of the branch.
* Many #ifdef WITH_FREESTYLE blocks were removed to always have Freestyle-specific
DNA file specification and RNA for it built in Blender. This will allow Freestyle
setting survive even when a non-Freestyle build is used for loading and saving
files. It is noted that operations are still conditionally built through #ifdef
WITH_FREESTYLE blocks.
* To this end, new blenkernel files BKE_freestyle.h and intern/freestyle.c have
been added. All API functions in FRS_freestyle_config.h as well as some of those
in FRS_freestyle.h were moved to the new files. Now the relocated API functions
have BKE_ prefix instead of FRS_.
In some cases high resolution domain could have higher density than the low resolution counterpart, causing adaptive domain to clip off areas where density is still above domain threshold. Now also high resolution data is used to determine domain bounds.
Don't see why it could give issues to use large number
of frames to be prefetched, but just in case make it
unlimited hard limit and kept soft limit still at 500.
Draw an extra outline on hidden nodes that have custom colors, otherwise you can't recognize them unless you unhide.
Example: http://pasteall.org/pic/show.php?id=42359
Appending a group (which adds all object members to scene), didn't follow the
setting "In active layer".
One note: only the scene layers are copied over, not local view3d layers.
Also moved the sync and merge for previews into the respective tree callbacks for consistency. This way the handling of previews can be changed for each tree type individually if necessary.
This keeps old behavior and could be nice. However, it'll
make compositing slower (doing final compo after editing
tree). This is easy to hide preview in this case, and also
i hope to implement percentage rendering soon.
OpenEXR's ChannelList.layers() will not include empty layer names,
which caused the issue. Made it so if there's one non-empty layer
name, check for empty names happens.
If there's empty layer name in case one non-empty layer name, file
will be considered multilayer now.
relationship between the result of driver evaluation (NKEY region stuff) and the
end result applied to the driven properties.
Example:
http://www.pasteall.org/pic/47687
This bug was producing way more geometry than we need. Potentially
memory saver (or performance even) bugfix.
Bottomline is:
We need to initialize the UVs otherwise vertex comparison fails ...
Ideally MoTo should take care of initializing MT_Point2
(note in Windows that seems to be fine, but it's safer to not rely on that)
note: that this intentionally removes check to exit vpaint mode when a vertex color layer is removed,
since being in vertex-paint mode without a vertex color layer is supported.
also minor change to drawing camera limits while picking from previous commit.
This commit simply implements mapping from centered cropped canvas
to a full-frame coordinates, so operations like alpha-overing render
result on top of image will be properly aligned.
Using MultiSample, the code that inspects Z buffer values fail, like for grease pencil
drawing on "Surface".
It appears to me that all this depth draw/read code is ignoring gpu offscreen entirely.
This should be confirmed by Campbell though :)
I'm also quite unsure why this code exists, related to other tools that use
depth too (particles, sculpt). Good to mark down for our viewport recode.
After quite some time debugging going back through previous commits for this
feature and digging around the internals of the blenfont,I finally found the
culprit. It turns out that there was just a single line missing between
BLF_width_default() and BLF_width_and_height_default(), which caused the widths
returned to understimate the space required or so, causing text clipping. The
offending line probably correcting for different DPI scaling values.