Issue was caused by rare cases when camera move happens just after
last sample was finished, this would lead to missing delay reset
because render cycle will go to pause_cond.wait(). No reset will
happen at this point because of some kind of optimization which
checks whether camera is tagged for update and wouldn't do reset
in this case.
Talked to Brecht and seems this optimization is not actually needed
and removing it will solve issue with frozen preview.
Issue was caused by couple of circumstances:
- Normal Map node requires tesselated faces to compute tangent space
- All temporary meshes needed for Cycles export were adding to G.main
- Undo pushes would temporary set meshes tessfaces to NULL
- Moving node will cause undo push and tree re-evaluate fr preview
All this leads to threading conflict between preview render and undo
system.
Solved it in way that all temporary meshes are adding to that exact
Main which was passed to Cycles via BlendData. This required couple
of mechanic changes like adding extra parameter to *_add() functions
and adding some *_ex() functions to make it possible RNA adds objects
to Main passed to new() RNA function.
This was tricky to pass Main to RNA function and IMO that's not so
nice to pass main to function, so ended up with such decision:
- Object.to_mesh() will add temp mesh to G.main
- Added Main.meshes.new_from_object() which does the same as to_mesh,
but adds temporary mesh to specified Main.
So now all temporary meshes needed for preview render would be added
to preview_main which does not conflict with undo pushes.
Viewport render shall not be an issue because object sync happens from
main thread in this case.
It could be some issues with final render, but that's not so much
likely to happen, so shall be fine.
Thanks to Brecht for review!
When using triangle primitives this fix enables 'closed tip'.
UVs and vertex colours are added when using triangle primitives for hair.
Two new preset modes have also been included to allow easy access to curves and triangle planes.
This modules does not depend on any blender-specific data
structures or algorithms and due to our policy better be
placed to intern/
Shall be no functional changes, tested CMake and SCons on
Linux, hopefully other platforms will work as well.
P.S. SVN history shall be preserved for the files.
Now the active monitor size is used on startup.
Currently the cursor position is checked for intersection with the monitor bounds to find the active screen.
This returns the desktop size, not just the size of the active monitor, useful since this constrains the mouse and we dont have to detect the active monitor (which isn't so straightforward with xlib).
carbon/cocoa are TODO, they still use getMainDisplayDimensions().
Issue was caused by cycles trying to find builtin images in a main
database and in case of preview render images are not in database,
they're just referenced by shader node tree.
Now builtin images in cycles have got void* pointer to store data
needed to load builtin images.
In case ob blender session, this pointer will store pointer from
PointerRNA for image datablock and used later to construct Image
class based on this pointer.
This also saves database lookup for final render which is nice :)
Reviewed by Brecht.
Addition of a RNA function to toggle between the hair settings and rebuild the cache. This enables the usage of the render step, child number and full display percentage with f12 rendering.
A scaling to the strand radius has also been added for the static bvh. This only matches up with dynamic for uniform scaling.
A very small fix is included for multiple uvs/vertex colours when using child particles.
Patch by Sergey, .blend by Thomas and some further tweaks by me.
Still to solve later: allow external engines to specify own preview .blend, for
now the code here is doing too much magic hacking on the preview scene still.
This didnt work well with making blender areas into windows.
Real fix: check such minimums based on what's in the window itself... or just
make scaling work flawless.
non-threadsafe usage of guarded allocator.
Also added small chunk of code to check consistency of begin/end
threaded malloc.
All this additional checks are commented and wouldn't affect on
builds, however found them helpful to troubleshoot issues so
decided to commit it to SVN.
Added export of multiple UV coordinates and vertex colour attributes.
A debugging option to export the strands without using the cache has also been removed.
Add operators to add/remove rigid body world and objects.
Add UI scripts.
The rigid body simulation works on scene level and overrides the
position/orientation of rigid bodies when active.
It does not deform meshes or generate data so there is no modifier.
Usage:
* Add rigid body world in the scene tab
* Create a group
* Add objects to the group
* Assign group to the rigid body world
* Play animation
For convenience the rigid body tools operators in the tools panel of the 3d view
will add a world, group and add objects to the group automatically so you only have
to press one button to add/remove rigid bodies to the simulation.
Part of GSoC 2010 and 2012.
Authors: Joshua Leung (aligorith), Sergej Reich (sergof)
When you open a Blender window larger than a screen, Macs clip it to match the height,
but they allow the width to be more.
Problem is that this clipping happens after all window opening code. That causes
check for HiDPI mode to fail.
Now it checks it again on event GHOST_kEventWindowUpdate, which is only on startup.