[Bf-blender-cvs] [88b8820] depsgraph_refactor: Depsgraph: Get rid of depsgraph_util_rna.h

Sergey Sharybin noreply at git.blender.org
Fri Dec 12 10:16:51 CET 2014


Commit: 88b8820cac509a3ccbeca1ac48a3a2cc6a91dcb4
Author: Sergey Sharybin
Date:   Fri Dec 12 13:47:19 2014 +0500
Branches: depsgraph_refactor
https://developer.blender.org/rB88b8820cac509a3ccbeca1ac48a3a2cc6a91dcb4

Depsgraph: Get rid of depsgraph_util_rna.h

It only had two functions, half of which was never used, other half
was used only once. In any case, there's no actual reason to wrap
our RNA_access functions with just one more layer of abstraction.

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

M	source/blender/depsgraph/CMakeLists.txt
M	source/blender/depsgraph/intern/depsgraph_build.cpp
M	source/blender/depsgraph/intern/depsgraph_build.h
M	source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
M	source/blender/depsgraph/intern/depsgraph_build_relations.cpp
D	source/blender/depsgraph/util/depsgraph_util_rna.h

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

diff --git a/source/blender/depsgraph/CMakeLists.txt b/source/blender/depsgraph/CMakeLists.txt
index 3d0c9aa..311f8f3 100644
--- a/source/blender/depsgraph/CMakeLists.txt
+++ b/source/blender/depsgraph/CMakeLists.txt
@@ -76,7 +76,6 @@ set(SRC
 	util/depsgraph_util_hash.h
 	util/depsgraph_util_id.h
 	util/depsgraph_util_map.h
-	util/depsgraph_util_rna.h
 	util/depsgraph_util_set.h
 	util/depsgraph_util_task.h
 	util/depsgraph_util_task.cpp
diff --git a/source/blender/depsgraph/intern/depsgraph_build.cpp b/source/blender/depsgraph/intern/depsgraph_build.cpp
index ab6d534..3560ad8 100644
--- a/source/blender/depsgraph/intern/depsgraph_build.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_build.cpp
@@ -97,8 +97,6 @@ extern "C" {
 #include "depsgraph_eval.h"
 #include "depsgraph_intern.h"
 
-#include "depsgraph_util_rna.h"
-
 #include "stubs.h" // XXX: REMOVE THIS INCLUDE ONCE DEPSGRAPH REFACTOR PROJECT IS DONE!!!
 
 /* ************************************************* */
@@ -302,7 +300,8 @@ RNAPathKey::RNAPathKey(ID *id, const string &path) :
     id(id)
 {
 	/* create ID pointer for root of path lookup */
-	PointerRNA id_ptr = make_rna_id_pointer(id);
+	PointerRNA id_ptr;
+	RNA_id_pointer_create(id, &id_ptr);
 	/* try to resolve path... */
 	if (!RNA_path_resolve(&id_ptr, path.c_str(), &this->ptr, &this->prop)) {
 		this->ptr = PointerRNA_NULL;
diff --git a/source/blender/depsgraph/intern/depsgraph_build.h b/source/blender/depsgraph/intern/depsgraph_build.h
index fcf9297..63d33c8 100644
--- a/source/blender/depsgraph/intern/depsgraph_build.h
+++ b/source/blender/depsgraph/intern/depsgraph_build.h
@@ -34,7 +34,6 @@
 #include "depsgraph_types.h"
 
 #include "depsgraph_util_id.h"
-#include "depsgraph_util_rna.h"
 
 struct bConstraint;
 struct ListBase;
diff --git a/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp b/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
index a4a1b78..388e71a 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
@@ -96,8 +96,6 @@ extern "C" {
 #include "depsgraph_eval.h"
 #include "depsgraph_intern.h"
 
-#include "depsgraph_util_rna.h"
-
 #include "stubs.h" // XXX: REMOVE THIS INCLUDE ONCE DEPSGRAPH REFACTOR PROJECT IS DONE!!!
 
 /* ************************************************* */
diff --git a/source/blender/depsgraph/intern/depsgraph_build_relations.cpp b/source/blender/depsgraph/intern/depsgraph_build_relations.cpp
index df0528a..9ce5969 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_relations.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_build_relations.cpp
@@ -96,8 +96,6 @@ extern "C" {
 #include "depsgraph_eval.h"
 #include "depsgraph_intern.h"
 
-#include "depsgraph_util_rna.h"
-
 #include "stubs.h" // XXX: REMOVE THIS INCLUDE ONCE DEPSGRAPH REFACTOR PROJECT IS DONE!!!
 
 namespace {
diff --git a/source/blender/depsgraph/util/depsgraph_util_rna.h b/source/blender/depsgraph/util/depsgraph_util_rna.h
deleted file mode 100644
index b52b20b..0000000
--- a/source/blender/depsgraph/util/depsgraph_util_rna.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2014 Blender Foundation.
- * All rights reserved.
- *
- * Original Author: Lukas Toenne
- * Contributor(s): None yet
- */
-
-#ifndef __DEPSGRAPH_UTIL_RNA_H__
-#define __DEPSGRAPH_UTIL_RNA_H__
-
-extern "C" {
-#include "BLI_utildefines.h"
-
-#include "RNA_access.h"
-}
-
-//struct IDPtr;
-
-/* Utility functions for creating PointerRNA inline */
-
-BLI_INLINE PointerRNA make_rna_pointer(ID *id, StructRNA *type, void *data)
-{
-	PointerRNA ptr;
-	RNA_pointer_create(id, type, data, &ptr);
-	return ptr;
-}
-
-BLI_INLINE PointerRNA make_rna_id_pointer(ID *id)
-{
-	PointerRNA ptr;
-	RNA_id_pointer_create(id, &ptr);
-	return ptr;
-}
-
-#endif /* __DEPSGRAPH_UTIL_RNA_H__ */




More information about the Bf-blender-cvs mailing list