diff options
author | Bastien Montagne <mont29> | 2022-02-03 19:57:40 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-02-04 11:30:44 +0300 |
commit | e9fc25835f2091cf6533d92379a31c0656b4aafb (patch) | |
tree | 90b4bbfb87172abc08483c91200809d9a2545c8c /source/blender/makesrna/intern | |
parent | 5a4eadc2e7cd607c83f7039609d8a27495efb20a (diff) |
Remove internal proxy code, and deprecate related DNA data.
Part of T91671.
Not much else to say, this is mainly a massive deletion of code.
Note that a few cleanups possible after this proxy removal were kept out
of this commit to try to reduce a bit its size.
Reviewed By: sergey, brecht
Maniphest Tasks: T91671
Differential Revision: https://developer.blender.org/D13995
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_ID.c | 12 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_armature.c | 11 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_constraint.c | 8 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 13 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_pose.c | 4 |
5 files changed, 6 insertions, 42 deletions
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index 1f3dd34a0a7..8fc634fc087 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -949,9 +949,9 @@ static void rna_ID_user_remap(ID *id, Main *bmain, ID *new_id) } } -static struct ID *rna_ID_make_local(struct ID *self, Main *bmain, bool clear_proxy) +static struct ID *rna_ID_make_local(struct ID *self, Main *bmain, bool UNUSED(clear_proxy)) { - BKE_lib_id_make_local(bmain, self, clear_proxy ? 0 : LIB_ID_MAKELOCAL_OBJECT_NO_PROXY_CLEARING); + BKE_lib_id_make_local(bmain, self, 0); ID *ret_id = self->newid ? self->newid : self; BKE_id_newptr_and_tag_clear(self); @@ -2089,13 +2089,7 @@ static void rna_def_ID(BlenderRNA *brna) "Make this datablock local, return local one " "(may be a copy of the original, in case it is also indirectly used)"); RNA_def_function_flag(func, FUNC_USE_MAIN); - parm = RNA_def_boolean( - func, - "clear_proxy", - true, - "", - "Whether to clear proxies (the default behavior, " - "note that if object has to be duplicated to be made local, proxies are always cleared)"); + parm = RNA_def_boolean(func, "clear_proxy", true, "", "Deprecated, has no effect"); parm = RNA_def_pointer(func, "id", "ID", "", "This ID, or the new ID if it was copied"); RNA_def_function_return(func, parm); diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c index 28e50e80f32..b22d3654431 100644 --- a/source/blender/makesrna/intern/rna_armature.c +++ b/source/blender/makesrna/intern/rna_armature.c @@ -151,18 +151,9 @@ static void rna_Armature_edit_bone_remove(bArmature *arm, RNA_POINTER_INVALIDATE(ebone_ptr); } -static void rna_Armature_update_layers(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) +static void rna_Armature_update_layers(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { bArmature *arm = (bArmature *)ptr->owner_id; - Object *ob; - - /* proxy lib exception, store it here so we can restore layers on file - * load, since it would otherwise get lost due to being linked data */ - for (ob = bmain->objects.first; ob; ob = ob->id.next) { - if (ob->data == arm && ob->pose) { - ob->pose->proxy_layer = arm->layer; - } - } DEG_id_tag_update(&arm->id, ID_RECALC_COPY_ON_WRITE); WM_main_add_notifier(NC_GEOM | ND_DATA, arm); diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index 0c993660f39..e3a06c44eee 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -3543,14 +3543,6 @@ void RNA_def_constraint(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_ACTIVE); RNA_def_property_ui_text(prop, "Active", "Constraint is the one being edited"); - prop = RNA_def_property(srna, "is_proxy_local", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_PROXY_LOCAL); - RNA_def_property_ui_text( - prop, - "Proxy Local", - "Constraint was added in this proxy instance (i.e. did not belong to source Armature)"); - /* values */ prop = RNA_def_property(srna, "influence", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "enforce"); diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index a098693459b..2bb341e00fb 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -3150,19 +3150,6 @@ static void rna_def_object(BlenderRNA *brna) "Align to Vertex Normal is enabled)"); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update"); - /* proxy */ - prop = RNA_def_property(srna, "proxy", PROP_POINTER, PROP_NONE); - RNA_def_property_override_flag(prop, PROPOVERRIDE_NO_COMPARISON); - RNA_def_property_override_clear_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); - RNA_def_property_ui_text(prop, "Proxy", "Library object this proxy object controls"); - - prop = RNA_def_property(srna, "proxy_collection", PROP_POINTER, PROP_NONE); - RNA_def_property_pointer_sdna(prop, NULL, "proxy_group"); - RNA_def_property_override_flag(prop, PROPOVERRIDE_NO_COMPARISON); - RNA_def_property_override_clear_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); - RNA_def_property_ui_text( - prop, "Proxy Collection", "Library collection duplicator object this proxy object controls"); - /* materials */ prop = RNA_def_property(srna, "material_slots", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_type(prop, "MaterialSlot"); diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index 76bfea00a79..7714e4d1e59 100644 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -140,7 +140,7 @@ static char *rna_PoseBone_path(PointerRNA *ptr) static bool rna_bone_group_poll(Object *ob, ReportList *reports) { - if ((ob->proxy != NULL) || (ob->proxy_group != NULL) || ID_IS_OVERRIDE_LIBRARY(ob)) { + if (ID_IS_OVERRIDE_LIBRARY(ob)) { BKE_report(reports, RPT_ERROR, "Cannot edit bone groups for proxies or library overrides"); return false; } @@ -717,7 +717,7 @@ static int rna_PoseChannel_proxy_editable(PointerRNA *ptr, const char **r_info) bArmature *arm = ob->data; bPoseChannel *pchan = (bPoseChannel *)ptr->data; - if (ob->proxy && pchan->bone && (pchan->bone->layer & arm->layer_protected)) { + if (false && pchan->bone && (pchan->bone->layer & arm->layer_protected)) { *r_info = "Can't edit property of a proxy on a protected layer"; return 0; } |