Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/python_api/examples/bpy.types.RenderEngine.py12
-rw-r--r--intern/cycles/render/buffers.cpp56
-rw-r--r--release/scripts/startup/bl_ui/properties_data_armature.py8
-rw-r--r--release/scripts/startup/bl_ui/properties_object.py8
-rw-r--r--release/scripts/startup/bl_ui/properties_particle.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_cloth.py8
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py8
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_field.py8
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_smoke.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_softbody.py8
-rw-r--r--release/scripts/startup/bl_ui/properties_scene.py8
-rw-r--r--release/scripts/startup/bl_ui/properties_texture.py4
-rw-r--r--release/scripts/startup/bl_ui/space_clip.py37
-rw-r--r--release/scripts/startup/bl_ui/space_dopesheet.py2
-rw-r--r--release/scripts/startup/bl_ui/space_graph.py4
-rw-r--r--release/scripts/startup/bl_ui/space_image.py46
-rw-r--r--release/scripts/startup/bl_ui/space_nla.py4
-rw-r--r--release/scripts/startup/bl_ui/space_node.py20
-rw-r--r--release/scripts/startup/bl_ui/space_sequencer.py6
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py4
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py28
-rw-r--r--source/blender/blenkernel/BKE_nla.h5
-rw-r--r--source/blender/blenkernel/intern/fcurve.c3
-rw-r--r--source/blender/blenkernel/intern/nla.c34
-rw-r--r--source/blender/editors/animation/keyframing.c6
-rw-r--r--source/blender/nodes/intern/node_socket.c7
26 files changed, 208 insertions, 130 deletions
diff --git a/doc/python_api/examples/bpy.types.RenderEngine.py b/doc/python_api/examples/bpy.types.RenderEngine.py
index efb7640bcc7..f7b2be48bc4 100644
--- a/doc/python_api/examples/bpy.types.RenderEngine.py
+++ b/doc/python_api/examples/bpy.types.RenderEngine.py
@@ -64,9 +64,9 @@ def register():
# In this example, we need to see the main render image button and
# the material preview panel.
from bl_ui import (
- properties_render,
- properties_material,
- )
+ properties_render,
+ properties_material,
+ )
properties_render.RENDER_PT_render.COMPAT_ENGINES.add(CustomRenderEngine.bl_idname)
properties_material.MATERIAL_PT_preview.COMPAT_ENGINES.add(CustomRenderEngine.bl_idname)
@@ -75,9 +75,9 @@ def unregister():
bpy.utils.unregister_class(CustomRenderEngine)
from bl_ui import (
- properties_render,
- properties_material,
- )
+ properties_render,
+ properties_material,
+ )
properties_render.RENDER_PT_render.COMPAT_ENGINES.remove(CustomRenderEngine.bl_idname)
properties_material.MATERIAL_PT_preview.COMPAT_ENGINES.remove(CustomRenderEngine.bl_idname)
diff --git a/intern/cycles/render/buffers.cpp b/intern/cycles/render/buffers.cpp
index a7a1260e425..cc34ae2bbdb 100644
--- a/intern/cycles/render/buffers.cpp
+++ b/intern/cycles/render/buffers.cpp
@@ -168,7 +168,12 @@ bool RenderBuffers::copy_from_device(Device *from_device)
bool RenderBuffers::get_denoising_pass_rect(int offset, float exposure, int sample, int components, float *pixels)
{
- float scale = 1.0f/sample;
+ float invsample = 1.0f/sample;
+ float scale = invsample;
+ bool variance = (offset == DENOISING_PASS_NORMAL_VAR) ||
+ (offset == DENOISING_PASS_ALBEDO_VAR) ||
+ (offset == DENOISING_PASS_DEPTH_VAR) ||
+ (offset == DENOISING_PASS_COLOR_VAR);
if(offset == DENOISING_PASS_COLOR) {
scale *= exposure;
@@ -178,24 +183,51 @@ bool RenderBuffers::get_denoising_pass_rect(int offset, float exposure, int samp
}
offset += params.get_denoising_offset();
- float *in = (float*)buffer.data_pointer + offset;
int pass_stride = params.get_passes_size();
int size = params.width*params.height;
- if(components == 1) {
- for(int i = 0; i < size; i++, in += pass_stride, pixels++) {
- pixels[0] = in[0]*scale;
+ if(variance) {
+ /* Approximate variance as E[x^2] - 1/N * (E[x])^2, since online variance
+ * update does not work efficiently with atomics in the kernel. */
+ int mean_offset = offset - components;
+ float *mean = (float*)buffer.data_pointer + mean_offset;
+ float *var = (float*)buffer.data_pointer + offset;
+ assert(mean_offset >= 0);
+
+ if(components == 1) {
+ for(int i = 0; i < size; i++, mean += pass_stride, var += pass_stride, pixels++) {
+ pixels[0] = max(0.0f, var[0] - mean[0]*mean[0]*invsample)*scale;
+ }
}
- }
- else if(components == 3) {
- for(int i = 0; i < size; i++, in += pass_stride, pixels += 3) {
- pixels[0] = in[0]*scale;
- pixels[1] = in[1]*scale;
- pixels[2] = in[2]*scale;
+ else if(components == 3) {
+ for(int i = 0; i < size; i++, mean += pass_stride, var += pass_stride, pixels += 3) {
+ pixels[0] = max(0.0f, var[0] - mean[0]*mean[0]*invsample)*scale;
+ pixels[1] = max(0.0f, var[1] - mean[1]*mean[1]*invsample)*scale;
+ pixels[2] = max(0.0f, var[2] - mean[2]*mean[2]*invsample)*scale;
+ }
+ }
+ else {
+ return false;
}
}
else {
- return false;
+ float *in = (float*)buffer.data_pointer + offset;
+
+ if(components == 1) {
+ for(int i = 0; i < size; i++, in += pass_stride, pixels++) {
+ pixels[0] = in[0]*scale;
+ }
+ }
+ else if(components == 3) {
+ for(int i = 0; i < size; i++, in += pass_stride, pixels += 3) {
+ pixels[0] = in[0]*scale;
+ pixels[1] = in[1]*scale;
+ pixels[2] = in[2]*scale;
+ }
+ }
+ else {
+ return false;
+ }
}
return true;
diff --git a/release/scripts/startup/bl_ui/properties_data_armature.py b/release/scripts/startup/bl_ui/properties_data_armature.py
index fbfb611e03c..413636d005b 100644
--- a/release/scripts/startup/bl_ui/properties_data_armature.py
+++ b/release/scripts/startup/bl_ui/properties_data_armature.py
@@ -285,10 +285,10 @@ class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, Panel):
row.prop(itasc, "damping_max", text="Damp", slider=True)
row.prop(itasc, "damping_epsilon", text="Eps", slider=True)
-from bl_ui.properties_animviz import (
- MotionPathButtonsPanel,
- OnionSkinButtonsPanel,
- )
+from .properties_animviz import (
+ MotionPathButtonsPanel,
+ OnionSkinButtonsPanel,
+)
class DATA_PT_motion_paths(MotionPathButtonsPanel, Panel):
diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py
index dc14396a285..a77dad506f1 100644
--- a/release/scripts/startup/bl_ui/properties_object.py
+++ b/release/scripts/startup/bl_ui/properties_object.py
@@ -323,10 +323,10 @@ class OBJECT_PT_duplication(ObjectButtonsPanel, Panel):
layout.prop(ob, "dupli_group", text="Group")
-from bl_ui.properties_animviz import (
- MotionPathButtonsPanel,
- OnionSkinButtonsPanel,
- )
+from .properties_animviz import (
+ MotionPathButtonsPanel,
+ OnionSkinButtonsPanel,
+)
class OBJECT_PT_motion_paths(MotionPathButtonsPanel, Panel):
diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py
index 8d79da4cd89..a5793e6d9a9 100644
--- a/release/scripts/startup/bl_ui/properties_particle.py
+++ b/release/scripts/startup/bl_ui/properties_particle.py
@@ -22,7 +22,7 @@ from bpy.types import Panel, Menu
from rna_prop_ui import PropertyPanel
from bpy.app.translations import pgettext_iface as iface_
-from bl_ui.properties_physics_common import (
+from .properties_physics_common import (
point_cache_ui,
effector_weights_ui,
basic_force_field_settings_ui,
diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py
index 07f995640c3..351418c9d23 100644
--- a/release/scripts/startup/bl_ui/properties_physics_cloth.py
+++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py
@@ -20,10 +20,10 @@
import bpy
from bpy.types import Menu, Panel
-from bl_ui.properties_physics_common import (
- point_cache_ui,
- effector_weights_ui,
- )
+from .properties_physics_common import (
+ point_cache_ui,
+ effector_weights_ui,
+)
def cloth_panel_enabled(md):
diff --git a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
index c0ecb09d360..7fc1c01279d 100644
--- a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
+++ b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
@@ -20,10 +20,10 @@
import bpy
from bpy.types import Panel, UIList
-from bl_ui.properties_physics_common import (
- point_cache_ui,
- effector_weights_ui,
- )
+from .properties_physics_common import (
+ point_cache_ui,
+ effector_weights_ui,
+)
class PHYSICS_UL_dynapaint_surfaces(UIList):
diff --git a/release/scripts/startup/bl_ui/properties_physics_field.py b/release/scripts/startup/bl_ui/properties_physics_field.py
index fd212beee97..aee93f840be 100644
--- a/release/scripts/startup/bl_ui/properties_physics_field.py
+++ b/release/scripts/startup/bl_ui/properties_physics_field.py
@@ -20,10 +20,10 @@
import bpy
from bpy.types import Panel
-from bl_ui.properties_physics_common import (
- basic_force_field_settings_ui,
- basic_force_field_falloff_ui,
- )
+from .properties_physics_common import (
+ basic_force_field_settings_ui,
+ basic_force_field_falloff_ui,
+)
class PhysicButtonsPanel:
diff --git a/release/scripts/startup/bl_ui/properties_physics_smoke.py b/release/scripts/startup/bl_ui/properties_physics_smoke.py
index f9aba70bb75..85bd9a9def1 100644
--- a/release/scripts/startup/bl_ui/properties_physics_smoke.py
+++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py
@@ -20,7 +20,7 @@
import bpy
from bpy.types import Panel
-from bl_ui.properties_physics_common import (
+from .properties_physics_common import (
point_cache_ui,
effector_weights_ui,
)
diff --git a/release/scripts/startup/bl_ui/properties_physics_softbody.py b/release/scripts/startup/bl_ui/properties_physics_softbody.py
index 186ba19f62d..718f552cf33 100644
--- a/release/scripts/startup/bl_ui/properties_physics_softbody.py
+++ b/release/scripts/startup/bl_ui/properties_physics_softbody.py
@@ -20,10 +20,10 @@
import bpy
from bpy.types import Panel
-from bl_ui.properties_physics_common import (
- point_cache_ui,
- effector_weights_ui,
- )
+from .properties_physics_common import (
+ point_cache_ui,
+ effector_weights_ui,
+)
COMPAT_OB_TYPES = {'MESH', 'LATTICE', 'CURVE', 'SURFACE', 'FONT'}
diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py
index 3356222fb1f..e8f25ea891b 100644
--- a/release/scripts/startup/bl_ui/properties_scene.py
+++ b/release/scripts/startup/bl_ui/properties_scene.py
@@ -26,10 +26,10 @@ from bpy.types import (
from rna_prop_ui import PropertyPanel
-from bl_ui.properties_physics_common import (
- point_cache_ui,
- effector_weights_ui,
- )
+from .properties_physics_common import (
+ point_cache_ui,
+ effector_weights_ui,
+)
class SCENE_MT_units_length_presets(Menu):
diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py
index 86863b93ce3..01c36347b56 100644
--- a/release/scripts/startup/bl_ui/properties_texture.py
+++ b/release/scripts/startup/bl_ui/properties_texture.py
@@ -33,7 +33,7 @@ from bpy.types import (
from rna_prop_ui import PropertyPanel
-from bl_ui.properties_paint_common import brush_texture_settings
+from .properties_paint_common import brush_texture_settings
class TEXTURE_MT_specials(Menu):
@@ -78,7 +78,7 @@ class TEXTURE_UL_texslots(UIList):
layout.label(text="", icon_value=icon)
-from bl_ui.properties_material import active_node_mat
+from .properties_material import active_node_mat
def context_tex_datablock(context):
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py
index 57195d22340..11043ed1111 100644
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -21,14 +21,15 @@
import bpy
from bpy.types import Panel, Header, Menu, UIList
from bpy.app.translations import pgettext_iface as iface_
-from bl_ui.properties_grease_pencil_common import (
- GreasePencilDrawingToolsPanel,
- GreasePencilStrokeEditPanel,
- GreasePencilStrokeSculptPanel,
- GreasePencilBrushPanel,
- GreasePencilBrushCurvesPanel,
- GreasePencilDataPanel,
- GreasePencilPaletteColorPanel)
+from .properties_grease_pencil_common import (
+ GreasePencilDrawingToolsPanel,
+ GreasePencilStrokeEditPanel,
+ GreasePencilStrokeSculptPanel,
+ GreasePencilBrushPanel,
+ GreasePencilBrushCurvesPanel,
+ GreasePencilDataPanel,
+ GreasePencilPaletteColorPanel,
+)
class CLIP_UL_tracking_objects(UIList):
@@ -1045,16 +1046,16 @@ class CLIP_PT_proxy(CLIP_PT_clip_view_panel, Panel):
# -----------------------------------------------------------------------------
# Mask (similar code in space_image.py, keep in sync)
-from bl_ui.properties_mask_common import (
- MASK_PT_mask,
- MASK_PT_layers,
- MASK_PT_spline,
- MASK_PT_point,
- MASK_PT_display,
- MASK_PT_tools,
- MASK_PT_transforms,
- MASK_PT_add,
- )
+from .properties_mask_common import (
+ MASK_PT_mask,
+ MASK_PT_layers,
+ MASK_PT_spline,
+ MASK_PT_point,
+ MASK_PT_display,
+ MASK_PT_tools,
+ MASK_PT_transforms,
+ MASK_PT_add,
+)
class CLIP_PT_mask_layers(MASK_PT_layers, Panel):
diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py
index e02649219dd..371ab088190 100644
--- a/release/scripts/startup/bl_ui/space_dopesheet.py
+++ b/release/scripts/startup/bl_ui/space_dopesheet.py
@@ -285,7 +285,7 @@ class DOPESHEET_MT_marker(Menu):
def draw(self, context):
layout = self.layout
- from bl_ui.space_time import marker_menu_generic
+ from .space_time import marker_menu_generic
marker_menu_generic(layout)
st = context.space_data
diff --git a/release/scripts/startup/bl_ui/space_graph.py b/release/scripts/startup/bl_ui/space_graph.py
index 21b49df61ae..4938512070e 100644
--- a/release/scripts/startup/bl_ui/space_graph.py
+++ b/release/scripts/startup/bl_ui/space_graph.py
@@ -26,7 +26,7 @@ class GRAPH_HT_header(Header):
bl_space_type = 'GRAPH_EDITOR'
def draw(self, context):
- from bl_ui.space_dopesheet import dopesheet_filter
+ from .space_dopesheet import dopesheet_filter
layout = self.layout
toolsettings = context.tool_settings
@@ -186,7 +186,7 @@ class GRAPH_MT_marker(Menu):
def draw(self, context):
layout = self.layout
- from bl_ui.space_time import marker_menu_generic
+ from .space_time import marker_menu_generic
marker_menu_generic(layout)
# TODO: pose markers for action edit mode only?
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index c105e72b1e5..24d3ed5a0bf 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -20,21 +20,21 @@
import bpy
import math
from bpy.types import Header, Menu, Panel
-from bl_ui.properties_paint_common import (
- UnifiedPaintPanel,
- brush_texture_settings,
- brush_texpaint_common,
- brush_mask_texture_settings,
- )
-from bl_ui.properties_grease_pencil_common import (
- GreasePencilDrawingToolsPanel,
- GreasePencilStrokeEditPanel,
- GreasePencilStrokeSculptPanel,
- GreasePencilBrushPanel,
- GreasePencilBrushCurvesPanel,
- GreasePencilDataPanel,
- GreasePencilPaletteColorPanel
- )
+from .properties_paint_common import (
+ UnifiedPaintPanel,
+ brush_texture_settings,
+ brush_texpaint_common,
+ brush_mask_texture_settings,
+)
+from .properties_grease_pencil_common import (
+ GreasePencilDrawingToolsPanel,
+ GreasePencilStrokeEditPanel,
+ GreasePencilStrokeSculptPanel,
+ GreasePencilBrushPanel,
+ GreasePencilBrushCurvesPanel,
+ GreasePencilDataPanel,
+ GreasePencilPaletteColorPanel,
+)
from bpy.app.translations import pgettext_iface as iface_
@@ -545,14 +545,14 @@ class MASK_MT_editor_menus(Menu):
# Mask (similar code in space_clip.py, keep in sync)
# note! - panel placement does _not_ fit well with image panels... need to fix
-from bl_ui.properties_mask_common import (
- MASK_PT_mask,
- MASK_PT_layers,
- MASK_PT_spline,
- MASK_PT_point,
- MASK_PT_display,
- MASK_PT_tools,
- )
+from .properties_mask_common import (
+ MASK_PT_mask,
+ MASK_PT_layers,
+ MASK_PT_spline,
+ MASK_PT_point,
+ MASK_PT_display,
+ MASK_PT_tools,
+)
class IMAGE_PT_mask(MASK_PT_mask, Panel):
diff --git a/release/scripts/startup/bl_ui/space_nla.py b/release/scripts/startup/bl_ui/space_nla.py
index 65d020477dc..8a933570c5e 100644
--- a/release/scripts/startup/bl_ui/space_nla.py
+++ b/release/scripts/startup/bl_ui/space_nla.py
@@ -26,7 +26,7 @@ class NLA_HT_header(Header):
bl_space_type = 'NLA_EDITOR'
def draw(self, context):
- from bl_ui.space_dopesheet import dopesheet_filter
+ from .space_dopesheet import dopesheet_filter
layout = self.layout
@@ -124,7 +124,7 @@ class NLA_MT_marker(Menu):
def draw(self, context):
layout = self.layout
- from bl_ui.space_time import marker_menu_generic
+ from .space_time import marker_menu_generic
marker_menu_generic(layout)
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py
index 335ef67c847..200fc415f8a 100644
--- a/release/scripts/startup/bl_ui/space_node.py
+++ b/release/scripts/startup/bl_ui/space_node.py
@@ -21,16 +21,16 @@ import bpy
import nodeitems_utils
from bpy.types import Header, Menu, Panel
from bpy.app.translations import pgettext_iface as iface_
-from bl_ui.properties_grease_pencil_common import (
- GreasePencilDrawingToolsPanel,
- GreasePencilStrokeEditPanel,
- GreasePencilStrokeSculptPanel,
- GreasePencilBrushPanel,
- GreasePencilBrushCurvesPanel,
- GreasePencilDataPanel,
- GreasePencilPaletteColorPanel,
- GreasePencilToolsPanel
- )
+from .properties_grease_pencil_common import (
+ GreasePencilDrawingToolsPanel,
+ GreasePencilStrokeEditPanel,
+ GreasePencilStrokeSculptPanel,
+ GreasePencilBrushPanel,
+ GreasePencilBrushCurvesPanel,
+ GreasePencilDataPanel,
+ GreasePencilPaletteColorPanel,
+ GreasePencilToolsPanel
+)
class NODE_HT_header(Header):
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index 82f83c2ddc9..1ca1da315b7 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -20,7 +20,7 @@
import bpy
from bpy.types import Header, Menu, Panel
from rna_prop_ui import PropertyPanel
-from bl_ui.properties_grease_pencil_common import (
+from .properties_grease_pencil_common import (
GreasePencilDataPanel,
GreasePencilPaletteColorPanel,
GreasePencilToolsPanel,
@@ -276,7 +276,7 @@ class SEQUENCER_MT_marker(Menu):
def draw(self, context):
layout = self.layout
- from bl_ui.space_time import marker_menu_generic
+ from .space_time import marker_menu_generic
marker_menu_generic(layout)
@@ -1166,7 +1166,7 @@ class SEQUENCER_PT_view_safe_areas(SequencerButtonsPanel_Output, Panel):
self.layout.prop(st, "show_safe_areas", text="")
def draw(self, context):
- from bl_ui.properties_data_camera import draw_display_safe_settings
+ from .properties_data_camera import draw_display_safe_settings
layout = self.layout
st = context.space_data
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 0fd2e5296e4..da1db6836c6 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -19,11 +19,11 @@
# <pep8 compliant>
import bpy
from bpy.types import Header, Menu, Panel
-from bl_ui.properties_grease_pencil_common import (
+from .properties_grease_pencil_common import (
GreasePencilDataPanel,
GreasePencilPaletteColorPanel,
)
-from bl_ui.properties_paint_common import UnifiedPaintPanel
+from .properties_paint_common import UnifiedPaintPanel
from bpy.app.translations import contexts as i18n_contexts
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 88e6f5df86b..134a91a8c1f 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -19,20 +19,20 @@
# <pep8 compliant>
import bpy
from bpy.types import Menu, Panel, UIList
-from bl_ui.properties_grease_pencil_common import (
- GreasePencilDrawingToolsPanel,
- GreasePencilStrokeEditPanel,
- GreasePencilInterpolatePanel,
- GreasePencilStrokeSculptPanel,
- GreasePencilBrushPanel,
- GreasePencilBrushCurvesPanel
- )
-from bl_ui.properties_paint_common import (
- UnifiedPaintPanel,
- brush_texture_settings,
- brush_texpaint_common,
- brush_mask_texture_settings,
- )
+from .properties_grease_pencil_common import (
+ GreasePencilDrawingToolsPanel,
+ GreasePencilStrokeEditPanel,
+ GreasePencilInterpolatePanel,
+ GreasePencilStrokeSculptPanel,
+ GreasePencilBrushPanel,
+ GreasePencilBrushCurvesPanel
+)
+from .properties_paint_common import (
+ UnifiedPaintPanel,
+ brush_texture_settings,
+ brush_texpaint_common,
+ brush_mask_texture_settings,
+)
class View3DPanel:
diff --git a/source/blender/blenkernel/BKE_nla.h b/source/blender/blenkernel/BKE_nla.h
index 3bf8bba47f5..8d9fc8ff6cf 100644
--- a/source/blender/blenkernel/BKE_nla.h
+++ b/source/blender/blenkernel/BKE_nla.h
@@ -40,6 +40,9 @@ struct bAction;
struct Scene;
struct Speaker;
+struct PointerRNA;
+struct PropertyRNA;
+
/* ----------------------------- */
/* Data Management */
@@ -103,6 +106,8 @@ bool BKE_nlatrack_has_animated_strips(struct NlaTrack *nlt);
bool BKE_nlatracks_have_animated_strips(ListBase *tracks);
void BKE_nlastrip_validate_fcurves(struct NlaStrip *strip);
+bool BKE_nlastrip_has_curves_for_property(const struct PointerRNA *ptr, const struct PropertyRNA *prop);
+
void BKE_nla_validate_state(struct AnimData *adt);
/* ............ */
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index 103f23a2c18..1a93031034b 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -61,6 +61,7 @@
#include "BKE_curve.h"
#include "BKE_global.h"
#include "BKE_object.h"
+#include "BKE_nla.h"
#include "RNA_access.h"
@@ -335,7 +336,7 @@ FCurve *rna_get_fcurve_context_ui(
if (r_action) *r_action = NULL;
/* Special case for NLA Control Curves... */
- if (ptr->type == &RNA_NlaStrip) {
+ if (BKE_nlastrip_has_curves_for_property(ptr, prop)) {
NlaStrip *strip = (NlaStrip *)ptr->data;
/* Set the special flag, since it cannot be a normal action/driver
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index 478b854c4df..d4943b1b566 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -1417,6 +1417,40 @@ void BKE_nlastrip_validate_fcurves(NlaStrip *strip)
}
}
+/* Check if the given RNA pointer + property combo should be handled by
+ * NLA strip curves or not.
+ */
+bool BKE_nlastrip_has_curves_for_property(const PointerRNA *ptr, const PropertyRNA *prop)
+{
+ /* sanity checks */
+ if (ELEM(NULL, ptr, prop))
+ return false;
+
+ /* 1) Must be NLA strip */
+ if (ptr->type == &RNA_NlaStrip) {
+ /* 2) Must be one of the predefined properties */
+ static PropertyRNA *prop_influence = NULL;
+ static PropertyRNA *prop_time = NULL;
+ static bool needs_init = true;
+
+ /* Init the properties on first use */
+ if (needs_init) {
+ prop_influence = RNA_struct_type_find_property(&RNA_NlaStrip, "influence");
+ prop_time = RNA_struct_type_find_property(&RNA_NlaStrip, "strip_time");
+
+ needs_init = false;
+ }
+
+ /* Check if match */
+ if (ELEM(prop, prop_influence, prop_time)) {
+ return true;
+ }
+ }
+
+ /* No criteria met */
+ return false;
+}
+
/* Sanity Validation ------------------------------------ */
static bool nla_editbone_name_check(void *arg, const char *name)
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 66872c77b04..93ce45e1e8f 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -1791,6 +1791,10 @@ static int insert_key_button_exec(bContext *C, wmOperator *op)
if (fcu) {
success = insert_keyframe_direct(op->reports, ptr, prop, fcu, cfra, ts->keyframe_type, 0);
}
+ else {
+ BKE_report(op->reports, RPT_ERROR,
+ "This property cannot be animated as it will not get updated correctly");
+ }
}
else if (UI_but_flag_is_set(but, UI_BUT_DRIVEN)) {
/* Driven property - Find driver */
@@ -1886,7 +1890,7 @@ static int delete_key_button_exec(bContext *C, wmOperator *op)
}
if (ptr.id.data && ptr.data && prop) {
- if (ptr.type == &RNA_NlaStrip) {
+ if (BKE_nlastrip_has_curves_for_property(&ptr, prop)) {
/* Handle special properties for NLA Strips, whose F-Curves are stored on the
* strips themselves. These are stored separately or else the properties will
* not have any effect.
diff --git a/source/blender/nodes/intern/node_socket.c b/source/blender/nodes/intern/node_socket.c
index ddd25b237a0..382492707ce 100644
--- a/source/blender/nodes/intern/node_socket.c
+++ b/source/blender/nodes/intern/node_socket.c
@@ -183,13 +183,14 @@ void node_verify_socket_templates(bNodeTree *ntree, bNode *node)
{
bNodeType *ntype = node->typeinfo;
/* Don't try to match socket lists when there are no templates.
- * This prevents group node sockets from being removed, without the need to explicitly
- * check the node type here.
+ * This prevents dynamically generated sockets to be removed, like for
+ * group, image or render layer nodes. We have an explicit check for the
+ * render layer node since it still has fixed sockets too.
*/
if (ntype) {
if (ntype->inputs && ntype->inputs[0].type >= 0)
verify_socket_template_list(ntree, node, SOCK_IN, &node->inputs, ntype->inputs);
- if (ntype->outputs && ntype->outputs[0].type >= 0)
+ if (ntype->outputs && ntype->outputs[0].type >= 0 && node->type != CMP_NODE_R_LAYERS)
verify_socket_template_list(ntree, node, SOCK_OUT, &node->outputs, ntype->outputs);
}
}