Luxcore Preset Mode

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

Re: Luxcore Preset Mode

Post by B.Y.O.B. » Tue Mar 05, 2019 3:00 pm

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
2019-03-05_16-02-07.png
placed at the top of the list
Support LuxCoreRender project with salts and bounties

User avatar
Sharlybg
Donor
Donor
Posts: 1245
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: Luxcore Preset Mode

Post by Sharlybg » Tue Mar 05, 2019 3:37 pm

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: 2506
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Luxcore Preset Mode

Post by B.Y.O.B. » 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.
Support LuxCoreRender project with salts and bounties

User avatar
FarbigeWelt
Donor
Donor
Posts: 576
Joined: Sun Jul 01, 2018 12:07 pm
Location: Switzerland
Contact:

Re: Luxcore Preset Mode

Post by FarbigeWelt » Wed Mar 06, 2019 2:50 pm

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.
160.8 | 42.8 (10.7) Gfp / Windows 10 Pro, intel i7 4770K@3.5, 32 GB | AMD R9 290x+R9 390x, 4 GB
17.3 | 19.0 ( 4.7) Gfp / macOS X 13.6, iMac 27'', 2010, intel i7 870@2.93, 24 GB | ATI Radeon HD 5750, 1 GB
#luxcorerender | Gfp = SFFT Gflops

User avatar
B.Y.O.B.
Developer
Developer
Posts: 2506
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Luxcore Preset Mode

Post by B.Y.O.B. » 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.
Support LuxCoreRender project with salts and bounties

User avatar
FarbigeWelt
Donor
Donor
Posts: 576
Joined: Sun Jul 01, 2018 12:07 pm
Location: Switzerland
Contact:

Re: Luxcore Preset Mode

Post by FarbigeWelt » Wed Mar 06, 2019 5:36 pm

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
160.8 | 42.8 (10.7) Gfp / Windows 10 Pro, intel i7 4770K@3.5, 32 GB | AMD R9 290x+R9 390x, 4 GB
17.3 | 19.0 ( 4.7) Gfp / macOS X 13.6, iMac 27'', 2010, intel i7 870@2.93, 24 GB | ATI Radeon HD 5750, 1 GB
#luxcorerender | Gfp = SFFT Gflops

User avatar
B.Y.O.B.
Developer
Developer
Posts: 2506
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Luxcore Preset Mode

Post by B.Y.O.B. » 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
Support LuxCoreRender project with salts and bounties

User avatar
FarbigeWelt
Donor
Donor
Posts: 576
Joined: Sun Jul 01, 2018 12:07 pm
Location: Switzerland
Contact:

Re: Luxcore Preset Mode

Post by FarbigeWelt » Fri Mar 08, 2019 11:14 am

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.
160.8 | 42.8 (10.7) Gfp / Windows 10 Pro, intel i7 4770K@3.5, 32 GB | AMD R9 290x+R9 390x, 4 GB
17.3 | 19.0 ( 4.7) Gfp / macOS X 13.6, iMac 27'', 2010, intel i7 870@2.93, 24 GB | ATI Radeon HD 5750, 1 GB
#luxcorerender | Gfp = SFFT Gflops

User avatar
Sharlybg
Donor
Donor
Posts: 1245
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: Luxcore Preset Mode

Post by Sharlybg » Fri Mar 08, 2019 11:20 am

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: 576
Joined: Sun Jul 01, 2018 12:07 pm
Location: Switzerland
Contact:

Re: Luxcore Preset Mode

Post by FarbigeWelt » Thu Mar 21, 2019 12:51 pm

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.
160.8 | 42.8 (10.7) Gfp / Windows 10 Pro, intel i7 4770K@3.5, 32 GB | AMD R9 290x+R9 390x, 4 GB
17.3 | 19.0 ( 4.7) Gfp / macOS X 13.6, iMac 27'', 2010, intel i7 870@2.93, 24 GB | ATI Radeon HD 5750, 1 GB
#luxcorerender | Gfp = SFFT Gflops

Post Reply