-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replaced compile scripts with mcprep-build #422
Changes from 26 commits
bcba39f
193458a
0690e6a
a303cae
3e2f5a5
419d706
f475012
98a5bcb
b31ab8a
79e5c7d
b82549e
71e7e08
2bd8b60
2ad1f1b
24b62a0
bd0a9cd
2b7dd04
3757350
09b645f
c648fd8
6ea6825
81d2bd6
2783954
b934bc4
7f6b900
6b3b298
e915ecd
4c000a0
cc9158d
d292559
b8518f1
483f6e4
456b3f9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -246,9 +246,34 @@ def checklist(matName, listName): | |
return True | ||
return False | ||
|
||
# Dataclass representing all options | ||
# for prep materials | ||
# | ||
# We use __slots__ since __slots__ prevents the | ||
# following bug: | ||
# p = PrepOptions(...) | ||
# p.psses["..."] = "..." | ||
# | ||
# Where a non-existant variable is used. In | ||
# Python, this would create a new variable | ||
# "psses" on p. To prevent this, we use __slots__. | ||
# | ||
# In addition, access to objects in __slots__ is | ||
# faster then it would be normally | ||
# | ||
# Python dataclasses have native support for __slots__ | ||
# in 3.10, but since 2.8 uses 3.7, we have to use | ||
# __slots__ directly | ||
@dataclass | ||
class PrepOptions: | ||
passes: dict[str] | ||
__slots__ = ("passes", | ||
"use_reflections", | ||
"use_principled", | ||
"only_solid", | ||
"pack_format", | ||
"use_emission_nodes", | ||
"use_emission") | ||
passes: dict[str, str] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This typed dict creates syntax errors in blender 2.80, and regardless I don't see how is related to the PR topic itself. At the very least, will need to change this to support typing that was around in python3 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was added in the milestone branch and was synced up |
||
use_reflections: bool | ||
use_principled: bool | ||
only_solid: bool | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
addon_folder: MCprep_addon | ||
build_name: MCprep_addon | ||
|
||
install_versions: | ||
- '3.5' | ||
- '3.4' | ||
StandingPadAnimations marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
during_build: | ||
default: | ||
- [flake8 --extend-ignore W191 .] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see now this is included, which is good - but for some reason, I'm still getting W191 printouts (completely taking up my screen). |
||
dev: | ||
- create_file("mcprep_dev.txt") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does this do? Just creates the empty file, for the addon to recognize run as a dev build? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, it just creates an empty file There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might be good to add a yaml comment inline which clarifies why we do this. Maybe:
|
||
|
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're going to enforce users to install another build system, we should make it a straight forward as possible. Let's make it a step by step here of the commands to write (even if, yes, it's mostly copy-paste from the source repo):
Something like the following I gather:
python3 -m pip install --user virtualenv
(hmm.. this too is an extra barrier to entry, now suddenly people have to know how to use virtual environment, even if it is best practice)python37 -m venv ./venv # Creates env called venv
.\venv\Scripts\activate
source venv/bin/activate
(orsource .venv/bin/activate
)pip install bpy-addon-build
bpy-addon-build -b dev
(to install the dev version)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, is
mcprep_venv_*
meant to be your virtual environment name? I suppose we should use that above instead ofvenv
since we already have this in the gitignore (would be nicer if we could update the gitignore to bemcprep_venv*
so it could also matchmcprep_venv
itself)