resolution args

This commit is contained in:
Jason Ly 2026-03-14 17:24:21 -04:00
parent 58f79c021c
commit b4fc8e2890

View File

@ -190,11 +190,6 @@ void do_sync_render(std::string fileToRender)
}
if (cam) {
// In Bella, resolution is almost always on the Camera node
/*cam["width"] = dl::Int(1920);
cam["height"] = dl::Int(1080);
std::cout << ">>> Set resolution on camera: " << cam.name() << std::endl;*/
auto inputs = cam.inputs();
for (const auto& input : inputs) {
// This will print every valid attribute name for YOUR camera
@ -206,39 +201,14 @@ void do_sync_render(std::string fileToRender)
float fWidth = static_cast<float>(width);
float fHeight = static_cast<float>(height);
cam["resolution"] = dl::Vec2{ fWidth, fHeight };
}
// Access the specialized 'resolution' sub-node
/*dl::bella_sdk::Node resNode = cam["resolution"].asNode();
if (resNode) {
resNode["width"] = dl::Int(1920);
resNode["height"] = dl::Int(1080);
std::cout << ">>> Successfully set resolution to 1920x1080 on: " << resNode.name() << std::endl;
}
else {
std::cout << ">>> ERROR: Resolution node not found on camera!" << std::endl;
}*/
}
}
else {
std::cout << ">>> ERROR: No camera found in settings!" << std::endl;
}
//if (settings) {
// settings["width"] = dl::Int(1920);
// settings["height"] = dl::Int(1080);;
//}
//else {
// // Fallback: If settings node isn't found, some versions use these on the beauty pass
// dl::bella_sdk::Node bPass = engine.scene().beautyPass();
// bPass["width"] = dl::Int(1920);
// bPass["height"] = dl::Int(1080);
//}
dl::bella_sdk::Node bPass = engine.scene().beautyPass();
// --- CHANGE RESOLUTION ---
//bPass["resWidth"] = dl::Int(1920); // Set your desired width
//bPass["resHeight"] = dl::Int(1080); // Set your desired height
// ---------------------------------------------
bPass["overridePath"] = pathNode;