48 float intensity = 1.0f;
49 pxr::SdfAssetPath texture_file;
53 pxr::GfVec3f
color(1.0f, 1.0f, 1.0f);
66 for (
auto *socket : input_sockets) {
67 if (
STREQ(socket->name,
"Surface")) {
68 input_socket = socket;
75 if (input_socket->directly_linked_links().is_empty()) {
78 bNodeLink const *link = input_socket->directly_linked_links()[0];
85 const bNodeSocket &color_input = input_node->input_by_identifier(
"Color");
86 const bNodeSocket &strength_input = input_node->input_by_identifier(
"Strength");
88 float const *strength = strength_input.default_value_typed<
float>();
89 float const *input_color = color_input.default_value_typed<
float>();
90 intensity = strength[1];
91 color = pxr::GfVec3f(input_color[0], input_color[1], input_color[2]);
93 if (!color_input.directly_linked_links().is_empty()) {
94 bNode *color_input_node = color_input.directly_linked_links()[0]->fromnode;
101 if (!image_path.empty()) {
102 texture_file = pxr::SdfAssetPath(image_path, image_path);
113 if (texture_file.GetAssetPath().empty()) {
116 texture_file = pxr::SdfAssetPath(image_path, image_path);
128 intensity =
scene_delegate_->shading_settings.studiolight_intensity / 2;
132 data_[pxr::UsdLuxTokens->orientToStageUpAxis] =
true;
133 data_[pxr::HdLightTokens->intensity] = intensity;
134 data_[pxr::HdLightTokens->exposure] = 0.0f;
135 data_[pxr::HdLightTokens->color] = pxr::GfVec3f(1.0f, 1.0f, 1.0f);
136 data_[pxr::HdLightTokens->textureFile] = texture_file;
164 transform = pxr::GfMatrix4d().SetRotate(pxr::GfRotation(pxr::GfVec3d(1.0, 0.0, 0.0), 90.0)) *
165 pxr::GfMatrix4d().SetRotate(pxr::GfRotation(pxr::GfVec3d(0.0, 0.0, 1.0), 90.0));
167 transform *= pxr::GfMatrix4d().SetRotate(
168 pxr::GfRotation(pxr::GfVec3d(0.0, 0.0, -1.0),