Luxcore Preset Mode

Discussion related to the LuxCore functionality, implementations and API.
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Luxcore Preset Mode

Post by B.Y.O.B. »

Sorry I didn't answer.
I looked at the code and as far as I could see, the Blender API doesn't give me the option to jump to an arbitrary place in the list.
As a workaround I could put the entry for the current material to the top of the list so it is selected by default. However, this will rip it out of the alphabetically sorted list.
Would this help you? What's the reason for your request?
Attachments
placed at the top of the list
placed at the top of the list
User avatar
Sharlybg
Donor
Donor
Posts: 3101
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: Luxcore Preset Mode

Post by Sharlybg »

Suppose 5 different version of the same Material and their start with same word " Wall_ + number" :

Wall__01
Wall__02
Wall__03
wall__04
Wall__05

In cycles when you click on a given material you jump right to that material in the list so you can select easily any surrounding material with same start name.

Sometime material name have a link with the object they are applied to :

Ferrari__Paint
Ferrari__logo
Ferrari__rim
Ferrari__tyre
Ferrari__light

Anyway if it isn't possible we can live without it . search tool is the long way but .... ;)
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Luxcore Preset Mode

Post by B.Y.O.B. »

Ok, so putting it at the top of the list would not help.
You will have to type in the start of the name manually.
User avatar
FarbigeWelt
Donor
Donor
Posts: 1046
Joined: Sun Jul 01, 2018 12:07 pm
Location: Switzerland
Contact:

Re: Luxcore Preset Mode

Post by FarbigeWelt »

B.Y.O.B. wrote: Tue Mar 05, 2019 4:29 pm Ok, so putting it at the top of the list would not help.
You will have to type in the start of the name manually.
If you can check what material is selected then you have the material name. You can take the first 2 to 4 letters as string part.

Now the question is: Can you past the string part into the entry field? If yes materials would be showed in the list below input based on these 2 to 4 letters and all other materials were omitted.
Light and Word designing Creator - www.farbigewelt.ch - aka quantenkristall || #luxcorerender
MacBook Air with M1
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Luxcore Preset Mode

Post by B.Y.O.B. »

I don't think so: https://docs.blender.org/api/2.79/bpy.t ... arch_popup
And anyway, it's not a good idea, because by default you want to show a list of all materials without a search typed in for you already.
User avatar
FarbigeWelt
Donor
Donor
Posts: 1046
Joined: Sun Jul 01, 2018 12:07 pm
Location: Switzerland
Contact:

Re: Luxcore Preset Mode

Post by FarbigeWelt »

B.Y.O.B. wrote: Wed Mar 06, 2019 3:12 pm I don't think so: https://docs.blender.org/api/2.79/bpy.t ... arch_popup
And anyway, it's not a good idea, because by default you want to show a list of all materials without a search typed in for you already.

There seem to be many approaches.
https://blender.stackexchange.com/quest ... /8814#8814
Light and Word designing Creator - www.farbigewelt.ch - aka quantenkristall || #luxcorerender
MacBook Air with M1
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Luxcore Preset Mode

Post by B.Y.O.B. »

If you want you can take on this problem.
Here's the operator code: https://github.com/LuxCoreRender/BlendL ... al.py#L123
and UI code: https://github.com/LuxCoreRender/BlendL ... ial.py#L55
User avatar
FarbigeWelt
Donor
Donor
Posts: 1046
Joined: Sun Jul 01, 2018 12:07 pm
Location: Switzerland
Contact:

Re: Luxcore Preset Mode

Post by FarbigeWelt »

B.Y.O.B. wrote: Wed Mar 06, 2019 6:00 pm If you want you can take on this problem.
Here's the operator code: https://github.com/LuxCoreRender/BlendL ... al.py#L123
and UI code: https://github.com/LuxCoreRender/BlendL ... ial.py#L55
Okay. I take this one. It is still a bit riddle why Blender API is built the way it is. I find it quite strange and the reference is something I am not amused. On the other hand the user data structure with all its objects and nested data is rather easy to be accessed and changed.

Basic UIList Example

bpy.types.bpy_struct.id_data

Code: Select all

The Blender Python api allows integration for:
bpy.types.Panel
bpy.types.Menu
bpy.types.Operator
bpy.types.PropertyGroup
bpy.types.KeyingSet
bpy.types.RenderEngine
And this is maybe why I cannot use UIList directly. I go to have a further look at it.
Light and Word designing Creator - www.farbigewelt.ch - aka quantenkristall || #luxcorerender
MacBook Air with M1
User avatar
Sharlybg
Donor
Donor
Posts: 3101
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: Luxcore Preset Mode

Post by Sharlybg »

I go to have a further look at it
thanks for that ;)
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA
User avatar
FarbigeWelt
Donor
Donor
Posts: 1046
Joined: Sun Jul 01, 2018 12:07 pm
Location: Switzerland
Contact:

Re: Luxcore Preset Mode

Post by FarbigeWelt »

Sharlybg wrote: Fri Mar 08, 2019 11:20 am
I go to have a further look at it
thanks for that ;)
Do you have a good pain killer? My nack woar, my head soar ..

I guess I think completelly different than the great qhosts whou spelled this biliniear dichrome version of a polyvariant Gordon's knot streched beyond touchable finesse on topogical wrongly terminated Moebius' stripe.

Rather I'm going to buy the s e v e n most probably worthiest coder books at date; and read them from scratch.
I mean the books fromDonald Ervin Knuth The Art of Computer Programming (TAOCP).
Last edited by FarbigeWelt on Thu Mar 21, 2019 12:52 pm, edited 1 time in total.
Light and Word designing Creator - www.farbigewelt.ch - aka quantenkristall || #luxcorerender
MacBook Air with M1
Post Reply