[Bf-blender-cvs] [7383c6c309c] tracking_tools: Merge branch 'master' into tracking_tools

Sergey Sharybin noreply at git.blender.org
Fri Oct 7 14:58:53 CEST 2022


Commit: 7383c6c309ca7c474253b7e50cc5042e23e2eb40
Author: Sergey Sharybin
Date:   Fri Oct 7 14:52:28 2022 +0200
Branches: tracking_tools
https://developer.blender.org/rB7383c6c309ca7c474253b7e50cc5042e23e2eb40

Merge branch 'master' into tracking_tools

===================================================================



===================================================================

diff --cc release/scripts/startup/bl_ui/properties_mask_common.py
index dcf0241f417,9dc1ef3cc4b..2cc1ce650d9
--- a/release/scripts/startup/bl_ui/properties_mask_common.py
+++ b/release/scripts/startup/bl_ui/properties_mask_common.py
@@@ -239,8 -242,69 +242,11 @@@ class MASK_PT_display
          sub = row.row()
          sub.active = space_data.show_mask_overlay
          sub.prop(space_data, "mask_overlay_mode", text="")
+         row = layout.row()
+         row.active = (space_data.mask_overlay_mode in ['COMBINED'] and space_data.show_mask_overlay)
+         row.prop(space_data, "blend_factor", text="Blending Factor")
  
  
 -class MASK_PT_transforms:
 -    # subclasses must define...
 -    # ~ bl_space_type = 'CLIP_EDITOR'
 -    # ~ bl_region_type = 'TOOLS'
 -    bl_label = "Transforms"
 -    bl_category = "Mask"
 -
 -    @classmethod
 -    def poll(cls, context):
 -        space_data = context.space_data
 -        return space_data.mask and space_data.mode == 'MASK'
 -
 -    def draw(self, _context):
 -        layout = self.layout
 -
 -        col = layout.column(align=True)
 -        col.label(text="Transform:")
 -        col.operator("transform.translate")
 -        col.operator("transform.rotate")
 -        col.operator("transform.resize", text="Scale")
 -        col.operator("transform.transform", text="Scale Feather").mode = 'MASK_SHRINKFATTEN'
 -
 -
 -class MASK_PT_tools:
 -    bl_label = "Mask Tools"
 -    bl_category = "Mask"
 -
 -    @classmethod
 -    def poll(cls, context):
 -        space_data = context.space_data
 -        return space_data.mask and space_data.mode == 'MASK'
 -
 -    def draw(self, _context):
 -        layout = self.layout
 -
 -        col = layout.column(align=True)
 -        col.label(text="Spline:")
 -        col.operator("mask.delete")
 -        col.operator("mask.cyclic_toggle")
 -        col.operator("mask.switch_direction")
 -        col.operator("mask.handle_type_set").type = 'VECTOR'
 -        col.operator("mask.feather_weight_clear")
 -
 -        col = layout.column(align=True)
 -        col.label(text="Parenting:")
 -        row = col.row(align=True)
 -        row.operator("mask.parent_set", text="Parent")
 -        row.operator("mask.parent_clear", text="Clear")
 -
 -        col = layout.column(align=True)
 -        col.label(text="Animation:")
 -        row = col.row(align=True)
 -        row.operator("mask.shape_key_insert", text="Insert Key")
 -        row.operator("mask.shape_key_clear", text="Clear Key")
 -        col.operator("mask.shape_key_feather_reset", text="Reset Feather Animation")
 -        col.operator("mask.shape_key_rekey", text="Re-Key Shape Points")
 -
 -
  class MASK_MT_mask(Menu):
      bl_label = "Mask"
  
