News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Changing default properties on new files

Started by K-Sys, February 19, 2021, 11:16:59 AM

Previous topic - Next topic

K-Sys

Hello,
I recently started to learn Vulkan and successfully compiled everything with CodeBlocks so far.
Now I'm starting to write some shaders and wanted to automatically compile them with the rest of the project.
I managed to set up a custom compile command for them (via advanced compiler options, for file endings .vert and .frag) and that works great.

However when adding those files to my project or creating new ones the compile option in the files properties is unchecked, which means they won't actually get compiled unless i manually check that box for each file.
In contrast when creating a new .cpp file the compile option and the link option both are checked by default.

Is there any way to change this behaviour, so all my shader files (.vert and .frag) get the compile option checked by default?
I couldn't find any setting for that, nor a solution when googling for the problem.

oBFusCATed

What happens if you add them to "Sources" in Projects -> Project tree -> Edit file types & categories?
I don't guarantee that it will work. :)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

K-Sys

No that doesn't seem to work either.
I also tried creating a new category for shaders, but there doesn't seem to be a setting to change those default properties of new files.

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

K-Sys


oBFusCATed

s/to source/the source.

That you'll have to find the relevant part of the code and see what it is doing and if there is a way to do what you want to do.  ;)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

K-Sys

That is probably not worth doing in my case, since i have only a small project for learning. But thanks for your help.

oBFusCATed

benkenobi01:
Keep in mind that any work done on codeblocks is done by volunteers.
So we (the volunteers) have three options: 1. ignore the topic, 2. give some suggestions, 3. do the work.
If we don't have the time for 3., are you suggesting that we should stick to 1.?
How is that better than 2.?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]