add usd-21-05-win64_py37
This commit is contained in:
1 parent
41d23e71ba
commit
66bc054336
15675 files changed
+3061008
No files matched your search
File diff suppressed because it is too large.
Load diff
Binary file not shown.
@@ -0,0 +1,317 @@
|
||||
#usda 1.0
|
||||
(
|
||||
defaultPrim = "Ball"
|
||||
)
|
||||
|
||||
over "Ball" (
|
||||
variants = {
|
||||
string shadingVariant = "Cue"
|
||||
}
|
||||
add variantSets = "shadingVariant"
|
||||
)
|
||||
{
|
||||
over "mesh"
|
||||
{
|
||||
}
|
||||
|
||||
over "Looks"
|
||||
{
|
||||
over "BallMaterial"
|
||||
{
|
||||
over "BallTexture"
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
variantSet "shadingVariant" = {
|
||||
"Ball_1" {
|
||||
over "Looks"
|
||||
{
|
||||
over "BallMaterial"
|
||||
{
|
||||
over "BallTexture"
|
||||
{
|
||||
string filename = "./tex/ball1.tex"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
over "mesh"
|
||||
{
|
||||
color3f[] primvars:displayColor = [(1, 0.850422, 0.0241323)]
|
||||
}
|
||||
|
||||
}
|
||||
"Ball_10" {
|
||||
over "Looks"
|
||||
{
|
||||
over "BallMaterial"
|
||||
{
|
||||
over "BallTexture"
|
||||
{
|
||||
string filename = "./tex/ball10.tex"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
over "mesh"
|
||||
{
|
||||
color3f[] primvars:displayColor = [(0.0170208, 0.0444973, 0.363132)]
|
||||
}
|
||||
|
||||
}
|
||||
"Ball_11" {
|
||||
over "Looks"
|
||||
{
|
||||
over "BallMaterial"
|
||||
{
|
||||
over "BallTexture"
|
||||
{
|
||||
string filename = "./tex/ball11.tex"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
over "mesh"
|
||||
{
|
||||
color3f[] primvars:displayColor = [(0.947959, 0.0329563, 0.0134364)]
|
||||
}
|
||||
|
||||
}
|
||||
"Ball_12" {
|
||||
over "Looks"
|
||||
{
|
||||
over "BallMaterial"
|
||||
{
|
||||
over "BallTexture"
|
||||
{
|
||||
string filename = "./tex/ball12.tex"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
over "mesh"
|
||||
{
|
||||
color3f[] primvars:displayColor = [(0.0473661, 0.0167832, 0.133209)]
|
||||
}
|
||||
|
||||
}
|
||||
"Ball_13" {
|
||||
over "Looks"
|
||||
{
|
||||
over "BallMaterial"
|
||||
{
|
||||
over "BallTexture"
|
||||
{
|
||||
string filename = "./tex/ball13.tex"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
over "mesh"
|
||||
{
|
||||
color3f[] primvars:displayColor = [(0.956527, 0.215727, 0.0241323)]
|
||||
}
|
||||
|
||||
}
|
||||
"Ball_14" {
|
||||
over "Looks"
|
||||
{
|
||||
over "BallMaterial"
|
||||
{
|
||||
over "BallTexture"
|
||||
{
|
||||
string filename = "./tex/ball14.tex"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
over "mesh"
|
||||
{
|
||||
color3f[] primvars:displayColor = [(0.0013732, 0.0494753, 0.0429018)]
|
||||
}
|
||||
|
||||
}
|
||||
"Ball_15" {
|
||||
over "Looks"
|
||||
{
|
||||
over "BallMaterial"
|
||||
{
|
||||
over "BallTexture"
|
||||
{
|
||||
string filename = "./tex/ball15.tex"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
over "mesh"
|
||||
{
|
||||
color3f[] primvars:displayColor = [(0.333438, 0.0019764, 0.00550657)]
|
||||
}
|
||||
|
||||
}
|
||||
"Ball_2" {
|
||||
over "Looks"
|
||||
{
|
||||
over "BallMaterial"
|
||||
{
|
||||
over "BallTexture"
|
||||
{
|
||||
string filename = "./tex/ball2.tex"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
over "mesh"
|
||||
{
|
||||
color3f[] primvars:displayColor = [(0.0170208, 0.0444973, 0.363132)]
|
||||
}
|
||||
|
||||
}
|
||||
"Ball_3" {
|
||||
over "Looks"
|
||||
{
|
||||
over "BallMaterial"
|
||||
{
|
||||
over "BallTexture"
|
||||
{
|
||||
string filename = "./tex/ball3.tex"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
over "mesh"
|
||||
{
|
||||
color3f[] primvars:displayColor = [(0.947959, 0.0329563, 0.0134364)]
|
||||
}
|
||||
|
||||
}
|
||||
"Ball_4" {
|
||||
over "Looks"
|
||||
{
|
||||
over "BallMaterial"
|
||||
{
|
||||
over "BallTexture"
|
||||
{
|
||||
string filename = "./tex/ball4.tex"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
over "mesh"
|
||||
{
|
||||
color3f[] primvars:displayColor = [(0.0473661, 0.0167832, 0.133209)]
|
||||
}
|
||||
|
||||
}
|
||||
"Ball_5" {
|
||||
over "Looks"
|
||||
{
|
||||
over "BallMaterial"
|
||||
{
|
||||
over "BallTexture"
|
||||
{
|
||||
string filename = "./tex/ball5.tex"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
over "mesh"
|
||||
{
|
||||
color3f[] primvars:displayColor = [(0.956527, 0.215727, 0.0241323)]
|
||||
}
|
||||
|
||||
}
|
||||
"Ball_6" {
|
||||
over "Looks"
|
||||
{
|
||||
over "BallMaterial"
|
||||
{
|
||||
over "BallTexture"
|
||||
{
|
||||
string filename = "./tex/ball6.tex"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
over "mesh"
|
||||
{
|
||||
color3f[] primvars:displayColor = [(0.0013732, 0.0494753, 0.0429018)]
|
||||
}
|
||||
|
||||
}
|
||||
"Ball_7" {
|
||||
over "Looks"
|
||||
{
|
||||
over "BallMaterial"
|
||||
{
|
||||
over "BallTexture"
|
||||
{
|
||||
string filename = "./tex/ball7.tex"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
over "mesh"
|
||||
{
|
||||
color3f[] primvars:displayColor = [(0.333438, 0.0019764, 0.00550657)]
|
||||
}
|
||||
|
||||
}
|
||||
"Ball_8" {
|
||||
over "Looks"
|
||||
{
|
||||
over "BallMaterial"
|
||||
{
|
||||
over "BallTexture"
|
||||
{
|
||||
string filename = "./tex/ball8.tex"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
over "mesh"
|
||||
{
|
||||
color3f[] primvars:displayColor = [(0.00977218, 0.00908114, 0.00778151)]
|
||||
}
|
||||
|
||||
}
|
||||
"Ball_9" {
|
||||
over "Looks"
|
||||
{
|
||||
over "BallMaterial"
|
||||
{
|
||||
over "BallTexture"
|
||||
{
|
||||
string filename = "./tex/ball9.tex"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
over "mesh"
|
||||
{
|
||||
color3f[] primvars:displayColor = [(1, 0.850422, 0.0241323)]
|
||||
}
|
||||
|
||||
}
|
||||
"Cue" {
|
||||
over "Looks"
|
||||
{
|
||||
over "BallMaterial"
|
||||
{
|
||||
over "BallTexture"
|
||||
{
|
||||
string filename = "./tex/ballCue.tex"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
over "mesh"
|
||||
{
|
||||
color3f[] primvars:displayColor = [(0.991221, 0.982484, 0.743576)]
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
#usda 1.0
|
||||
(
|
||||
defaultPrim = "Ball"
|
||||
upAxis = "Y"
|
||||
)
|
||||
|
||||
def Xform "Ball" (
|
||||
assetInfo = {
|
||||
asset identifier = @Ball/Ball.usd@
|
||||
string name = "Ball"
|
||||
}
|
||||
kind = "component"
|
||||
prepend references = [
|
||||
@./Ball.shadingVariants.usda@,
|
||||
@./Ball.maya.usd@
|
||||
]
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.0 KiB |
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 5.7 KiB |
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 6.6 KiB |
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 7.6 KiB |
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash -e
|
||||
txmake=/opt/pixar/RenderManProServer-20.3/bin/txmake
|
||||
$txmake ballCue.jpg ballCue.tex
|
||||
$txmake ball1.jpg ball1.tex
|
||||
$txmake ball9.jpg ball9.tex
|
||||
$txmake ball8.jpg ball8.tex
|
||||
$txmake ball4.jpg ball4.tex
|
||||
File diff suppressed because it is too large.
Load diff
Binary file not shown.
@@ -0,0 +1,17 @@
|
||||
#usda 1.0
|
||||
(
|
||||
defaultPrim = "Table"
|
||||
upAxis = "Y"
|
||||
)
|
||||
|
||||
def Xform "Table" (
|
||||
assetInfo = {
|
||||
asset identifier = @Table/Table.usd@
|
||||
string name = "Table"
|
||||
}
|
||||
kind = "component"
|
||||
prepend references = @./Table.maya.usd@
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
#usda 1.0
|
||||
(
|
||||
defaultPrim = "main_cam"
|
||||
endTimeCode = 0
|
||||
startTimeCode = 0
|
||||
)
|
||||
|
||||
def Camera "main_cam" (
|
||||
kind = "component"
|
||||
)
|
||||
{
|
||||
float circleOfConfusionSize = 0.0125
|
||||
float4[] clippingPlanes = []
|
||||
float2 clippingRange = (10, 500000)
|
||||
matrix4d constraintTargets:HeadXf = ( (1, 0, 0, 0), (0, 0.999999999997669, 0, 0), (0, 0, 0.999999999997669, 0), (0, 15, 15, 1) ) (
|
||||
constraintTargetIdentifier = "HeadXf"
|
||||
customData = {
|
||||
bool hasPropertyDefinition = 0
|
||||
}
|
||||
)
|
||||
float3[] extentsHint = [(3.40282e+38, 3.40282e+38, 3.40282e+38), (-3.40282e+38, -3.40282e+38, -3.40282e+38)]
|
||||
float focalLength = 25.047468
|
||||
float focusDistance = 200
|
||||
float fStop = 5.6
|
||||
float horizontalAperture = 24
|
||||
float lensSqueezeRatio = 1
|
||||
token projection = "perspective"
|
||||
uniform bool stereoscopic = 0
|
||||
float verticalAperture = 13.5
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,19 @@
|
||||
#usda 1.0
|
||||
|
||||
def Xform "World"
|
||||
{
|
||||
def Xform "sets"
|
||||
{
|
||||
}
|
||||
|
||||
def Xform "anim"
|
||||
{
|
||||
}
|
||||
|
||||
def "main_cam" (
|
||||
prepend references = @./main_cam.usd@
|
||||
)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,121 @@
|
||||
#!/pxrpythonsubst
|
||||
#
|
||||
# Copyright 2016 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
|
||||
'''
|
||||
Creates an asset file that consists of a top level layer and sublayers for
|
||||
shading and geometry.
|
||||
'''
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
from pxr import Kind, Sdf, Usd, UsdGeom
|
||||
|
||||
def main():
|
||||
import optparse
|
||||
|
||||
descr = __doc__.strip()
|
||||
usage = 'usage: %prog [options] asset'
|
||||
parser = optparse.OptionParser(description=descr, usage=usage)
|
||||
parser.add_option('-k', '--kind', default=Kind.Tokens.component,
|
||||
help="sets asset's model kind")
|
||||
parser.add_option('-o', '--outputDir',
|
||||
help='directory to create assets. if none specified, will use modelName.')
|
||||
parser.add_option('-s', '--shadingVariantLayer',
|
||||
help='add <asset>.shadingVariants.usda to model references.', default=False,
|
||||
action='store_true')
|
||||
parser.add_option('-f', '--force', default=False, action='store_true',
|
||||
help='if False, this will error if [outputDir] exists')
|
||||
options, args = parser.parse_args()
|
||||
|
||||
if len(args) != 1:
|
||||
parser.error("No asset specified")
|
||||
|
||||
asset = args[0]
|
||||
force = options.force
|
||||
|
||||
outputDir = options.outputDir
|
||||
if not outputDir:
|
||||
outputDir = asset
|
||||
|
||||
if os.path.exists(outputDir):
|
||||
if not force:
|
||||
parser.error('outputDir "%s" exists. Use -f to override' % outputDir)
|
||||
else:
|
||||
os.makedirs(outputDir)
|
||||
|
||||
_CreateAsset(asset, outputDir, options.kind, options.shadingVariantLayer)
|
||||
|
||||
def _CreateAsset(assetName, assetDir, assetKind, addShadingVariantLayer):
|
||||
assetFilePath = os.path.join(assetDir, '%s.usd' % assetName)
|
||||
|
||||
print("Creating asset at %s" % assetFilePath)
|
||||
# Make the layer ascii - good for readability, plus the file is small
|
||||
rootLayer = Sdf.Layer.CreateNew(assetFilePath, args = {'format':'usda'})
|
||||
assetStage = Usd.Stage.Open(rootLayer)
|
||||
|
||||
# Define a prim for the asset and make it the default for the stage.
|
||||
assetPrim = UsdGeom.Xform.Define(assetStage, '/%s' % assetName).GetPrim()
|
||||
assetStage.SetDefaultPrim(assetPrim)
|
||||
# Lets viewing applications know how to orient a free camera properly
|
||||
UsdGeom.SetStageUpAxis(assetStage, UsdGeom.Tokens.y)
|
||||
|
||||
# Usually we will "loft up" the kind authored into the exported geometry
|
||||
# layer rather than re-stamping here; we'll leave that for a later
|
||||
# tutorial, and just be explicit here.
|
||||
model = Usd.ModelAPI(assetPrim)
|
||||
if assetKind:
|
||||
model.SetKind(assetKind)
|
||||
|
||||
model.SetAssetName(assetName)
|
||||
model.SetAssetIdentifier('%s/%s.usd' % (assetName, assetName))
|
||||
|
||||
refs = []
|
||||
if addShadingVariantLayer:
|
||||
# if we're going to add it, then shading is stronger than geom and needs
|
||||
# to be added first
|
||||
refs.append('./%s.shadingVariants.usda' % assetName)
|
||||
|
||||
refs.append('./%s.maya.usd' % assetName)
|
||||
|
||||
_CreateAndReferenceLayers(assetPrim, assetDir, refs)
|
||||
|
||||
assetStage.GetRootLayer().Save()
|
||||
|
||||
def _CreateAndReferenceLayers(assetPrim, assetDir, refs):
|
||||
from pxr import Usd
|
||||
for refLayerPath in refs:
|
||||
referencedStage = Usd.Stage.CreateNew(os.path.join(assetDir, refLayerPath))
|
||||
referencedAssetPrim = referencedStage.DefinePrim(assetPrim.GetPath())
|
||||
referencedStage.SetDefaultPrim(referencedAssetPrim)
|
||||
referencedStage.GetRootLayer().Save()
|
||||
|
||||
assetPrim.GetReferences().AddReference(refLayerPath)
|
||||
|
||||
# If you want to print things out, you can do:
|
||||
#print(rootLayer.ExportToString())
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -0,0 +1,103 @@
|
||||
#!/pxrpythonsubst
|
||||
#
|
||||
# Copyright 2016 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
|
||||
'''
|
||||
Creates a shot with separate layers for departments.
|
||||
|
||||
'''
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
def main():
|
||||
import optparse
|
||||
|
||||
descr = __doc__.strip()
|
||||
usage = 'usage: %prog [options] shot'
|
||||
parser = optparse.OptionParser(description=descr, usage=usage)
|
||||
parser.add_option('-b', '--baseLayer',
|
||||
help='this will be added verbatim in the subLayerPaths.')
|
||||
parser.add_option('-o', '--outputDir',
|
||||
help='directory to create shot. if none specified, will use shotName.')
|
||||
|
||||
parser.add_option('-f', '--force', default=False, action='store_true',
|
||||
help='if False, this will error if [outputDir] exists')
|
||||
options, args = parser.parse_args()
|
||||
|
||||
if len(args) != 1:
|
||||
parser.error("No shot specified")
|
||||
|
||||
shot = args[0]
|
||||
force = options.force
|
||||
|
||||
outputDir = options.outputDir
|
||||
if not outputDir:
|
||||
outputDir = shot
|
||||
|
||||
if os.path.exists(outputDir):
|
||||
if not force:
|
||||
parser.error('outputDir "%s" exists. Use -f to override' % outputDir)
|
||||
else:
|
||||
os.makedirs(outputDir)
|
||||
|
||||
_CreateShot(shot, outputDir, options.baseLayer)
|
||||
|
||||
def _CreateShot(shotName, shotDir, baseLayer):
|
||||
shotFilePath = os.path.join(shotDir, '%s.usd' % shotName)
|
||||
|
||||
from pxr import Usd, UsdGeom
|
||||
shotStage = Usd.Stage.CreateNew(shotFilePath)
|
||||
print("Creating shot at %s" % shotFilePath)
|
||||
|
||||
_CreateAndAddSubLayers(shotStage, shotName, shotDir, [
|
||||
'./%s_sim.usd' % shotName,
|
||||
'./%s_anim.usd' % shotName,
|
||||
'./%s_layout.usd' % shotName,
|
||||
'./%s_sets.usd' % shotName,
|
||||
])
|
||||
|
||||
if baseLayer:
|
||||
shotStage.GetRootLayer().subLayerPaths.append(baseLayer)
|
||||
|
||||
# Lets viewing applications know how to orient a free camera properly
|
||||
UsdGeom.SetStageUpAxis(shotStage, UsdGeom.Tokens.y)
|
||||
shotStage.GetRootLayer().Save()
|
||||
|
||||
def _CreateAndAddSubLayers(stage, shotName, shotDir, subLayers):
|
||||
# We use the Sdf API here to quickly create layers. Also, we're using it
|
||||
# as a way to author the subLayerPaths as there is no way to do that
|
||||
# directly in the Usd API.
|
||||
|
||||
from pxr import Sdf
|
||||
rootLayer = stage.GetRootLayer()
|
||||
for subLayerPath in subLayers:
|
||||
Sdf.Layer.CreateNew(os.path.join(shotDir, subLayerPath))
|
||||
rootLayer.subLayerPaths.append(subLayerPath)
|
||||
|
||||
# If you want to print things out, you can do:
|
||||
#print(rootLayer.ExportToString())
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -0,0 +1,64 @@
|
||||
#!/pxrpythonsubst
|
||||
#
|
||||
# Copyright 2016 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
ASSET_BASE = os.path.join('../../', 'models')
|
||||
|
||||
def main():
|
||||
sequenceFilePath = 'shots/s00/s00.usd'
|
||||
setsLayoutLayerFilePath = 'shots/s00/s00_sets.usd'
|
||||
|
||||
from pxr import Kind, Usd, UsdGeom, Sdf
|
||||
stage = Usd.Stage.Open(sequenceFilePath)
|
||||
|
||||
# we use Sdf, a lower level library, to obtain the 'sets' layer.
|
||||
workingLayer = Sdf.Layer.FindOrOpen(setsLayoutLayerFilePath)
|
||||
assert stage.HasLocalLayer(workingLayer)
|
||||
|
||||
# this makes the workingLayer the target for authoring operations by the
|
||||
# stage.
|
||||
stage.SetEditTarget(workingLayer)
|
||||
|
||||
# Make sure the model-parents we need are well-specified
|
||||
Usd.ModelAPI(UsdGeom.Xform.Define(stage, '/World')).SetKind(Kind.Tokens.group)
|
||||
Usd.ModelAPI(UsdGeom.Xform.Define(stage, '/World/sets')).SetKind(Kind.Tokens.group)
|
||||
|
||||
# in previous examples, we've been using GetReferences().AddReference(...). The
|
||||
# following uses .SetItems() instead which lets us explicitly set (replace)
|
||||
# the references at once instead of adding.
|
||||
stage.DefinePrim('/World/sets/Room_set').GetReferences().SetReferences([
|
||||
Sdf.Reference(os.path.join(ASSET_BASE, 'Room_set/Room_set.usd'))])
|
||||
|
||||
stage.GetEditTarget().GetLayer().Save()
|
||||
|
||||
print('===')
|
||||
print('usdview %s' % sequenceFilePath)
|
||||
print('usdcat %s' % setsLayoutLayerFilePath)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
#!/pxrpythonsubst
|
||||
#
|
||||
# Copyright 2016 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
|
||||
'''
|
||||
This script adds shading to the models at:
|
||||
|
||||
models/
|
||||
Ball/
|
||||
|
||||
This script will change the texture path to point to different textures (though
|
||||
we only ship textures for '1', '9', '8', '4'). We also set the displayColor in
|
||||
the shadingVariants.
|
||||
|
||||
'''
|
||||
import os
|
||||
ASSET_BASE = os.path.join(os.getcwd(), 'models')
|
||||
|
||||
def main():
|
||||
from pxr import Usd
|
||||
stage = Usd.Stage.CreateNew(os.path.join(
|
||||
ASSET_BASE,
|
||||
'Ball/Ball.shadingVariants.usda'))
|
||||
stage.GetRootLayer().defaultPrim = 'Ball'
|
||||
_AddShadingToBall(stage)
|
||||
stage.GetRootLayer().Save()
|
||||
|
||||
def _AddShadingToBall(stage):
|
||||
from pxr import Sdf, UsdShade
|
||||
model = stage.OverridePrim('/Ball')
|
||||
texDir = os.path.join(ASSET_BASE, 'Ball/tex')
|
||||
mesh = stage.OverridePrim('/Ball/mesh')
|
||||
|
||||
ballTexture = UsdShade.Shader(stage.OverridePrim(
|
||||
model.GetPath().AppendPath('Looks/BallMaterial/BallTexture')))
|
||||
|
||||
# now we'll show adding some shading variants to the ball as well.
|
||||
shadingVariantsInfo = [
|
||||
('Cue', '', _Color(0.996, 0.992, 0.874)), # white
|
||||
|
||||
('Ball_1', '', _Color(1.000, 0.929, 0.184)), # yellow
|
||||
('Ball_2', '', _Color(0.157, 0.243, 0.631)), # blue
|
||||
('Ball_3', '', _Color(0.976, 0.212, 0.141)), # red
|
||||
('Ball_4', '', _Color(0.250, 0.156, 0.400)), # purple
|
||||
('Ball_5', '', _Color(0.980, 0.498, 0.184)), # orange
|
||||
('Ball_6', '', _Color(0.050, 0.255, 0.239)), # green
|
||||
('Ball_7', '', _Color(0.607, 0.059, 0.094)), # darkred
|
||||
|
||||
('Ball_8', '', _Color(0.122, 0.118, 0.110)), # black
|
||||
|
||||
('Ball_9', 'striped', _Color(1.000, 0.929, 0.184)), # yellow
|
||||
('Ball_10', 'striped', _Color(0.157, 0.243, 0.631)), # blue
|
||||
('Ball_11', 'striped', _Color(0.976, 0.212, 0.141)), # red
|
||||
('Ball_12', 'striped', _Color(0.250, 0.156, 0.400)), # purple
|
||||
('Ball_13', 'striped', _Color(0.980, 0.498, 0.184)), # orange
|
||||
('Ball_14', 'striped', _Color(0.050, 0.255, 0.239)), # green
|
||||
('Ball_15', 'striped', _Color(0.607, 0.059, 0.094)), # darkred
|
||||
]
|
||||
|
||||
|
||||
# create the shadingVariant variantSet
|
||||
shadingVariant = model.GetVariantSets().AddVariantSet('shadingVariant')
|
||||
for variantName, decoration, color in shadingVariantsInfo:
|
||||
# creates a variant inside 'shadingVariant'
|
||||
shadingVariant.AddVariant(variantName)
|
||||
|
||||
# switch to that variant
|
||||
shadingVariant.SetVariantSelection(variantName)
|
||||
|
||||
# this 'with' construct here tells Usd that authoring operations should
|
||||
# write to the shadingVariant.
|
||||
with shadingVariant.GetVariantEditContext():
|
||||
whichBall = variantName.split('_')[-1]
|
||||
texPath = os.path.join(texDir, 'ball%s.tex' % whichBall)
|
||||
# in the current variant, modify the color
|
||||
_SetParameters(ballTexture, [
|
||||
('filename', Sdf.ValueTypeNames.String, texPath),
|
||||
])
|
||||
|
||||
# set the display color for hydra
|
||||
_SetDisplayColor(mesh, color)
|
||||
|
||||
# currently not doing anything with decoration, but we could maybe
|
||||
# use this to make the solid vs. stripes.
|
||||
|
||||
# now make the variant selection 'Cue' instead of the last variant that we
|
||||
# created above.
|
||||
shadingVariant.SetVariantSelection('Cue')
|
||||
|
||||
def _SetParameters(shadingNode, params):
|
||||
'''
|
||||
shadingNode is a UsdShadeShader
|
||||
params are (paramName, paramType, value) tuples
|
||||
'''
|
||||
|
||||
for paramName, paramType, value in params:
|
||||
shadingNode.CreateInput(paramName, paramType).Set(value)
|
||||
|
||||
def _Color(r, g, b):
|
||||
# for this tutorial, the colors i got are not in linear space.
|
||||
from pxr import Gf
|
||||
return Gf.ConvertDisplayToLinear(Gf.Vec3f(r, g, b))
|
||||
|
||||
def _SetDisplayColor(mesh, color):
|
||||
from pxr import UsdGeom
|
||||
|
||||
# DisplayColor is actually an array. Here, we just author one color which
|
||||
# applies to the whole mesh.
|
||||
UsdGeom.Gprim(mesh).CreateDisplayColorAttr([color])
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -0,0 +1,84 @@
|
||||
#!/pxrpythonsubst
|
||||
#
|
||||
# Copyright 2016 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
def main():
|
||||
shotFilePath = 'shots/s00_01/s00_01.usd'
|
||||
animLayerFilePath = 'shots/s00_01/s00_01_anim.usd'
|
||||
|
||||
from pxr import Usd, Sdf
|
||||
stage = Usd.Stage.Open(shotFilePath)
|
||||
|
||||
# set the timeCode range for the shot that other applications can use.
|
||||
stage.SetStartTimeCode(1)
|
||||
stage.SetEndTimeCode(10)
|
||||
|
||||
stage.GetRootLayer().Save()
|
||||
|
||||
# we use Sdf, a lower level library, to obtain the 'anim' layer.
|
||||
workingLayer = Sdf.Layer.FindOrOpen(animLayerFilePath)
|
||||
assert stage.HasLocalLayer(workingLayer)
|
||||
|
||||
# this makes the workingLayer the target for authoring operations by the
|
||||
# stage.
|
||||
stage.SetEditTarget(workingLayer)
|
||||
|
||||
_AnimateBilliards(stage)
|
||||
|
||||
stage.GetEditTarget().GetLayer().Save()
|
||||
|
||||
print('===')
|
||||
print('usdview %s' % shotFilePath)
|
||||
print('usdcat %s' % animLayerFilePath)
|
||||
|
||||
def _AnimateBilliards(stage):
|
||||
_MoveBall(stage.GetPrimAtPath('/World/anim/CueBall'), (1, 0), 40)
|
||||
#_MoveBall(stage.GetPrimAtPath('/World/sets/Room_set/Props/Ball_2'), (0, 0), 0.0)
|
||||
_MoveBall(stage.GetPrimAtPath('/World/sets/Room_set/Props/Ball_10'), (0, -1), 20)
|
||||
_MoveBall(stage.GetPrimAtPath('/World/sets/Room_set/Props/Ball_1'), (1, -1), 5)
|
||||
_MoveBall(stage.GetPrimAtPath('/World/sets/Room_set/Props/Ball_4'), (1, -0.5), 3.6)
|
||||
|
||||
def _MoveBall(ball, direction, speed):
|
||||
|
||||
from pxr import Usd, UsdGeom, Gf
|
||||
v = Gf.Vec2d(*direction).GetNormalized() * speed
|
||||
xformAPI = UsdGeom.XformCommonAPI(ball)
|
||||
# Here we make use of GfVec3d rather than plain tuples so we can
|
||||
# add vectors, and demonstrate the API (all Usd API's) will accept either.
|
||||
# GetXformVectors() returns a tuple of
|
||||
# (translation, rotation, scale, pivot, rotationOrder), from which we
|
||||
# extract the first element, the translation
|
||||
start = xformAPI.GetXformVectors(Usd.TimeCode.Default())[0]
|
||||
end = start + Gf.Vec3d(v[0], 0, v[1])
|
||||
|
||||
# set keyframe for frame 1 and frame 10.
|
||||
xformAPI.SetTranslate(start, 1)
|
||||
xformAPI.SetTranslate(end, 10)
|
||||
xformAPI.SetRotate(speed * Gf.Vec3f(3.7, 13.9, 91.34))
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
#!/pxrpythonsubst
|
||||
#
|
||||
# Copyright 2016 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
|
||||
'''
|
||||
This script assumes you have models at
|
||||
|
||||
models/
|
||||
Ball/
|
||||
Table/
|
||||
|
||||
It will create a new "set" (aggregate) model, Room_set at
|
||||
|
||||
models/Room_set
|
||||
|
||||
'''
|
||||
|
||||
import os
|
||||
ASSET_BASE = os.path.join(os.getcwd(), 'models')
|
||||
TABLE_HEIGHT = 74.5
|
||||
BALL_RADIUS = 5.715 * 0.5
|
||||
|
||||
def main():
|
||||
from pxr import Kind, Usd, UsdGeom
|
||||
|
||||
setFilePath = os.path.join(ASSET_BASE, 'Room_set/Room_set.usd')
|
||||
|
||||
# Create the model stage, the model prim, and also make the modelPrim the
|
||||
# default prim so that the layer can be referenced without specifying a
|
||||
# root path.
|
||||
stage = Usd.Stage.CreateNew(setFilePath)
|
||||
setModelPrim = UsdGeom.Xform.Define(stage, '/Room_set').GetPrim()
|
||||
stage.SetDefaultPrim(setModelPrim)
|
||||
|
||||
# Lets viewing applications know how to orient a free camera properly
|
||||
UsdGeom.SetStageUpAxis(stage, UsdGeom.Tokens.y)
|
||||
|
||||
# Models can have a "kind" which can be used to categorize models into
|
||||
# different types. This is useful for other applications to reason about
|
||||
# the model hierarchy.
|
||||
Usd.ModelAPI(setModelPrim).SetKind(Kind.Tokens.assembly)
|
||||
|
||||
# add child models to our set.
|
||||
_AddModel(stage, '/Room_set/Furniture/Table', 'Table/Table.usd')
|
||||
|
||||
ballNumber = 0
|
||||
|
||||
import math
|
||||
for row in range(5):
|
||||
|
||||
tableX = 10 + row * 2 * BALL_RADIUS * math.cos(math.pi/6)
|
||||
tableRowZ = -row * BALL_RADIUS
|
||||
numBallsInRow = row + 1
|
||||
|
||||
for i in range(numBallsInRow):
|
||||
ballNumber += 1
|
||||
|
||||
b = _AddModel(
|
||||
stage,
|
||||
'/Room_set/Props/Ball_%d' % ballNumber,
|
||||
'Ball/Ball.usd')
|
||||
|
||||
# tableX and tableZ will arrange the balls into a triangle.
|
||||
tableZ = tableRowZ + i * 2 * BALL_RADIUS
|
||||
ballXlate = (tableX, TABLE_HEIGHT + BALL_RADIUS, tableZ)
|
||||
|
||||
# Apply the UsdGeom.Xformable schema to the model, and then set the
|
||||
# transformation.
|
||||
# We are only going to translate the balls, but we still use
|
||||
# the helper XformCommonAPI schema to instantiate a translate op.
|
||||
# XformCommonAPI helps ensure transform ops are interchangeable
|
||||
# between applications, when you can make do with SRT + pivot
|
||||
UsdGeom.XformCommonAPI(b).SetTranslate(ballXlate)
|
||||
|
||||
# we conveniently named the shadingVariant the same as the name of
|
||||
# the ball.
|
||||
shadingVariantName = b.GetName()
|
||||
|
||||
# get the variantSet "shadingVariant" and then set it accordingly.
|
||||
vs = b.GetVariantSets().GetVariantSet('shadingVariant')
|
||||
vs.SetVariantSelection(shadingVariantName)
|
||||
|
||||
stage.GetRootLayer().Save()
|
||||
|
||||
def _AddModel(stage, path, refPath):
|
||||
'''
|
||||
Adds a reference to refPath at the given path in the stage. This will make
|
||||
sure the model hierarchy is maintained by ensuring that all ancestors of
|
||||
the path have "kind" set to "group".
|
||||
|
||||
returns the referenced model.
|
||||
'''
|
||||
|
||||
from pxr import Kind, Sdf, Usd, UsdGeom
|
||||
|
||||
# convert path to an Sdf.Path which has several methods that are useful
|
||||
# when working with paths. We use GetPrefixes() here which returns a list
|
||||
# of all the prim prefixes for a given path.
|
||||
path = Sdf.Path(path)
|
||||
for prefixPath in path.GetPrefixes()[1:-1]:
|
||||
parentPrim = stage.GetPrimAtPath(prefixPath)
|
||||
if not parentPrim:
|
||||
parentPrim = UsdGeom.Xform.Define(stage, prefixPath).GetPrim()
|
||||
Usd.ModelAPI(parentPrim).SetKind(Kind.Tokens.group)
|
||||
|
||||
# typeless def here because we'll be getting the type from the prim that
|
||||
# we're referencing.
|
||||
m = stage.DefinePrim(path)
|
||||
m.GetReferences().AddReference(os.path.join(ASSET_BASE, refPath))
|
||||
return m
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
#!/pxrpythonsubst
|
||||
#
|
||||
# Copyright 2016 Pixar
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "Apache License")
|
||||
# with the following modification; you may not use this file except in
|
||||
# compliance with the Apache License and the following modification to it:
|
||||
# Section 6. Trademarks. is deleted and replaced with:
|
||||
#
|
||||
# 6. Trademarks. This License does not grant permission to use the trade
|
||||
# names, trademarks, service marks, or product names of the Licensor
|
||||
# and its affiliates, except as required to comply with Section 4(c) of
|
||||
# the License and to reproduce the content of the NOTICE file.
|
||||
#
|
||||
# You may obtain a copy of the Apache License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the Apache License with the above modification is
|
||||
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the Apache License for the specific
|
||||
# language governing permissions and limitations under the Apache License.
|
||||
#
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
ASSET_BASE = os.path.join(os.getcwd(), 'models')
|
||||
TABLE_HEIGHT = 74.5
|
||||
BALL_RADIUS = 5.715 * 0.5
|
||||
|
||||
def main():
|
||||
shotFilePath = 'shots/s00_01/s00_01.usd'
|
||||
layoutLayerFilePath = 'shots/s00_01/s00_01_layout.usd'
|
||||
|
||||
from pxr import Usd, Sdf
|
||||
stage = Usd.Stage.Open(shotFilePath)
|
||||
|
||||
# set the timeCode range for the shot that other applications can use.
|
||||
stage.SetStartTimeCode(1)
|
||||
stage.SetEndTimeCode(10)
|
||||
|
||||
# we use Sdf, a lower level library, to obtain the 'layout' layer.
|
||||
workingLayer = Sdf.Layer.FindOrOpen(layoutLayerFilePath)
|
||||
assert stage.HasLocalLayer(workingLayer)
|
||||
|
||||
# this makes the workingLayer the target for authoring operations by the
|
||||
# stage.
|
||||
stage.SetEditTarget(workingLayer)
|
||||
|
||||
_SetupBilliards(stage)
|
||||
_MoveCamera(stage)
|
||||
|
||||
stage.GetEditTarget().GetLayer().Save()
|
||||
|
||||
print('===')
|
||||
print('usdview %s' % shotFilePath)
|
||||
print('usdcat %s' % layoutLayerFilePath)
|
||||
|
||||
def _SetupBilliards(stage):
|
||||
from pxr import Kind, Sdf, Usd, UsdGeom
|
||||
|
||||
# Make sure the model-parents we need are well-specified
|
||||
Usd.ModelAPI(UsdGeom.Xform.Define(stage, '/World')).SetKind(Kind.Tokens.group)
|
||||
Usd.ModelAPI(UsdGeom.Xform.Define(stage, '/World/anim')).SetKind(Kind.Tokens.group)
|
||||
# in previous examples, we've been using GetReferences().AddReference(...). The
|
||||
# following uses .SetItems() instead which lets us explicitly set (replace)
|
||||
# the references at once instead of adding.
|
||||
cueBall = stage.DefinePrim('/World/anim/CueBall')
|
||||
cueBall.GetReferences().SetReferences([
|
||||
Sdf.Reference(os.path.join(ASSET_BASE, 'Ball/Ball.usd'))])
|
||||
|
||||
# deactivate everything that isn't 8, 9, 1, 4. We accumulate the prims we
|
||||
# want to deactivate so that we don't delete while iterating.
|
||||
roomProps = stage.GetPrimAtPath('/World/sets/Room_set/Props')
|
||||
keepers = set(['Ball_%d' % i for i in [1, 9, 8, 4] ])
|
||||
toDeactivate = []
|
||||
for child in roomProps.GetChildren():
|
||||
if child.GetName() not in keepers:
|
||||
toDeactivate.append(child)
|
||||
for prim in toDeactivate:
|
||||
prim.SetActive(False)
|
||||
|
||||
# the offset values are relative to the radius of the ball
|
||||
def _MoveBall(ballPrim, offset):
|
||||
translation = (offset[0] * BALL_RADIUS,
|
||||
TABLE_HEIGHT + BALL_RADIUS,
|
||||
offset[1] * BALL_RADIUS)
|
||||
|
||||
# Apply the UsdGeom.Xformable schema to the model, and then set the
|
||||
# transformation. Note we can use ordinary python tuples
|
||||
from pxr import UsdGeom
|
||||
UsdGeom.XformCommonAPI(ballPrim).SetTranslate(translation)
|
||||
|
||||
# all these values are just eye-balled and are relative to Ball_1.
|
||||
_MoveBall(cueBall, (1.831, 4.331))
|
||||
_MoveBall(stage.GetPrimAtPath('/World/sets/Room_set/Props/Ball_2'), (0.000, 0.000))
|
||||
_MoveBall(stage.GetPrimAtPath('/World/sets/Room_set/Props/Ball_10'), (2.221, 1.119))
|
||||
_MoveBall(stage.GetPrimAtPath('/World/sets/Room_set/Props/Ball_1'), (3.776, 0.089))
|
||||
_MoveBall(stage.GetPrimAtPath('/World/sets/Room_set/Props/Ball_4'), (5.453, -0.543))
|
||||
|
||||
def _MoveCamera(stage):
|
||||
from pxr import UsdGeom, Gf
|
||||
cam = UsdGeom.Camera.Get(stage, '/World/main_cam')
|
||||
|
||||
# the camera derives from UsdGeom.Xformable so we can
|
||||
# use the XformCommonAPI on it, too, and see how rotations are handled
|
||||
xformAPI = UsdGeom.XformCommonAPI(cam)
|
||||
xformAPI.SetTranslate( (8, 120, 8) )
|
||||
# -86 degree rotation around X axis. Can specify rotation order as
|
||||
# optional parameter
|
||||
xformAPI.SetRotate( (-86, 0, 0 ) )
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
Reference in new issue
Block a user