Skip to content

Commit 1fd38c7

Browse files
committed
Making SceneInterface::visibilityName a reference
1 parent f07a783 commit 1fd38c7

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

include/IECore/SceneInterface.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//////////////////////////////////////////////////////////////////////////
22
//
3-
// Copyright (c) 2013, Image Engine Design Inc. All rights reserved.
3+
// Copyright (c) 2013-2014, Image Engine Design Inc. All rights reserved.
44
//
55
// Redistribution and use in source and binary forms, with or without
66
// modification, are permitted provided that the following conditions are
@@ -93,7 +93,7 @@ class SceneInterface : public RunTimeTyped
9393
/// Utility variable that can be used anytime you want to refer to the root path in the Scene.
9494
static const Path &rootPath;
9595
/// Name of the visibility attribute
96-
static const Name visibilityName;
96+
static const Name &visibilityName;
9797

9898
/// Create an instance of a subclass which is able to open the file found at "path".
9999
/// Files can be opened for Read, Write, or Append depending on the derived classes.

src/IECore/SceneInterface.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//////////////////////////////////////////////////////////////////////////
22
//
3-
// Copyright (c) 2013, Image Engine Design Inc. All rights reserved.
3+
// Copyright (c) 2013-2014, Image Engine Design Inc. All rights reserved.
44
//
55
// Redistribution and use in source and binary forms, with or without
66
// modification, are permitted provided that the following conditions are
@@ -42,7 +42,7 @@ IE_CORE_DEFINERUNTIMETYPEDDESCRIPTION( SceneInterface )
4242

4343
const SceneInterface::Name &SceneInterface::rootName = IndexedIO::rootName;
4444
const SceneInterface::Path &SceneInterface::rootPath = IndexedIO::rootPath;
45-
const SceneInterface::Name SceneInterface::visibilityName( "scene:visible" );
45+
const SceneInterface::Name &SceneInterface::visibilityName( "scene:visible" );
4646

4747
class SceneInterface::CreatorMap : public std::map< std::pair< std::string, IndexedIO::OpenModeFlags >, CreatorFn>
4848
{

src/IECorePython/SceneInterfaceBinding.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//////////////////////////////////////////////////////////////////////////
22
//
3-
// Copyright (c) 2013, Image Engine Design Inc. All rights reserved.
3+
// Copyright (c) 2013-2014, Image Engine Design Inc. All rights reserved.
44
//
55
// Redistribution and use in source and binary forms, with or without
66
// modification, are permitted provided that the following conditions are
@@ -268,7 +268,7 @@ void bindSceneInterface()
268268
.def( "create", SceneInterface::create ).staticmethod( "create" )
269269
.def( "supportedExtensions", supportedExtensions, ( arg("modes") = IndexedIO::Read|IndexedIO::Write|IndexedIO::Append ) ).staticmethod( "supportedExtensions" )
270270

271-
.add_static_property( "visibilityName", make_getter(&SceneInterface::visibilityName, return_value_policy<reference_existing_object>() ) )
271+
.def_readonly("visibilityName", &SceneInterface::visibilityName )
272272
;
273273
}
274274

0 commit comments

Comments
 (0)