Merge branch 'master' into blender2.8
authorCampbell Barton <ideasman42@gmail.com>
Fri, 1 Sep 2017 09:17:14 +0000 (19:17 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 1 Sep 2017 09:17:14 +0000 (19:17 +1000)
1  2 
intern/cycles/blender/addon/ui.py
source/blender/makesrna/intern/rna_access.c

index fdacd52df0e873bdccdf78daf2ab8faaad0157a4,7ab47455c4922ff9ac98fa79819d3ad57afe4205..130b9434255ed41e36fc3ddaa44715c6248f6d72
@@@ -17,7 -17,6 +17,7 @@@
  # <pep8 compliant>
  
  import bpy
 +from bpy_extras.node_utils import find_node_input, find_output_node
  
  from bpy.types import (
          Panel,
@@@ -140,7 -139,7 +140,7 @@@ def draw_samples_info(layout, context)
                        (ao * aa, ml * aa, sss * aa, vol * aa))
  
  
- class CyclesRender_PT_sampling(CyclesButtonsPanel, Panel):
+ class CYCLES_RENDER_PT_sampling(CyclesButtonsPanel, Panel):
      bl_label = "Sampling"
      bl_options = {'DEFAULT_CLOSED'}
  
          draw_samples_info(layout, context)
  
  
- class CyclesRender_PT_geometry(CyclesButtonsPanel, Panel):
+ class CYCLES_RENDER_PT_geometry(CyclesButtonsPanel, Panel):
      bl_label = "Geometry"
      bl_options = {'DEFAULT_CLOSED'}
  
          row.prop(ccscene, "maximum_width", text="Max Extension")
  
  
- class CyclesRender_PT_light_paths(CyclesButtonsPanel, Panel):
+ class CYCLES_RENDER_PT_light_paths(CyclesButtonsPanel, Panel):
      bl_label = "Light Paths"
      bl_options = {'DEFAULT_CLOSED'}
  
          sub.prop(cscene, "volume_bounces", text="Volume")
  
  
- class CyclesRender_PT_motion_blur(CyclesButtonsPanel, Panel):
+ class CYCLES_RENDER_PT_motion_blur(CyclesButtonsPanel, Panel):
      bl_label = "Motion Blur"
      bl_options = {'DEFAULT_CLOSED'}
  
          row.prop(cscene, "rolling_shutter_duration")
  
  
- class CyclesRender_PT_film(CyclesButtonsPanel, Panel):
+ class CYCLES_RENDER_PT_film(CyclesButtonsPanel, Panel):
      bl_label = "Film"
  
      def draw(self, context):
              sub.prop(cscene, "filter_width", text="Width")
  
  
- class CyclesRender_PT_performance(CyclesButtonsPanel, Panel):
+ class CYCLES_RENDER_PT_performance(CyclesButtonsPanel, Panel):
      bl_label = "Performance"
      bl_options = {'DEFAULT_CLOSED'}
  
          split.prop(cscene, "preview_start_resolution")
  
  
- class CyclesRender_PT_layer_options(CyclesButtonsPanel, Panel):
+ class CYCLES_RENDER_PT_layer_options(CyclesButtonsPanel, Panel):
      bl_label = "Layer"
      bl_context = "render_layer"
  
          col.prop(rl, "use_strand", "Use Hair")
  
  
- class CyclesRender_PT_layer_passes(CyclesButtonsPanel, Panel):
+ class CYCLES_RENDER_PT_layer_passes(CyclesButtonsPanel, Panel):
      bl_label = "Passes"
      bl_context = "render_layer"
      bl_options = {'DEFAULT_CLOSED'}
              col.prop(crl, "pass_debug_ray_bounces")
  
  
- class CyclesRender_PT_views(CyclesButtonsPanel, Panel):
+ class CYCLES_RENDER_PT_views(CyclesButtonsPanel, Panel):
      bl_label = "Views"
      bl_context = "render_layer"
      bl_options = {'DEFAULT_CLOSED'}
              row.prop(rv, "camera_suffix", text="")
  
  
- class CyclesRender_PT_denoising(CyclesButtonsPanel, Panel):
+ class CYCLES_RENDER_PT_denoising(CyclesButtonsPanel, Panel):
      bl_label = "Denoising"
      bl_context = "render_layer"
      bl_options = {'DEFAULT_CLOSED'}
          sub.prop(crl, "denoising_subsurface_indirect", text="Indirect", toggle=True)
  
  
- class Cycles_PT_post_processing(CyclesButtonsPanel, Panel):
+ class CYCLES_PT_post_processing(CyclesButtonsPanel, Panel):
      bl_label = "Post Processing"
      bl_options = {'DEFAULT_CLOSED'}
  
          col.prop(rd, "dither_intensity", text="Dither", slider=True)
  
  
- class CyclesCamera_PT_dof(CyclesButtonsPanel, Panel):
+ class CYCLES_CAMERA_PT_dof(CyclesButtonsPanel, Panel):
      bl_label = "Depth of Field"
      bl_context = "data"
  
          sub.prop(ccam, "aperture_ratio", text="Ratio")
  
  
- class Cycles_PT_context_material(CyclesButtonsPanel, Panel):
+ class CYCLES_PT_context_material(CyclesButtonsPanel, Panel):
      bl_label = ""
      bl_context = "material"
      bl_options = {'HIDE_HEADER'}
              split.separator()
  
  
- class CyclesObject_PT_motion_blur(CyclesButtonsPanel, Panel):
+ class CYCLES_OBJECT_PT_motion_blur(CyclesButtonsPanel, Panel):
      bl_label = "Motion Blur"
      bl_context = "object"
      bl_options = {'DEFAULT_CLOSED'}
          sub.prop(cob, "motion_steps", text="Steps")
  
  
- class CyclesObject_PT_cycles_settings(CyclesButtonsPanel, Panel):
+ class CYCLES_OBJECT_PT_cycles_settings(CyclesButtonsPanel, Panel):
      bl_label = "Cycles Settings"
      bl_context = "object"
      bl_options = {'DEFAULT_CLOSED'}
@@@ -895,27 -894,48 +895,27 @@@ class CYCLES_OT_use_shading_nodes(Opera
          return {'FINISHED'}
  
  
 -def find_node(material, nodetype):
 -    if material and material.node_tree:
 -        ntree = material.node_tree
 -
 -        active_output_node = None
 -        for node in ntree.nodes:
 -            if getattr(node, "type", None) == nodetype:
 -                if getattr(node, "is_active_output", True):
 -                    return node
 -                if not active_output_node:
 -                    active_output_node = node
 -        return active_output_node
 -
 -    return None
 -
 -
 -def find_node_input(node, name):
 -    for input in node.inputs:
 -        if input.name == name:
 -            return input
 -
 -    return None
 -
 -
 -def panel_node_draw(layout, id_data, output_type, input_name):
 +def panel_node_draw(layout, id_data, output_types, input_name):
      if not id_data.use_nodes:
          layout.operator("cycles.use_shading_nodes", icon='NODETREE')
          return False
  
      ntree = id_data.node_tree
  
 -    node = find_node(id_data, output_type)
 -    if not node:
 -        layout.label(text="No output node")
 -    else:
 +    node = find_output_node(ntree, output_types)
 +    if node:
          input = find_node_input(node, input_name)
 -        layout.template_node_view(ntree, node, input)
 +        if input:
 +            layout.template_node_view(ntree, node, input)
 +        else:
 +            layout.label(text="Incompatible output node")
 +    else:
 +        layout.label(text="No output node")
  
      return True
  
  
- class CyclesLamp_PT_preview(CyclesButtonsPanel, Panel):
+ class CYCLES_LAMP_PT_preview(CyclesButtonsPanel, Panel):
      bl_label = "Preview"
      bl_context = "data"
      bl_options = {'DEFAULT_CLOSED'}
          self.layout.template_preview(context.lamp)
  
  
- class CyclesLamp_PT_lamp(CyclesButtonsPanel, Panel):
+ class CYCLES_LAMP_PT_lamp(CyclesButtonsPanel, Panel):
      bl_label = "Lamp"
      bl_context = "data"
  
              layout.label(text="Not supported, interpreted as sun lamp")
  
  
- class CyclesLamp_PT_nodes(CyclesButtonsPanel, Panel):
+ class CYCLES_LAMP_PT_nodes(CyclesButtonsPanel, Panel):
      bl_label = "Nodes"
      bl_context = "data"
  
          layout = self.layout
  
          lamp = context.lamp
 -        if not panel_node_draw(layout, lamp, 'OUTPUT_LAMP', 'Surface'):
 +        if not panel_node_draw(layout, lamp, ('OUTPUT_LAMP',), 'Surface'):
              layout.prop(lamp, "color")
  
  
- class CyclesLamp_PT_spot(CyclesButtonsPanel, Panel):
+ class CYCLES_LAMP_PT_spot(CyclesButtonsPanel, Panel):
      bl_label = "Spot Shape"
      bl_context = "data"
  
          col.prop(lamp, "show_cone")
  
  
- class CyclesWorld_PT_preview(CyclesButtonsPanel, Panel):
+ class CYCLES_WORLD_PT_preview(CyclesButtonsPanel, Panel):
      bl_label = "Preview"
      bl_context = "world"
      bl_options = {'DEFAULT_CLOSED'}
          self.layout.template_preview(context.world)
  
  
- class CyclesWorld_PT_surface(CyclesButtonsPanel, Panel):
+ class CYCLES_WORLD_PT_surface(CyclesButtonsPanel, Panel):
      bl_label = "Surface"
      bl_context = "world"
  
  
          world = context.world
  
 -        if not panel_node_draw(layout, world, 'OUTPUT_WORLD', 'Surface'):
 +        if not panel_node_draw(layout, world, ('OUTPUT_WORLD',), 'Surface'):
              layout.prop(world, "horizon_color", text="Color")
  
  
- class CyclesWorld_PT_volume(CyclesButtonsPanel, Panel):
+ class CYCLES_WORLD_PT_volume(CyclesButtonsPanel, Panel):
      bl_label = "Volume"
      bl_context = "world"
      bl_options = {'DEFAULT_CLOSED'}
          layout = self.layout
  
          world = context.world
 -        panel_node_draw(layout, world, 'OUTPUT_WORLD', 'Volume')
 +        panel_node_draw(layout, world, ('OUTPUT_WORLD',), 'Volume')
  
  
- class CyclesWorld_PT_ambient_occlusion(CyclesButtonsPanel, Panel):
+ class CYCLES_WORLD_PT_ambient_occlusion(CyclesButtonsPanel, Panel):
      bl_label = "Ambient Occlusion"
      bl_context = "world"
  
          row.prop(light, "distance", text="Distance")
  
  
- class CyclesWorld_PT_mist(CyclesButtonsPanel, Panel):
+ class CYCLES_WORLD_PT_mist(CyclesButtonsPanel, Panel):
      bl_label = "Mist Pass"
      bl_context = "world"
      bl_options = {'DEFAULT_CLOSED'}
          layout.prop(world.mist_settings, "falloff")
  
  
- class CyclesWorld_PT_ray_visibility(CyclesButtonsPanel, Panel):
+ class CYCLES_WORLD_PT_ray_visibility(CyclesButtonsPanel, Panel):
      bl_label = "Ray Visibility"
      bl_context = "world"
      bl_options = {'DEFAULT_CLOSED'}
          flow.prop(visibility, "scatter")
  
  
- class CyclesWorld_PT_settings(CyclesButtonsPanel, Panel):
+ class CYCLES_WORLD_PT_settings(CyclesButtonsPanel, Panel):
      bl_label = "Settings"
      bl_context = "world"
      bl_options = {'DEFAULT_CLOSED'}
          col.prop(cworld, "homogeneous_volume", text="Homogeneous")
  
  
- class CyclesMaterial_PT_preview(CyclesButtonsPanel, Panel):
+ class CYCLES_MATERIAL_PT_preview(CyclesButtonsPanel, Panel):
      bl_label = "Preview"
      bl_context = "material"
      bl_options = {'DEFAULT_CLOSED'}
          self.layout.template_preview(context.material)
  
  
- class CyclesMaterial_PT_surface(CyclesButtonsPanel, Panel):
+ class CYCLES_MATERIAL_PT_surface(CyclesButtonsPanel, Panel):
      bl_label = "Surface"
      bl_context = "material"
  
          layout = self.layout
  
          mat = context.material
 -        if not panel_node_draw(layout, mat, 'OUTPUT_MATERIAL', 'Surface'):
 +        if not panel_node_draw(layout, mat, ('OUTPUT_MATERIAL', 'OUTPUT_EEVEE_MATERIAL'), 'Surface'):
              layout.prop(mat, "diffuse_color")
  
  
- class CyclesMaterial_PT_volume(CyclesButtonsPanel, Panel):
+ class CYCLES_MATERIAL_PT_volume(CyclesButtonsPanel, Panel):
      bl_label = "Volume"
      bl_context = "material"
      bl_options = {'DEFAULT_CLOSED'}
          mat = context.material
          # cmat = mat.cycles
  
 -        panel_node_draw(layout, mat, 'OUTPUT_MATERIAL', 'Volume')
 +        panel_node_draw(layout, mat, ('OUTPUT_MATERIAL', 'OUTPUT_EEVEE_MATERIAL'), 'Volume')
  
  
- class CyclesMaterial_PT_displacement(CyclesButtonsPanel, Panel):
+ class CYCLES_MATERIAL_PT_displacement(CyclesButtonsPanel, Panel):
      bl_label = "Displacement"
      bl_context = "material"
  
          layout = self.layout
  
          mat = context.material
 -        panel_node_draw(layout, mat, 'OUTPUT_MATERIAL', 'Displacement')
 +        panel_node_draw(layout, mat, ('OUTPUT_MATERIAL', 'OUTPUT_EEVEE_MATERIAL'), 'Displacement')
  
  
- class CyclesMaterial_PT_settings(CyclesButtonsPanel, Panel):
+ class CYCLES_MATERIAL_PT_settings(CyclesButtonsPanel, Panel):
      bl_label = "Settings"
      bl_context = "material"
      bl_options = {'DEFAULT_CLOSED'}
          col.prop(mat, "pass_index")
  
  
- class CyclesTexture_PT_context(CyclesButtonsPanel, Panel):
+ class CYCLES_TEXTURE_PT_context(CyclesButtonsPanel, Panel):
      bl_label = ""
      bl_context = "texture"
      bl_options = {'HIDE_HEADER'}
                  split.prop(tex, "type", text="")
  
  
- class CyclesTexture_PT_node(CyclesButtonsPanel, Panel):
+ class CYCLES_TEXTURE_PT_node(CyclesButtonsPanel, Panel):
      bl_label = "Node"
      bl_context = "texture"
  
          layout.template_node_view(ntree, node, None)
  
  
- class CyclesTexture_PT_mapping(CyclesButtonsPanel, Panel):
+ class CYCLES_TEXTURE_PT_mapping(CyclesButtonsPanel, Panel):
      bl_label = "Mapping"
      bl_context = "texture"
  
          row.prop(mapping, "mapping_z", text="")
  
  
- class CyclesTexture_PT_colors(CyclesButtonsPanel, Panel):
+ class CYCLES_TEXTURE_PT_colors(CyclesButtonsPanel, Panel):
      bl_label = "Color"
      bl_context = "texture"
      bl_options = {'DEFAULT_CLOSED'}
              layout.template_color_ramp(mapping, "color_ramp", expand=True)
  
  
- class CyclesParticle_PT_textures(CyclesButtonsPanel, Panel):
+ class CYCLES_PARTICLE_PT_textures(CyclesButtonsPanel, Panel):
      bl_label = "Textures"
      bl_context = "particle"
      bl_options = {'DEFAULT_CLOSED'}
              layout.template_ID(slot, "texture", new="texture.new")
  
  
- class CyclesRender_PT_bake(CyclesButtonsPanel, Panel):
+ class CYCLES_RENDER_PT_bake(CyclesButtonsPanel, Panel):
      bl_label = "Bake"
      bl_context = "render"
      bl_options = {'DEFAULT_CLOSED'}
              sub.prop(cbk, "cage_extrusion", text="Ray Distance")
  
  
- class CyclesRender_PT_debug(CyclesButtonsPanel, Panel):
+ class CYCLES_RENDER_PT_debug(CyclesButtonsPanel, Panel):
      bl_label = "Debug"
      bl_context = "render"
      bl_options = {'DEFAULT_CLOSED'}
          col.prop(cscene, "debug_bvh_type")
  
  
- class CyclesParticle_PT_CurveSettings(CyclesButtonsPanel, Panel):
+ class CYCLES_PARTICLE_PT_curve_settings(CyclesButtonsPanel, Panel):
      bl_label = "Cycles Hair Settings"
      bl_context = "particle"
  
          row.prop(cpsys, "use_closetip", text="Close tip")
  
  
- class CyclesScene_PT_simplify(CyclesButtonsPanel, Panel):
+ class CYCLES_SCENE_PT_simplify(CyclesButtonsPanel, Panel):
      bl_label = "Simplify"
      bl_context = "scene"
      COMPAT_ENGINES = {'CYCLES'}
          row.prop(rd, "simplify_subdivision", text="Viewport")
          row.prop(rd, "simplify_subdivision_render", text="Render")
  
 +
          col = layout.column(align=True)
          col.label(text="Child Particles")
          row = col.row(align=True)
@@@ -1714,8 -1733,11 +1714,8 @@@ def draw_pause(self, context)
      if scene.render.engine == "CYCLES":
          view = context.space_data
  
 -        if view.viewport_shade == 'RENDERED':
 -            cscene = scene.cycles
 -            layername = scene.render.layers.active.name
 -            layout.prop(cscene, "preview_pause", icon="PAUSE", text="")
 -            layout.prop(cscene, "preview_active_layer", icon="RENDERLAYERS", text=layername)
 +        cscene = scene.cycles
 +        layout.prop(cscene, "preview_pause", icon="PAUSE", text="")
  
  
  def get_panels():
  classes = (
      CYCLES_MT_sampling_presets,
      CYCLES_MT_integrator_presets,
-     CyclesRender_PT_sampling,
-     CyclesRender_PT_geometry,
-     CyclesRender_PT_light_paths,
-     CyclesRender_PT_motion_blur,
-     CyclesRender_PT_film,
-     CyclesRender_PT_performance,
-     CyclesRender_PT_layer_options,
-     CyclesRender_PT_layer_passes,
-     CyclesRender_PT_views,
-     CyclesRender_PT_denoising,
-     Cycles_PT_post_processing,
-     CyclesCamera_PT_dof,
-     Cycles_PT_context_material,
-     CyclesObject_PT_motion_blur,
-     CyclesObject_PT_cycles_settings,
+     CYCLES_RENDER_PT_sampling,
+     CYCLES_RENDER_PT_geometry,
+     CYCLES_RENDER_PT_light_paths,
+     CYCLES_RENDER_PT_motion_blur,
+     CYCLES_RENDER_PT_film,
+     CYCLES_RENDER_PT_performance,
+     CYCLES_RENDER_PT_layer_options,
+     CYCLES_RENDER_PT_layer_passes,
+     CYCLES_RENDER_PT_views,
+     CYCLES_RENDER_PT_denoising,
+     CYCLES_PT_post_processing,
+     CYCLES_CAMERA_PT_dof,
+     CYCLES_PT_context_material,
+     CYCLES_OBJECT_PT_motion_blur,
+     CYCLES_OBJECT_PT_cycles_settings,
      CYCLES_OT_use_shading_nodes,
-     CyclesLamp_PT_preview,
-     CyclesLamp_PT_lamp,
-     CyclesLamp_PT_nodes,
-     CyclesLamp_PT_spot,
-     CyclesWorld_PT_preview,
-     CyclesWorld_PT_surface,
-     CyclesWorld_PT_volume,
-     CyclesWorld_PT_ambient_occlusion,
-     CyclesWorld_PT_mist,
-     CyclesWorld_PT_ray_visibility,
-     CyclesWorld_PT_settings,
-     CyclesMaterial_PT_preview,
-     CyclesMaterial_PT_surface,
-     CyclesMaterial_PT_volume,
-     CyclesMaterial_PT_displacement,
-     CyclesMaterial_PT_settings,
-     CyclesTexture_PT_context,
-     CyclesTexture_PT_node,
-     CyclesTexture_PT_mapping,
-     CyclesTexture_PT_colors,
-     CyclesParticle_PT_textures,
-     CyclesRender_PT_bake,
-     CyclesRender_PT_debug,
-     CyclesParticle_PT_CurveSettings,
-     CyclesScene_PT_simplify,
+     CYCLES_LAMP_PT_preview,
+     CYCLES_LAMP_PT_lamp,
+     CYCLES_LAMP_PT_nodes,
+     CYCLES_LAMP_PT_spot,
+     CYCLES_WORLD_PT_preview,
+     CYCLES_WORLD_PT_surface,
+     CYCLES_WORLD_PT_volume,
+     CYCLES_WORLD_PT_ambient_occlusion,
+     CYCLES_WORLD_PT_mist,
+     CYCLES_WORLD_PT_ray_visibility,
+     CYCLES_WORLD_PT_settings,
+     CYCLES_MATERIAL_PT_preview,
+     CYCLES_MATERIAL_PT_surface,
+     CYCLES_MATERIAL_PT_volume,
+     CYCLES_MATERIAL_PT_displacement,
+     CYCLES_MATERIAL_PT_settings,
+     CYCLES_TEXTURE_PT_context,
+     CYCLES_TEXTURE_PT_node,
+     CYCLES_TEXTURE_PT_mapping,
+     CYCLES_TEXTURE_PT_colors,
+     CYCLES_PARTICLE_PT_textures,
+     CYCLES_RENDER_PT_bake,
+     CYCLES_RENDER_PT_debug,
+     CYCLES_PARTICLE_PT_curve_settings,
+     CYCLES_SCENE_PT_simplify,
  )
  
  
index 622483f04d68209889515a6f0effeb7a869c5011,bfa1e7cef9356ad5be9e5eb0035dd61a51cf4120..114ded9b0c0a6e9c33fb7d172c813ba4d4e9287c
@@@ -54,8 -54,6 +54,8 @@@
  #include "BKE_main.h"
  #include "BKE_report.h"
  
 +#include "DEG_depsgraph.h"
 +
  #include "RNA_access.h"
  #include "RNA_define.h"
  #include "RNA_enum_types.h"
@@@ -64,6 -62,7 +64,6 @@@
  
  /* flush updates */
  #include "DNA_object_types.h"
 -#include "BKE_depsgraph.h"
  #include "WM_types.h"
  
  #include "rna_internal.h"
@@@ -561,7 -560,7 +561,7 @@@ const char *RNA_struct_translation_cont
        return type->translation_context;
  }
  
 -PropertyRNA *RNA_struct_name_property(StructRNA *type)
 +PropertyRNA *RNA_struct_name_property(const StructRNA *type)
  {
        return type->nameproperty;
  }
@@@ -576,22 -575,6 +576,22 @@@ StructRNA *RNA_struct_base(StructRNA *t
        return type->base;
  }
  
 +/**
 + * Use to find the subtype directly below a base-type.
 + *
 + * So if type were `RNA_SpotLamp`, `RNA_struct_base_of(type, &RNA_ID)` would return `&RNA_Lamp`.
 + */
 +const StructRNA *RNA_struct_base_child_of(const StructRNA *type, const StructRNA *parent_type)
 +{
 +      while (type) {
 +              if (type->base == parent_type) {
 +                      return type;
 +              }
 +              type = type->base;
 +      }
 +      return NULL;
 +}
 +
  bool RNA_struct_is_ID(const StructRNA *type)
  {
        return (type->flag & STRUCT_ID) != 0;
@@@ -872,9 -855,17 +872,17 @@@ bool RNA_struct_bl_idname_ok_or_report(
        const int len_sep = strlen(sep);
        const int len_id = strlen(identifier);
        const char *p = strstr(identifier, sep);
+       /* TODO: make error, for now warning until add-ons update. */
+ #if 1
+       const int report_level = RPT_WARNING;
+       const bool failure = true;
+ #else
+       const int report_level = RPT_ERROR;
+       const bool failure = false;
+ #endif
        if (p == NULL || p == identifier || p + len_sep >= identifier + len_id) {
-               BKE_reportf(reports, RPT_ERROR, "'%s' doesn't contain '%s' with prefix & suffix", identifier, sep);
-               return false;
+               BKE_reportf(reports, report_level, "'%s' doesn't contain '%s' with prefix & suffix", identifier, sep);
+               return failure;
        }
  
        const char *c, *start, *end, *last;
                     ((c != start) && (*c >= '0' && *c <= '9')) ||
                     ((c != start) && (c != last) && (*c == '_'))) == 0)
                {
-                       BKE_reportf(reports, RPT_ERROR, "'%s' doesn't have upper case alpha-numeric prefix", identifier);
-                       return false;
+                       BKE_reportf(reports, report_level, "'%s' doesn't have upper case alpha-numeric prefix", identifier);
+                       return failure;
                }
        }
  
                     (*c >= '0' && *c <= '9') ||
                     ((c != start) && (c != last) && (*c == '_'))) == 0)
                {
-                       BKE_reportf(reports, RPT_ERROR, "'%s' doesn't have an alpha-numeric suffix", identifier);
-                       return false;
+                       BKE_reportf(reports, report_level, "'%s' doesn't have an alpha-numeric suffix", identifier);
+                       return failure;
                }
        }
        return true;
