forked from PixarAnimationStudios/OpenUSD
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request PixarAnimationStudios#125 from autodesk-forks/Pier…
…re/TextCherryPick [OGSMOD-2048]Cherry pick changes related with text feature
- Loading branch information
Showing
51 changed files
with
5,141 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
# - Find TextSystem library | ||
# Find the native TextSystem includes and library | ||
# This module defines | ||
# TEXTSYSTEM_INCLUDE_DIRS, where to find TextSystem headers, Set when | ||
# TEXTSYSTEM_INCLUDE_DIR is found. | ||
# TEXTSYSTEM_LIBRARIES, libraries to link against to use TextSystem. | ||
# TEXTSYSTEM_ROOT_DIR, the base directory to search for TextSystem. | ||
# This can also be an environment variable. | ||
# TEXTSYSTEM_FOUND, if false, do not try to use TextSystem. | ||
# | ||
# also defined, but not for general use are | ||
# TEXTSYSTEM_LIBRARY, where to find the TextSystem library. | ||
|
||
#============================================================================= | ||
# Copyright 2021 Blender Foundation. | ||
# | ||
# Distributed under the OSI-approved BSD License (the "License"); | ||
# see accompanying file Copyright.txt for details. | ||
# | ||
# This software is distributed WITHOUT ANY WARRANTY; without even the | ||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
# See the License for more information. | ||
#============================================================================= | ||
|
||
# If TEXTSYSTEM_ROOT_DIR was defined in the environment, use it. | ||
IF(NOT TEXTSYSTEM_ROOT_DIR AND NOT $ENV{TEXTSYSTEM_ROOT_DIR} STREQUAL "") | ||
SET(TEXTSYSTEM_ROOT_DIR $ENV{TEXTSYSTEM_ROOT_DIR}) | ||
ENDIF() | ||
|
||
SET(TEXTSYSTEM_FIND_COMPONENTS | ||
text_system | ||
) | ||
|
||
SET(TEXTSYSTEM_SEARCH_DIRS | ||
${TEXTSYSTEM_ROOT_DIR} | ||
) | ||
|
||
FIND_PATH(TEXTSYSTEM_INCLUDE_DIR | ||
NAMES | ||
TextSystem/TextSystem.h | ||
HINTS | ||
${TEXTSYSTEM_SEARCH_DIRS} | ||
PATH_SUFFIXES | ||
include | ||
) | ||
|
||
SET(TEXTSYSTEM_LIBRARIES) | ||
FOREACH(COMPONENT ${TEXTSYSTEM_FIND_COMPONENTS}) | ||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT) | ||
FIND_LIBRARY(TEXTSYSTEM_${UPPERCOMPONENT}_LIBRARY | ||
NAMES | ||
${COMPONENT} | ||
HINTS | ||
${TEXTSYSTEM_SEARCH_DIRS} | ||
PATH_SUFFIXES | ||
lib64 lib | ||
) | ||
if(DEFINED TEXTSYSTEM_${UPPERCOMPONENT}_LIBRARY) | ||
LIST(APPEND | ||
TEXTSYSTEM_LIBRARIES | ||
"${TEXTSYSTEM_${UPPERCOMPONENT}_LIBRARY}") | ||
set(TEXTSYSTEM_FOUND TRUE) | ||
endif() | ||
ENDFOREACH() | ||
|
||
IF(TEXTSYSTEM_FOUND) | ||
SET(TEXTSYSTEM_LIBRARIES ${TEXTSYSTEM_LIBRARIES}) | ||
list(APPEND TEXTSYSTEM_INCLUDE_DIRS ${TEXTSYSTEM_INCLUDE_DIR}) | ||
list(APPEND TEXTSYSTEM_INCLUDE_DIRS ${TEXTSYSTEM_INCLUDE_DIR}/TextSystem) | ||
ENDIF(TEXTSYSTEM_FOUND) | ||
|
||
MARK_AS_ADVANCED( | ||
TEXTSYSTEM_INCLUDE_DIRS | ||
) | ||
FOREACH(COMPONENT ${TEXTSYSTEM_FIND_COMPONENTS}) | ||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT) | ||
MARK_AS_ADVANCED(TEXTSYSTEM_${UPPERCOMPONENT}_LIBRARY) | ||
ENDFOREACH() | ||
|
||
# handle the QUIETLY and REQUIRED arguments and set TEXTSYSTEM_FOUND to TRUE if | ||
# all listed variables are TRUE | ||
INCLUDE(FindPackageHandleStandardArgs) | ||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TEXTSYSTEM | ||
REQUIRED_VARS | ||
TEXTSYSTEM_INCLUDE_DIRS | ||
TEXTSYSTEM_LIBRARIES | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#usda 1.0 | ||
|
||
( | ||
upAxis = "Y" | ||
doc = """This layer represents the various geometric forms that curves | ||
may be used to represent.""" | ||
) | ||
|
||
|
||
def Xform "Text1" { | ||
uniform token[] xformOpOrder = ["xformOp:translate"] | ||
float3 xformOp:translate = (0, 0, -100) | ||
def Scope "Text11"{ | ||
def SimpleText "TextA" (){ | ||
uniform token[] xformOpOrder = ["xformOp:translate"] | ||
float3 xformOp:translate = (-300, 60, 0) | ||
|
||
string typeface = "Times New Roman" | ||
int textHeight = 100 | ||
bool bold = 1 | ||
string textData = "The quick brown fox" | ||
color3f[] primvars:displayColor = [(1, 1, 0)] | ||
} | ||
|
||
def SimpleText "TextB" (){ | ||
uniform token[] xformOpOrder = ["xformOp:translate"] | ||
float3 xformOp:translate = (-300, -40, 0) | ||
|
||
string typeface = "Consolas" | ||
int textHeight = 70 | ||
bool italic = 1 | ||
string textData = "jumps over the" | ||
color3f[] primvars:displayColor = [(1, 0, 1)] | ||
|
||
uniform bool primvars:cameraFacing = 1 | ||
} | ||
|
||
def SimpleText "TextC" (){ | ||
uniform token[] xformOpOrder = ["xformOp:translate"] | ||
float3 xformOp:translate = (-300, -140, 0) | ||
|
||
string typeface = "Castellar" | ||
int textHeight = 70 | ||
string textData = "lazy dog" | ||
color3f[] primvars:displayColor = [(0, 1, 1)] | ||
|
||
uniform bool primvars:cameraFacing = 1 | ||
uniform bool primvars:pixelScale = 1 | ||
float3 scaleCenter = (0, 0, 0) | ||
float screenSpaceSize = 5.0 | ||
float modelSpaceSize = 1.0 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.