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:
authorBastien Montagne <montagne29@wanadoo.fr>2019-08-22 17:00:59 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-08-22 17:07:36 +0300
commite6f3d8b3e1158ebdc89ceae1de5ce7bc5c420f51 (patch)
tree197389a2268b472a19119fa3faf1f9ab1223240a /source/blender/editors/animation/drivers.c
parenteae9b86297876d2172681e880fe2bcc8450a01ed (diff)
Revert "Fix T68971: Copy As New Driver from Material node creates a bad reference."
This reverts commits 54fd8176d7e91, 4c5becb6b1 and 8f578150e. Those kind of commits must be reviewed and approved by project owners. That one: * Broke Collada building by not properly updating all calls to modified function. * Broke *whole* ID management by not properly updating library_query.c. And in general, I am strongly against backward ID pointers, those are *always* a serious PITA for ID management. Sometimes they cannot be avoided, but in general other ways to get that kind of info should be investigated first.
Diffstat (limited to 'source/blender/editors/animation/drivers.c')
-rw-r--r--source/blender/editors/animation/drivers.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c
index bf2056a7ec6..e341a16378c 100644
--- a/source/blender/editors/animation/drivers.c
+++ b/source/blender/editors/animation/drivers.c
@@ -846,36 +846,6 @@ bool ANIM_driver_vars_paste(ReportList *reports, FCurve *fcu, bool replace)
/* -------------------------------------------------- */
-/** Compute an ID pointer and path to property valid for use in a driver.
- * Corrects for ID references that are not independent (e.g. material NodeTree). */
-bool ANIM_get_target_ID_and_path_to_property(
- PointerRNA *ptr, PropertyRNA *prop, int index, ID **r_id, char **r_path)
-{
- int dim = RNA_property_array_dimension(ptr, prop, NULL);
- char *path = RNA_path_from_ID_to_property_index(ptr, prop, dim, index);
- ID *id = ptr->id.data;
-
- if (!path) {
- return false;
- }
-
- if (GS(id->name) == ID_NT) {
- bNodeTree *node_tree = (bNodeTree *)id;
-
- if (node_tree->owner) {
- id = node_tree->owner;
-
- char *new_path = BLI_sprintfN("node_tree%s%s", path[0] == '[' ? "" : ".", path);
- MEM_freeN(path);
- path = new_path;
- }
- }
-
- *r_id = id;
- *r_path = path;
- return true;
-}
-
/* Create a driver & variable that reads the specified property,
* and store it in the buffers for Paste Driver and Paste Variables. */
void ANIM_copy_as_driver(struct ID *target_id, const char *target_path, const char *var_name)