Blender Git Commits

Blender Git "master" branch commits.

Page: 580 / 5574

Revision a550937 by Hans Goudey
September 11, 2020, 19:08 (GMT)
UI: Use operator to set property editor's pinned data-block

This commit removes the custom callback that's currently used to set the
property editor's pinned data, replacing it with an operator. This means
"pin" button doesn't have to be defined in C.

Differential Revision: https://developer.blender.org/D8376
September 11, 2020, 18:41 (GMT)
Fix T80623: Correct Face Attributes affecting modes not listed

Some transform modes (such as Mirror) are not listed to have UV corrected
during the transformation.

It messed up the UV of all of these.
September 11, 2020, 16:57 (GMT)
GPUTexture: Return NULL texture if data grid is NULL too

In a recent update to the fluids modifier (rB03c2439d96e8), I introduced a flush call that sets all grids to NULL if the frame is outside of the allowed frame range. This way, the texture creation function must also check if the data grid is NULL before trying to create a texture.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D8872
September 11, 2020, 13:19 (GMT)
Constraints: Child-Of, set inverse matrix upon creation

Set the inverse matrix when the Child Of constraint is created. This
prevents the bone/object from jumping away when the constraint is added,
improving usability.

Reviewed by: sybren

Differential Revision: https://developer.blender.org/D8851
September 11, 2020, 10:41 (GMT)
OpenSubdiv: initialize in background-mode

Previously this was initialized with OpenGL, however this uses a
more proper/complete implementation it is not only for OpenGL.
September 11, 2020, 10:08 (GMT)
Cleanup: remove unused includes
September 11, 2020, 10:04 (GMT)
Fix T79464: Crash adding objects without an active screen

Running add-objects operator without an active screen would crash
as CTX_data_edit_object would return NULL in this case.

This could happen when adding objects from frame-change handlers for e.g.

In the case of adding new objects there is no need for a context lookup,
pass this directly to ED_object_editmode_exit_ex.
September 11, 2020, 09:57 (GMT)
Refactor: move CacheFile .blend I/O to IDTypeInfo callbacks
September 11, 2020, 09:52 (GMT)
Refactor: move Sound .blend I/O to IDTypeInfo callbacks
September 11, 2020, 09:49 (GMT)
Particles: Allow python to write hair keys

Add a function HairKey.co_object_set() which can be used to modify hair
keys positions in a way that hair strands respects the new coordinates,
without doing extra trickery with edit mode toggle. The naming comes
from existing HairKey.co_object().

The usage is a bit tricky:

- The function is to be called on the hair key from an original object.
- The arguments are to be passed from evaluated object.

Basically:

hair_key_orig.co_object_set(object_eval, modifier_eval, particle_eval)

This is required because coordinate space conversion needs to know
evaluated state of the hair system in order to access hair space
matrix. It is a deliberate choice to not pass dependency graph and not
to do lookup of evaluated ID on every call of co_object_set() to keep
performance on a manageable levels.

One requirement is that the hair strands are to be calculated once, by,
for example, toggling particle edit mode. Without this there will be no
`particles` to access hair keys from in the original object.

Such functionality is something what got lost during 2.80 development
and is something what is needed here at the studio.

Below is the file with more complete example: convert strands from mesh
edges to actual particle system hair strands. The viewport refresh is
sometimes missing, and this does not seem to be related to this specific
change.

{F8858104}

Differential Revision: https://developer.blender.org/D8849
September 11, 2020, 09:46 (GMT)
Refactor: move Simulation .blend I/O to IDTypeInfo callbacks
September 11, 2020, 09:39 (GMT)
Refactor: move Volume .blend I/O to IDTypeInfo callbacks
September 11, 2020, 09:21 (GMT)
Cleanup: make format
September 11, 2020, 09:20 (GMT)
Refactor: move PointCloud .blend I/O to IDTypeInfo callbacks
September 11, 2020, 09:14 (GMT)
Refactor: move Hair .blend I/O to IDTypeInfo callbacks
September 11, 2020, 09:06 (GMT)
Refactor: move GPencil .blend I/O to IDTypeInfo callbacks
September 11, 2020, 08:35 (GMT)
Refactor: move Texture .blend I/O to IDTypeInfo callbacks
September 11, 2020, 07:12 (GMT)
Image Editor: Smooth Wire User Preferences

The old image editor has an option to enable the smooth wire drawing.
This option was stored per editor and disabled by default. This patch
connects the smooth wires in the UV/Image editor to `User Prefereces ->
Viewport -> Quality -> Smooth Wire [] Overlay`.

The old option is left in place and will be removed when the old image
editor drawing code will be removed before BCon 3.
September 11, 2020, 06:35 (GMT)
Image Editor: Enable New Drawing

This patch reverses use draw manager for image editor the
experimental feature. Now the new drawing is enabled by default.
Inside the experimental tab in the user preferences there is now an
option to revert back to the old drawing method.

Using this option we can easilly check if all drawing features have been
migrated over. The plan is to remove the legacy drawing before BCon 3.
September 11, 2020, 06:08 (GMT)
Use DrawManager for Image/UV Editor

This project moves the current UV/Image editor drawing to the draw manager.
Why would we do this:

**Performance**:

Current implementation would draw each texel per time. Multiple texels could be
drawn per pixel what would overwrite the previous result. You can notice this
when working with large textures. Repeat image drawing made this visible by
drawing for a small period of time and stop drawing the rest. Now the rendering
is fast and all repeated images are drawn.

**Alpha drawing**:

Current implementation would draw directly in display space. Giving incorrect
results when displaying alpha transparent images.
This addresses {T52680}, {T74709}, {T79518}
The image editor now can show emission only colors. See {D8234} for
examples.

**Current Limitations**

Using images that are larger than supported by your GPU are resized (eg larger
than 16000x16000 are resized to 8k). This leaves some blurring artifacts. It is
a low priority to add support back of displaying individual pixels of huge
images. There is a design task {T80113} with more detail.

**Implementation overview**
Introduced an Image Engine in the draw module. this engine is responsible for
drawing the texture in the main area of the UV/Image editor. The overlay engine
has a edit_uv overlay which is responsible to draw the UV's, shadows and
overlays specifically for the UV Image editor. The background + checker pattern
is drawn by the overlay_background.

The patch will allow us to share overlays between the 3d viewport and UV/Image
editor more easily. In most cases we just need to switch the `pos` with the `u`
attribute in the vertex shader.

The project can be activated in the user preferences as experimental features.
In a later commit this will be reversed.

Reviewed By: Cl�ment Foucault

Differential Revision: https://developer.blender.org/D8234
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021