Commit: 986af0801490f0666c96435d33182027f8c11a82
Author: Sybren A. Stüvel
Date:   Tue Nov 26 12:51:59 2019 +0100
Branches: temp-sybren-usd-patch-02
https://developer.blender.org/rB986af0801490f0666c96435d33182027f8c11a82

USD: clarification of NULL-safety of `get_object_(data_)name`

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

M       source/blender/usd/intern/abstract_hierarchy_iterator.h

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

diff --git a/source/blender/usd/intern/abstract_hierarchy_iterator.h 
b/source/blender/usd/intern/abstract_hierarchy_iterator.h
index f1152230219..438b5b571be 100644
--- a/source/blender/usd/intern/abstract_hierarchy_iterator.h
+++ b/source/blender/usd/intern/abstract_hierarchy_iterator.h
@@ -159,7 +159,8 @@ class AbstractHierarchyIterator {
   virtual std::string make_valid_name(const std::string &name) const;
 
   /* Return the name of this ID datablock that is valid for the exported file 
format. Overriding is
-   * only necessary if make_valid_name(id->name+2) is not suitable for the 
exported file format. */
+   * only necessary if make_valid_name(id->name+2) is not suitable for the 
exported file format.
+   * NULL-safe: when `id == nullptr` this returns an empty string. */
   virtual std::string get_id_name(const ID *id) const;
 
   /* Given a HierarchyContext of some Object *, return an export path that is 
valid for its
@@ -189,6 +190,7 @@ class AbstractHierarchyIterator {
   void make_writer_object_data(const HierarchyContext *context);
   void make_writers_particle_systems(const HierarchyContext *context);
 
+  /* Convenience wrappers around get_id_name(). */
   std::string get_object_name(const Object *object) const;
   std::string get_object_data_name(const Object *object) const;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to