How to run "start_daytime_editor" in tobspr's RP?

Recently I installed tobspr’s RP.
When I run “”,I got these errors below.
I can run “00_Loading the pipeline” “01_Material-Demo” successfully.
I didn’t modify any thing in RP.
QFont::setPointSize: Point size <= 0 (-1), must be greater than 0
qt.qpa.fonts: Unable to enumerate family ’ “Ramega ZhangQingpingYingbiKaishu” ’
QFont::setPointSize: Point size <= 0 (-1), must be greater than 0
QFont::setPointSize: Point size <= 0 (-1), must be greater than 0
Traceback (most recent call last):
File “D:\PDP\RenderPipeline\toolkit\day_time_editor\”, line 226, in _on_setting_selected
File “D:\PDP\RenderPipeline\toolkit\day_time_editor\”, line 188, in _update_tree_widgets
widget.setBackground(1, QBrush(QColor(*value)))
TypeError: arguments did not match any overloaded call:
QColor(color: Qt.GlobalColor): argument 1 has unexpected type ‘float’
QColor(rgb: int): argument 1 has unexpected type ‘float’
QColor(rgba64: QRgba64): argument 1 has unexpected type ‘float’
QColor(variant: Any): too many arguments
QColor(): too many arguments
QColor(r: int, g: int, b: int, alpha: int = 255): argument 1 has unexpected type ‘float’
QColor(aname: str): argument 1 has unexpected type ‘float’
QColor(acolor: Union[QColor, Qt.GlobalColor, QGradient]): argument 1 has unexpected type ‘float’
Any help please?

Looking at the error and the potential overloads listed there, you might play around with casting the values in the “value” parameter to ints, perhaps scaling them if they’re in the 0-to-1 range.

I think this problem is related to a change API in the framework Qt

1 Like

I have checked that,I just don’t know which one is right because I don’t understand what this line mean.Maybe I just need to delete the first parameter in “widget.setBackground(1, QBrush(QColor(*value)))”?

OK…So should I install older version Qt?

No, I don’t think that the problem lies with the construction of the “QBrush” (into which the “1” is being passed), but rather with the construction of the “QColor” (into which “*value” is being passed).

(To see this, look at the errors listed: the last of them are all talking about the constructors for “QColor”.)

Now, I’m not clear on what will be contained in “value”, but prepending a “*” to it should unpack whatever is there–so if, as I would guess, it’s a list or tuple containing three (or four) floats, then it would unpack into those three (or four) floats separately.

However, “QColor” doesn’t have a constructor that takes three (or four) floats–although it does have one that takes that number of ints.

Thus it seems to me that the thing to do is to change the contents of “value” (perhaps after examining it to see what it holds).

Noting, however, that the aforementioned “int”-constructor seems (from what’s listed in the error) to take values in the range 0 to 255, and thus that if the current contents of “value” fall into the range 0 to 1, you may want to scale them to match the former range.

You could indeed try that! That may well work.

(Although of course you would lose out on whatever updates there have been since that older version.)

I have made it work.
It is not because of pyqt’s version,but the type of parameter.In other word,it is a bug.
I will write the solution here if I have time.

1 Like

The errors come with this segment.

def _update_tree_widgets(self):
        """ Updates the tree widgets """
        for setting_handle, widget in self._tree_widgets:
            value = setting_handle.get_scaled_value_at(self._current_time)
            formatted = setting_handle.format(value)
            widget.setText(1, formatted)
            if setting_handle.type == "color":
                 widget.setBackground(1, QBrush(QColor(*value)))

We have to change these line

if setting_handle.type == "color":
                 widget.setBackground(1, QBrush(QColor(*value)))


if setting_handle.type == "color":
                color = [int(c) for c in value]
                widget.setBackground(1, QBrush(QColor(*color)))

Then debug in VSCode,we can find there are other errors.
We need to follow the instructions and Make some modifications,just be aware the parameters in functions shoud match with the instructions.
BTW,tobspr’s RP got very facinating effects and according to my test,it is much more friendly to NVIDIA than AMD.

1 Like