@@@ -1891,7 -1882,7 +1899,7 @@@ static void rna_property_update(bContex
                         * parts of the code that need it still, so we have this exception */
                        if (prop->flag & PROP_CONTEXT_UPDATE) {
                                if (C) {
 -                                      if (prop->flag & PROP_CONTEXT_PROPERTY_UPDATE) {
 +                                      if ((prop->flag & PROP_CONTEXT_PROPERTY_UPDATE) == PROP_CONTEXT_PROPERTY_UPDATE) {
                                                ((ContextPropUpdateFunc)prop->update)(C, ptr, prop);
                                        }
                                        else {
        if (!is_rna || (prop->flag & PROP_IDPROPERTY)) {
                /* WARNING! This is so property drivers update the display!
                 * not especially nice  */
 -              DAG_id_tag_update(ptr->id.data, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
 +              DEG_id_tag_update(ptr->id.data, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
                WM_main_add_notifier(NC_WINDOW, NULL);
                /* Not nice as well, but the only way to make sure material preview
                 * is updated with custom nodes.
@@@ -2857,9 -2848,6 +2865,9 @@@ char *RNA_property_string_get_alloc(Poi
        int length;
  
        BLI_assert(RNA_property_type(prop) == PROP_STRING);
 +      if (!ptr->data) {
 +              return NULL;
 +      }
  
        length = RNA_property_string_length(ptr, prop);
  
@@@ -6795,13 -6783,6 +6803,13 @@@ int RNA_function_call_direct_va_lookup(
        return 0;
  }
  
 +const char *RNA_translate_ui_text(
 +        const char *text, const char *text_ctxt, StructRNA *type, PropertyRNA *prop,
 +        int translate)
 +{
 +      return rna_translate_ui_text(text, text_ctxt, type, prop, translate);
 +}
 +
  bool RNA_property_reset(PointerRNA *ptr, PropertyRNA *prop, int index)
  {
        int len;