Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
florianvazelle committed Nov 30, 2022
0 parents commit c9127ef
Show file tree
Hide file tree
Showing 16 changed files with 520 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
AccessModifierOffset: -1
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: true
AlignOperands: false
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
BinPackParameters: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Allman
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true
BreakStringLiterals: true
ColumnLimit: 100
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DisableFormat: false
FixNamespaceComments: true
IncludeCategories:
- Regex: '^<'
Priority: 1
- Regex: '^"'
Priority: 2
IndentCaseLabels: true
IndentWidth: 2
KeepEmptyLinesAtTheStartOfBlocks: false
Language: Cpp
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
PenaltyReturnTypeOnItsOwnLine: 5000
PointerAlignment: Left
SortIncludes: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
Standard: Cpp11
TabWidth: 2
UseTab: Never
13 changes: 13 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Exclude all top-level files and directories (except addons) from zip downloads.
# This makes installing through the AssetLib easier, because no files and folders
# need to be unchecked.

/.gitattributes export-ignore
/.gitignore export-ignore
/.gitmodules export-ignore
/.github export-ignore
/CHANGELOG.md export-ignore
/README.md export-ignore
/icon.png export-ignore
/icon.png.import export-ignore
/project.godot export-ignore
13 changes: 13 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2

updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
time: '00:00'
timezone: UTC
open-pull-requests-limit: 10
commit-message:
prefix: "chore"
include: "scope"
21 changes: 21 additions & 0 deletions .github/worklfows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Pre-commit

on:
pull_request:
push:
workflow_dispatch:

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install GDScript Toolkit
run: pip3 install 'gdtoolkit==3.*'
- name: Run pre-commit hooks
uses: pre-commit/[email protected]
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Godot-specific ignores
.import/
export.cfg

# Imported translations (automatically generated from CSV files)
*.translation

# Mono-specific ignores
.mono/
data_*/
35 changes: 35 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: fix-byte-order-marker # Prevents weird UTF-8 encoding edge cases
- id: check-case-conflict # Check if case-insensitive filesystems would bork
- id: check-docstring-first # Check for if docstring was misplaced
- id: check-executables-have-shebangs
- id: check-json # Checks for valid json
- id: check-merge-conflict # Checks strings that look like a committed merge conflict
- id: check-xml # Checks for valid xml
- id: check-yaml # Checks for valid yaml
- id: end-of-file-fixer # Checks for ending with a newline
- id: mixed-line-ending # Consistent LF or CRLF
- id: trailing-whitespace # No trailing whitespace
- repo: local
hooks:
- id: check-gdscript
name: check gdscript
entry: gdformat
language: system
files: \.gd$
- id: check-shaders
name: check shaders
entry: clang-format
args:
- --style=file
- -Werror
language: system
files: \.shader$
- id: lint-gdscript
name: lint gdscript
entry: gdlint
language: system
files: \.gd$
8 changes: 8 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

Copyright © 2022 Florian Vazelle

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<div align="center">

# 🖌️ Brush Addon

![Godot Badge](https://img.shields.io/badge/godot-3.5-blue?logo=Godot-Engine&logoColor=white) ![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white) ![license](https://img.shields.io/badge/license-MIT-green?logo=open-source-initiative&logoColor=white)

A brush tool to quickly place 3D objects for [Godot Engine](https://godotengine.org/).

</div>

## How does it work?

Firstly, switch to brush mode, using the "Brush" button in the toolbar above the viewport.

Select an object (scene, models ...) in your filesystem dock, and move your mouse to place it.

You can :
- scale it by scrolling
- rotate it by moving the mouse while holding Shift
- undo and redo actions

## References

- [godotplacer](https://github.com/mnemoli/godotplacer/) by [mnemoli](https://github.com/mnemoli/)
22 changes: 22 additions & 0 deletions addons/brush/assets/icons/icon_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions addons/brush/assets/icons/icon_dark.svg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/icon_dark.svg-e7048a6c98a4dcbf32064bb3a837e4ff.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://addons/brush/assets/icons/icon_dark.svg"
dest_files=[ "res://.import/icon_dark.svg-e7048a6c98a4dcbf32064bb3a837e4ff.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
21 changes: 21 additions & 0 deletions addons/brush/assets/icons/icon_light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions addons/brush/assets/icons/icon_light.svg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/icon_light.svg-3ba0408cf4dfbbae849f48425382700d.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://addons/brush/assets/icons/icon_light.svg"
dest_files=[ "res://.import/icon_light.svg-3ba0408cf4dfbbae849f48425382700d.stex" ]

[params]

compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
Loading

0 comments on commit c9127ef

Please sign in to comment.