diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2017-02-09 16:42:08 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2017-02-10 13:52:33 +0300 |
commit | ae6e9401abb7cf147367aaa84d04b186e6805d7c (patch) | |
tree | 9357a42652090136df567058476fd6824d688643 /source/blender/alembic/intern/abc_util.cc | |
parent | 48a6aa3499566e17cbdde4246832bb79b02039d0 (diff) |
Alembic: using Base* instead of Object* to get selection
I also added some remarks & TODOs to indicate work in progress.
Diffstat (limited to 'source/blender/alembic/intern/abc_util.cc')
-rw-r--r-- | source/blender/alembic/intern/abc_util.cc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/alembic/intern/abc_util.cc b/source/blender/alembic/intern/abc_util.cc index 73aeca1bfdf..bb375eb9561 100644 --- a/source/blender/alembic/intern/abc_util.cc +++ b/source/blender/alembic/intern/abc_util.cc @@ -35,6 +35,7 @@ extern "C" { #include "DNA_object_types.h" +#include "DNA_layer_types.h" #include "BLI_math.h" } @@ -58,6 +59,16 @@ std::string get_id_name(ID *id) return name; } + +/** + * @brief get_object_dag_path_name returns the name under which the object + * will be exported in the Alembic file. It is of the form + * "[../grandparent/]parent/object" if dupli_parent is NULL, or + * "dupli_parent/[../grandparent/]parent/object" otherwise. + * @param ob + * @param dupli_parent + * @return + */ std::string get_object_dag_path_name(Object *ob, Object *dupli_parent) { std::string name = get_id_name(ob); @@ -76,9 +87,9 @@ std::string get_object_dag_path_name(Object *ob, Object *dupli_parent) return name; } -bool object_selected(Object *ob) +bool object_selected(const Base * const ob_base) { - return ob->flag & SELECT; + return ob_base->flag & SELECT; } Imath::M44d convert_matrix(float mat[4][4]) |