Compare commits

..

No commits in common. "33f2809682e41cf620358360de25d52a56736036" and "c4d8e02a9d121429da31a3fa5fa6c333afc3ea71" have entirely different histories.

25 changed files with 44 additions and 39 deletions

View File

@ -273,7 +273,6 @@ Blender side:
- [ ] auto reload registry if absent/possible
- cannot be done from UI possibly polling with increasing timeout
- bpy.ops.blenvy.components_registry_reload()
- double check bpy.context.components_registry
- [x] filter out MaterialInfos from list of "fixable components"

View File

@ -1,7 +1,7 @@
schema_version = "1.0.0"
id = "Blenvy"
version = "0.1.0-alpha.1"
version = "0.1.0"
name = "Blenvy"
tagline = "Tools to add/edit components of objects, collections etc & create blueprints & levels for the Bevy Engine in Blender"
maintainer = "kaosat-dev <https://github.com/kaosat-dev/>"

View File

@ -1,7 +1,7 @@
bl_info = {
"name": "blenvy",
"author": "kaosigh",
"version": (0, 1, 0, "alpha.1"),
"version": (0, 1, 0),
"blender": (3, 4, 0),
"location": "File > Import-Export",
"description": "tooling for the Bevy engine",

View File

@ -2,7 +2,7 @@ import os
import json
import pathlib
import bpy
from ...settings import generate_complete_settings_dict
from blenvy.settings import generate_complete_settings_dict
from io_scene_gltf2 import ExportGLTF2_Base

View File

@ -1,5 +1,6 @@
from ....blueprints.blueprint_helpers import find_blueprints_not_on_disk
from blenvy.blueprints.blueprint_helpers import find_blueprints_not_on_disk
def is_blueprint_always_export(blueprint):
return blueprint.collection['always_export'] if 'always_export' in blueprint.collection else False

View File

@ -3,7 +3,8 @@ import os
import bpy
import traceback
from ....blueprints.blueprint_helpers import inject_export_path_into_internal_blueprints
from blenvy.blueprints.blueprints_scan import blueprints_scan
from blenvy.blueprints.blueprint_helpers import inject_export_path_into_internal_blueprints
from ..blueprints.get_blueprints_to_export import get_blueprints_to_export
from ..levels.get_levels_to_export import get_levels_to_export

View File

@ -1,7 +1,7 @@
import json
import bpy
from ....core.object_makers import make_empty
from ...bevy_components.utils import is_component_valid_and_enabled
from blenvy.core.object_makers import (make_empty)
from blenvy.add_ons.bevy_components.utils import is_component_valid_and_enabled
from ..constants import custom_properties_to_filter_out
from ..utils import remove_unwanted_custom_properties

View File

@ -2,7 +2,7 @@ import json
import os
import bpy
from ....settings import load_settings
from blenvy.settings import load_settings
def get_standard_exporter_settings():
standard_gltf_exporter_settings = load_settings(".blenvy_gltf_settings")

View File

@ -1,6 +1,6 @@
import bpy
from ....core.helpers_collections import set_active_collection
from ....core.object_makers import make_empty
from blenvy.core.helpers_collections import (set_active_collection)
from blenvy.core.object_makers import (make_empty)
from .duplicate_object import duplicate_object
from .export_gltf import export_gltf
from ..constants import custom_properties_to_filter_out

View File

@ -3,7 +3,7 @@ import bpy
from .project_diff import get_changes_per_scene
from .auto_export import auto_export
from .settings_diff import get_setting_changes
from ....settings import upsert_settings
from blenvy.settings import load_settings, upsert_settings
# prepare export by gather the changes to the scenes & settings
def prepare_and_export():

View File

@ -2,7 +2,7 @@ import json
import traceback
import bpy
from .serialize_project import serialize_project
from ....settings import load_settings
from blenvy.settings import load_settings, upsert_settings
def bubble_up_changes(object, changes_per_scene):
if object is not None and object.parent:
@ -13,12 +13,12 @@ import uuid
def serialize_current(settings):
# sigh... you need to save & reset the frame otherwise it saves the values AT THE CURRENT FRAME WHICH CAN DIFFER ACROSS SCENES
current_frames = [scene.frame_current for scene in bpy.data.scenes]
"""for scene in bpy.data.scenes:
for scene in bpy.data.scenes:
scene.frame_set(0)
if scene.id_test == '':
print("GENERATE ID")
scene.id_test = str(uuid.uuid4())
print("SCENE ID", scene.id_test)"""
print("SCENE ID", scene.id_test)
#https://blender.stackexchange.com/questions/216411/whats-the-replacement-for-id-or-hash-on-bpy-objects
current_scene = bpy.context.window.scene

View File

@ -1,4 +1,6 @@
from ....settings import are_settings_identical, load_settings, changed_settings
import bpy
from blenvy.settings import are_settings_identical, load_settings, changed_settings
# which common settings changes should trigger a re-export
parameter_names_whitelist_common = [

View File

@ -1,5 +1,5 @@
import bpy
from ....blueprints.blueprint_helpers import check_if_blueprint_on_disk
from blenvy.blueprints.blueprint_helpers import check_if_blueprint_on_disk
# IF collection_instances_combine_mode is not 'split' check for each scene if any object in changes_per_scene has an instance in the scene
def changed_object_in_scene(scene_name, changes_per_scene, blueprints_data, collection_instances_combine_mode):

View File

@ -1,7 +1,8 @@
import os
import bpy
from ....core.helpers_collections import traverse_tree
from ....core.object_makers import make_cube
from blenvy.core.helpers_collections import (traverse_tree)
from blenvy.core.object_makers import make_cube
from ..common.generate_temporary_scene_and_export import generate_temporary_scene_and_export
from ..common.export_gltf import (generate_gltf_export_settings)

View File

@ -1,6 +1,6 @@
import bpy
from ....materials.materials_helpers import find_materials_not_on_disk
from blenvy.materials.materials_helpers import find_materials_not_on_disk
def get_materials_to_export(changes_per_material, changed_export_parameters, blueprints_data, settings):
export_gltf_extension = getattr(settings, "export_gltf_extension", ".glb")

View File

@ -1,7 +1,7 @@
import bpy
from bpy_types import (PropertyGroup)
from bpy.props import (EnumProperty, PointerProperty, StringProperty, BoolProperty, CollectionProperty, IntProperty)
from ...settings import load_settings, upsert_settings, generate_complete_settings_dict
from blenvy.settings import load_settings, upsert_settings, generate_complete_settings_dict
# list of settings we do NOT want to save
settings_black_list = ['settings_save_enabled', 'dry_run']

View File

@ -1,8 +1,8 @@
import posixpath
import bpy
from pathlib import Path
from ...assets.assets_scan import get_blueprint_asset_tree, get_level_scene_assets_tree2
from ..bevy_components.utils import is_component_valid_and_enabled
from blenvy.assets.assets_scan import get_blueprint_asset_tree, get_level_scene_assets_tree2
from blenvy.add_ons.bevy_components.utils import is_component_valid_and_enabled
from .constants import custom_properties_to_filter_out
from ...assets.assets_scan import get_level_scene_assets_tree2

View File

@ -1,7 +1,7 @@
import json
from bpy_types import Operator
from bpy.props import (StringProperty, EnumProperty, IntProperty)
from ..utils import get_item_by_type
from blenvy.add_ons.bevy_components.utils import get_item_by_type
class BLENVY_OT_component_list_actions(Operator):
"""Move items up and down, add and remove"""

View File

@ -3,7 +3,7 @@ from bpy_types import Operator, UIList
from bpy.props import (StringProperty, EnumProperty, PointerProperty, FloatVectorProperty, IntProperty)
from ..propGroups.conversions_from_prop_group import property_group_value_to_custom_property_value
from ..utils import get_item_by_type
from blenvy.add_ons.bevy_components.utils import get_item_by_type
class BLENVY_OT_component_map_actions(Operator):
"""Move items up and down, add and remove"""

View File

@ -3,7 +3,8 @@ import bpy
from bpy_types import (Operator)
from bpy.props import (StringProperty)
from bpy_extras.io_utils import ImportHelper
from ....settings import upsert_settings
from blenvy.settings import upsert_settings
from ..components.metadata import ensure_metadata_for_all_items
from ..propGroups.prop_groups import generate_propertyGroups_for_components

View File

@ -2,8 +2,7 @@ import os
import bpy
from bpy_types import (PropertyGroup)
from bpy.props import (EnumProperty, PointerProperty, StringProperty, BoolProperty, CollectionProperty, FloatProperty)
from ...settings import load_settings, upsert_settings, generate_complete_settings_dict
from blenvy.settings import load_settings, upsert_settings, generate_complete_settings_dict
from .propGroups.prop_groups import generate_propertyGroups_for_components
from .components.metadata import ensure_metadata_for_all_items
from .utils import add_component_to_ui_list

View File

@ -1,9 +1,10 @@
import json
import bpy
from .constants import HIDDEN_COMPONENTS
from bpy.props import StringProperty, EnumProperty
from bpy_types import Operator
from ...core.helpers_collections import set_active_collection
from .constants import HIDDEN_COMPONENTS
from blenvy.core.helpers_collections import (set_active_collection)
import json
def select_area(context, area_name):
for area in context.screen.areas:

View File

@ -2,7 +2,7 @@ import os
import bpy
from bpy_types import (Operator)
from bpy.props import (StringProperty)
from ..core.helpers_collections import set_active_collection
from blenvy.core.helpers_collections import set_active_collection
class BLENVY_OT_blueprint_select(Operator):
"""Select blueprint """

View File

@ -3,8 +3,9 @@ import bpy
from bpy_types import (PropertyGroup)
from bpy.props import (BoolProperty, EnumProperty, PointerProperty, StringProperty, CollectionProperty, IntProperty)
from ..settings import upsert_settings, load_settings, generate_complete_settings_dict
from ..add_ons.auto_export.settings import AutoExportSettings
from ..add_ons.bevy_components.settings import ComponentsSettings
import blenvy.add_ons.auto_export.settings as auto_export_settings
import blenvy.add_ons.bevy_components.settings as component_settings
# list of settings we do NOT want to save
settings_black_list = ['settings_save_enabled', 'level_scene_selector', 'library_scene_selector']
@ -126,8 +127,8 @@ class BlenvyManager(PropertyGroup):
) # type: ignore
# sub ones
auto_export: PointerProperty(type=AutoExportSettings) # type: ignore
components: PointerProperty(type=ComponentsSettings) # type: ignore
auto_export: PointerProperty(type=auto_export_settings.AutoExportSettings) # type: ignore
components: PointerProperty(type=component_settings.ComponentsSettings) # type: ignore
level_scene_selector: PointerProperty(type=bpy.types.Scene, name="level scene", description="level scene picker", poll=is_scene_already_in_use, update=save_settings)# type: ignore
library_scene_selector: PointerProperty(type=bpy.types.Scene, name="library scene", description="library scene picker", poll=is_scene_already_in_use, update=save_settings)# type: ignore

View File

@ -1,8 +1,7 @@
import bpy
import blenvy.add_ons.bevy_components.ui as components_ui
import blenvy.add_ons.auto_export.ui as auto_export_ui
# from ...bevy_components.components import ui# as components_ui
from ...add_ons.bevy_components import ui as components_ui
from ...add_ons.auto_export import ui as auto_export_ui
######################################################
## ui logic & co