HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
HUSD_EditLinkCollections.h
Go to the documentation of this file.
1
/*
2
* Copyright 2019 Side Effects Software Inc.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*
16
*/
17
18
#ifndef __HUSD_EditLinkCollections_h__
19
#define __HUSD_EditLinkCollections_h__
20
21
#include "
HUSD_API.h
"
22
#include "
HUSD_DataHandle.h
"
23
#include <
UT/UT_String.h
>
24
#include <
UT/UT_UniquePtr.h
>
25
26
class
husd_EditLinkCollectionsPrivate;
27
class
HUSD_FindPrims
;
28
class
HUSD_TimeCode
;
29
30
// This class allows edit of links between prims that are defined as
31
// collections, typically with a specific name for the collection that defines
32
// the link.
33
// These are things like light links and shadow links with are collections on
34
// a prim (in their case a prim with the UsdLuxLightAPI schema) that specifies
35
// the geometry prims they are linked to.
36
class
HUSD_API
HUSD_EditLinkCollections
37
{
38
public
:
39
enum
LinkType
40
{
41
LightLink
,
42
ShadowLink
,
43
MaterialLink
44
};
45
46
HUSD_EditLinkCollections
(
HUSD_AutoWriteLock
&lock, LinkType linktype);
47
~
HUSD_EditLinkCollections
();
48
49
50
/// Add a link whose source is the prim that will contain the collection
51
/// that defines the link.
52
/// This does not create the collections.
53
bool
addLinkItems(
const
HUSD_FindPrims
&linkSource,
54
const
HUSD_FindPrims
&includeprims,
55
const
HUSD_FindPrims
&excludeprims,
56
const
UT_StringHolder
&pathexpr,
57
const
UT_StringRef
&linkid);
58
59
/// Add a link whose source is NOT the prim that will contain the
60
/// collection that defines the link, but rather the prims in the link's
61
/// include and excludes lists will contain the collection that defines
62
/// the link.
63
/// This does not create the collections.
64
bool
addReverseLinkItems(
const
HUSD_FindPrims
&linkSource,
65
const
HUSD_FindPrims
&includeprims,
66
const
HUSD_FindPrims
&excludeprims,
67
const
UT_StringHolder
&pathexpr,
68
const
UT_StringRef
&linkid);
69
70
/// Create the collections necessary for all links previously added.
71
bool
createCollections(
UT_String
*error_message=
nullptr
);
72
73
private
:
74
HUSD_AutoWriteLock
&myWriteLock;
75
LinkType myLinkType;
76
UT_UniquePtr<husd_EditLinkCollectionsPrivate>
myPrivate;
77
};
78
79
#endif
80
HUSD_EditLinkCollections::ShadowLink
Definition:
HUSD_EditLinkCollections.h:42
HUSD_EditLinkCollections
Definition:
HUSD_EditLinkCollections.h:36
HUSD_API
#define HUSD_API
Definition:
HUSD_API.h:31
UT_StringRef
Definition:
UT_StringHolder.h:198
HUSD_AutoWriteLock
Definition:
HUSD_DataHandle.h:292
UT_UniquePtr
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition:
UT_UniquePtr.h:39
UT_String.h
UT_StringHolder
Definition:
UT_StringHolder.h:1009
HUSD_FindPrims
Definition:
HUSD_FindPrims.h:41
HUSD_API.h
HUSD_TimeCode
Definition:
HUSD_TimeCode.h:24
HUSD_EditLinkCollections::LightLink
Definition:
HUSD_EditLinkCollections.h:41
UT_UniquePtr.h
HUSD_EditLinkCollections::LinkType
LinkType
Definition:
HUSD_EditLinkCollections.h:39
UT_String
Definition:
UT_String.h:73
HUSD_DataHandle.h
HUSD
HUSD_EditLinkCollections.h
Generated on Thu Sep 4 2025 02:37:51 for HDK by
1.8.6