Questions and discussion for this lecture live here. Fire away by hitting Reply below
Hi SeƔn,
just a few questions.
First, I was wondering if is there a way to take notes inside of Serpens. It would be nice to add some comments here and there throughout our serpens code while developing it, and would be extremely useful when we come back to it in the future
Second, in this lecture at the beginning (min 5-6) when you build the string Material + Number, why donāt you simply connect āMaterialā and āCurrent Material Lengthā to the Combine Strings node? Instead you create a list with the two strings then Join them together. I thing the former method would be more straightforward, unless I am missing something
Thank you in advance
Oliviero
Hey Oliviero,
For your first questionā¦I agree, code comments are something I miss with the node-based workflow. But you prompted me to find a work-around. Itās not ideasā¦butā¦if you add a Frame
node, in the node properties, (where we usually change the name and colour), you can point to a text file, the contents of which will render in the frame. So, you can create a text file in Blenderās text editor, write your note and then display it in a frameā¦see the image attached.
As for your second question, you may well be right that there is a simpler way! I canāt quite work out the method youāre suggesting through. Could you wire it up and take a screenshot and post it here?
Youāre flying through lecturesā¦I better get more published soon!
Cheers,
S
Thank you for the work-around! That will be very useful!
For what concerns the second question, hereās a screenshot of what Iāve tried to describe previously
Yeap - this looks like a much more direct approach! Sometimes you just canāt see the wood for the trees!
Thanks for posting this.
SeƔn
Hey SeƔn,
Sorry to bother you, but Iām having another question⦠Iām not sure if you can help me because this issue seems more related to Blender than to the plugin development on Serpens.
The issue seems to be related to the material icon. When I use Serpens to connect the elements that should make the material icon appear, a space is generated where the icon should be, but the icon does not appear (sometimes itās just an image made of a few pixels). Additionally, Blender slows down too much, becomes unmanageable, and I have to terminate it.
Iāve noticed that when I access the material library directly in Blender, there are some materials I generated during the plugin development that havenāt disappeared (because of the fake-user activation). These materials donāt have an icon (or in some cases, have an icon made up of a few pixels) and as soon as I view them, again Blender slows down too much and I have to terminate it. I tried to delete them by writing a code with Python and Blenderās API, but without success.
Back to the main problem, I believe the issue is related to Blenderās installation on my computer. This is because, after downloading your reference file at the end of the section and running it, I noticed that:
- I can view the material icons you defined (steel and concrete).
- If I try to add a material, the material is added but without an icon, and Blender slows down my computer so much that I have to terminate it.
I tried to reinstall a near-LTS version of Blender, close to the one I had when I started, but it didnāt solve anything.
Any idea of whatās happening?
Thank you
Oliviero
Just an update. I have noticed the following warning whenever I run Blender from the terminal
WARN (bgl): source/blender/python/generic/bgl.cc:2676 BPyInit_bgl: 'bgl' imported without an OpenGL backend. Please update your add-ons to use the 'gpu' module.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
I have tried to find a solution on the internet but didnāt manage to find one. (I donāt know if this is relate to the problem I have, but it may be).
Hey @Oliviero - this behaviour sounds quite odd. The fact that youāre also encountering the behaviour when you fire up my downloadable version of the file does suggest that the issue could be hardware related.
Have you tried exporting your addon? Iād be interested to know if this performance issue only occurs on ādev modeā or if the issue persists even after the addon is packaged up and exported.
I suspect the issue might be related to the āData to Iconā node. This node comes with a health warning and is known to be quite intensive to run (Iām not sure of the underlying reasons for this BTW).
Keep in mind that weāre only using this node to achieve a superficial UI improvement. If running it on your computer is causing an issue, I would just not implement the material icons - they look node in the UI but thatās about all they do.
SeƔn
Hey @Sean, sorry for the delay.
Have you tried exporting your addon?
Iāve tried to export my addon but the issue is still there
I suspect the issue might be related to the āData to Iconā node.
I might be wrong, but I think the issue is somewhere else. The reason why I do believe this is that even before introducing that node, as explained above, I have generated some materials which have not disappeared (and I donāt know how to erase them) because of the fake user activation. Some of these materials have a strange icon made out of some white pixels, as if Blender was trying to load something but it canāt.
In any case, I will follow your suggestion and go on with the course without implemmenting the material icon for the moment.
Oliviero
Email me your Blend file and I will take a look when I get a minute. But yesā¦proceed with the course and donāt let this derail progressā¦the material icon is only a superficial addition as I mentioned before.
S