diff --cc release/scripts/startup/bl_ui/space_clip.py
index 83875f12998,c337e8018e6..6477d36b845
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@@ -837,20 -764,13 +838,20 @@@ class CLIP_PT_plane_track(CLIP_PT_track
          clip = context.space_data.clip
          active_track = clip.tracking.plane_tracks.active
  
 +        row = layout.row()
 +        col = row.column()
 +
 +        col.separator()
 +        col.operator("clip.create_plane_track")
 +
 +        row = layout.row()
          if not active_track:
 -            layout.active = False
 -            layout.label(text="No active plane track")
 +            row.active = False
 +            row.label(text="No active plane track")
              return
  
-         row.prop(active_track, "name")
-         row.prop(active_track, "use_auto_keying", text="")
+         layout.prop(active_track, "name")
 -        layout.prop(active_track, "use_auto_keying")
++        layout.prop(active_track, "use_auto_keying", text="")
          row = layout.row()
          row.template_ID(
              active_track, "image", new="image.new", open="image.open")
@@@ -1564,9 -1482,21 +1566,13 @@@ class CLIP_MT_track(Menu)
  
          layout.operator("clip.add_marker_move", text="Add Marker")
          layout.operator("clip.detect_features")
 -        layout.operator("clip.create_plane_track")
  
+         layout.separator()
+         layout.operator("clip.new_image_from_plane_marker")
+         layout.operator("clip.update_image_from_plane_marker")
+ 
          layout.separator()
  
 -        layout.operator(
 -            "clip.solve_camera",
 -            text=(
 -                "Solve Camera Motion" if tracking_object.is_camera else
 -                "Solve Object Motion"
 -            ),
 -        )
  
          layout.separator()
  
@@@ -2037,6 -1951,10 +2053,7 @@@ classes = 
      CLIP_MT_select,
      CLIP_MT_select_grouped,
      CLIP_MT_tracking_context_menu,
+     CLIP_MT_plane_track_image_context_menu,
 -    CLIP_PT_camera_presets,
 -    CLIP_PT_track_color_presets,
 -    CLIP_PT_tracking_settings_presets,
      CLIP_MT_stabilize_2d_context_menu,
      CLIP_MT_stabilize_2d_rotation_context_menu,
      CLIP_MT_pivot_pie,
diff --cc source/blender/blenloader/intern/versioning_300.cc
index 00000000000,0584dd6b059..df0dae82474
mode 000000,100644..100644
--- a/source/blender/blenloader/intern/versioning_300.cc
+++ b/source/blender/blenloader/intern/versioning_300.cc
@@@ -1,0 -1,3631 +1,3659 @@@
+ /* SPDX-License-Identifier: GPL-2.0-or-later */
+ 
+ /** \file
+  * \ingroup blenloader
+  */
+ /* allow readfile to use deprecated functionality */
+ #define DNA_DEPRECATED_ALLOW
+ 
+ #include <cstring>
+ 
+ #include "CLG_log.h"
+ 
+ #include "MEM_guardedalloc.h"
+ 
+ #include "BLI_listbase.h"
+ #include "BLI_math_vector.h"
+ #include "BLI_path_util.h"
+ #include "BLI_string.h"
+ #include "BLI_string_utils.h"
+ #include "BLI_utildefines.h"
+ 
+ #include "DNA_anim_types.h"
+ #include "DNA_armature_types.h"
+ #include "DNA_brush_types.h"
+ #include "DNA_collection_types.h"
+ #include "DNA_constraint_types.h"
+ #include "DNA_curve_types.h"
+ #include "DNA_curves_types.h"
+ #include "DNA_genfile.h"
+ #include "DNA_gpencil_modifier_types.h"
+ #include "DNA_lineart_types.h"
+ #include "DNA_listBase.h"
+ #include "DNA_mask_types.h"
+ #include "DNA_material_types.h"
+ #include "DNA_mesh_types.h"
+ #include "DNA_modifier_types.h"
+ #include "DNA_screen_types.h"
+ #include "DNA_space_types.h"
+ #include "DNA_text_types.h"
+ #include "DNA_workspace_types.h"
+ 
+ #include "BKE_action.h"
+ #include "BKE_anim_data.h"
+ #include "BKE_animsys.h"
+ #include "BKE_armature.h"
+ #include "BKE_asset.h"
+ #include "BKE_attribute.h"
+ #include "BKE_collection.h"
+ #include "BKE_colortools.h"
+ #include "BKE_curve.h"
+ #include "BKE_data_transfer.h"
+ #include "BKE_deform.h"
+ #include "BKE_fcurve.h"
+ #include "BKE_fcurve_driver.h"
+ #include "BKE_idprop.h"
+ #include "BKE_image.h"
+ #include "BKE_lib_id.h"
+ #include "BKE_lib_override.h"
+ #include "BKE_main.h"
+ #include "BKE_main_namemap.h"
+ #include "BKE_modifier.h"
+ #include "BKE_node.h"
+ #include "BKE_screen.h"
+ 
+ #include "RNA_access.h"
+ #include "RNA_enum_types.h"
+ #include "RNA_prototypes.h"
+ 
+ #include "BLO_readfile.h"
+ 
+ #include "readfile.h"
+ 
+ #include "SEQ_channels.h"
+ #include "SEQ_iterator.h"
+ #include "SEQ_sequencer.h"
+ #include "SEQ_time.h"
+ 
+ #include "versioning_common.h"
+ 
+ static CLG_LogRef LOG = {"blo.readfile.doversion"};
+ 
+ static IDProperty *idproperty_find_ui_container(IDProperty *idprop_group)
+ {
+   LISTBASE_FOREACH (IDProperty *, prop, &idprop_group->data.group) {
+     if (prop->type == IDP_GROUP && STREQ(prop->name, "_RNA_UI")) {
+       return prop;
+     }
+   }
+   return nullptr;
+ }
+ 
+ static void version_idproperty_move_data_int(IDPropertyUIDataInt *ui_data,
+                                              const IDProperty *prop_ui_data)
+ {
+   IDProperty *min = IDP_GetPropertyFromGroup(prop_ui_data, "min");
+   if (min != nullptr) {
+     ui_data->min = ui_data->soft_min = IDP_coerce_to_int_or_zero(min);
+   }
+   IDProperty *max = IDP_GetPropertyFromGroup(prop_ui_data, "max");
+   if (max != nullptr) {
+     ui_data->max = ui_data->soft_max = IDP_coerce_to_int_or_zero(max);
+   }
+   IDProperty *soft_min = IDP_GetPropertyFromGroup(prop_ui_data, "soft_min");
+   if (soft_min != nullptr) {
+     ui_data->soft_min = IDP_coerce_to_int_or_zero(soft_min);
+     ui_data->soft_min = MIN2(ui_data->soft_min, ui_data->min);
+   }
+   IDProperty *soft_max = IDP_GetPropertyFromGroup(prop_ui_data, "soft_max");
+   if (soft_max != nullptr) {
+     ui_data->soft_max = IDP_coerce_to_int_or_zero(soft_max);
+     ui_data->soft_max = MAX2(ui_data->soft_max, ui_data->max);
+   }
+   IDProperty *step = IDP_GetPropertyFromGroup(prop_ui_data, "step");
+   if (step != nullptr) {
+     ui_data->step = IDP_coerce_to_int_or_zero(soft_max);
+   }
+   IDProperty *default_value = IDP_GetPropertyFromGroup(prop_ui_data, "default");
+   if (default_value != nullptr) {
+     if (default_value->type == IDP_ARRAY) {
+       if (default_value->subtype == IDP_INT) {
+         ui_data->default_array = static_cast<int *>(
+             MEM_malloc_arrayN(default_value->len, sizeof(int), __func__));
+         memcpy(ui_data->default_array, IDP_Array(default_value), sizeof(int) * default_value->len);
+         ui_data->default_array_len = default_value->len;
+       }
+     }
+     else if (default_value->type == IDP_INT) {
+       ui_data->default_value = IDP_coerce_to_int_or_zero(default_value);
+     }
+   }
+ }
+ 
+ static void version_idproperty_move_data_float(IDPropertyUIDataFloat *ui_data,
+                                                const IDProperty *prop_ui_data)
+ {
+   IDProperty *min = IDP_GetPropertyFromGroup(prop_ui_data, "min");
+   if (min != nullptr) {
+     ui_data->min = ui_data->soft_min = IDP_coerce_to_double_or_zero(min);
+   }
+   IDProperty *max = IDP_GetPropertyFromGroup(prop_ui_data, "max");
+   if (max != nullptr) {
+     ui_data->max = ui_data->soft_max = IDP_coerce_to_double_or_zero(max);
+   }
+   IDProperty *soft_min = IDP_GetPropertyFromGroup(prop_ui_data, "soft_min");
+   if (soft_min != nullptr) {
+     ui_data->soft_min = IDP_coerce_to_double_or_zero(soft_min);
+     ui_data->soft_min = MAX2(ui_data->soft_min, ui_data->min);
+   }
+   IDProperty *soft_max = IDP_GetPropertyFromGroup(prop_ui_data, "soft

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list