mirror of
https://github.com/kaosat-dev/Blender_bevy_components_workflow.git
synced 2024-11-22 20:00:53 +00:00
feat(bevy_components): lot more cleanups & fixes
* fixed issues with initial insertion of map key/value pairs * overhauled & upgraded tests * changed internals of rename components * cleanups everwhere ! * tweaks & minor improvements all around
This commit is contained in:
parent
7e6805f221
commit
03c3d397a7
@ -212,14 +212,18 @@ UI:
|
||||
=========================================
|
||||
Restructuring of storage of components
|
||||
- [x] marking of invalid root propgroups/components should be based on long name
|
||||
- [ ] overhaul & check each prop group type's use of short names => long names
|
||||
- [ ] lists
|
||||
- [ ] property_name = short_name in process enum: will likely require to use another indirection helper to keep the propery names short
|
||||
- [x] overhaul & check each prop group type's use of short names => long names
|
||||
- [x] lists
|
||||
- [x] property_name = short_name in process enum: will likely require to use another indirection helper to keep the propery names short
|
||||
|
||||
- [x] in conversions from propgroups
|
||||
component_name = definition["short_name"]
|
||||
- [ ] fix is_component_valid that is used in gltf_auto_export
|
||||
- [x] update all tests
|
||||
|
||||
- Hashmap Support
|
||||
- [ ] fix parsing of keys's type either on Bevy side (prefered, unlikely to be possible) or on the Blender side
|
||||
- [x] fix parsing of keys's type either on Bevy side (prefered) or on the Blender side
|
||||
- [x] fix weird issue with missing "0" property when adding new entry in empty hashmap => happens only if the values for the "setter" have never been set
|
||||
- [ ] handle missing types in registry for keys & values
|
||||
|
||||
- Add correct upgrade handling from individual component to bevy_components
|
@ -2,6 +2,8 @@ import json
|
||||
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
|
||||
|
||||
class GENERIC_MAP_OT_actions(Operator):
|
||||
"""Move items up and down, add and remove"""
|
||||
bl_idname = "generic_map.map_action"
|
||||
@ -47,7 +49,6 @@ class GENERIC_MAP_OT_actions(Operator):
|
||||
key_setter = getattr(propertyGroup, "keys_setter")
|
||||
value_setter = getattr(propertyGroup, "values_setter")
|
||||
|
||||
|
||||
if self.action == 'DOWN' and index < len(keys_list) - 1:
|
||||
#item_next = scn.rule_list[index + 1].name
|
||||
keys_list.move(index, index + 1)
|
||||
@ -67,23 +68,23 @@ class GENERIC_MAP_OT_actions(Operator):
|
||||
|
||||
if self.action == 'ADD':
|
||||
print("keys_list", keys_list)
|
||||
|
||||
# first we gather all key/value pairs
|
||||
hashmap = {}
|
||||
for index, key in enumerate(keys_list):
|
||||
key_entry = {}
|
||||
for field_name in key.field_names:
|
||||
print("field name", field_name, key)
|
||||
key_entry[field_name] = key[field_name]
|
||||
key_entry[field_name] = getattr(key, field_name, None)
|
||||
value_entry = {}
|
||||
for field_name in values_list[index].field_names:
|
||||
value_entry[field_name] = values_list[index][field_name]
|
||||
|
||||
hashmap[json.dumps(key_entry)] = index #{"value": json.dumps(value_entry), "index": index}
|
||||
hashmap[json.dumps(key_entry)] = index
|
||||
print("hashmap", hashmap )
|
||||
|
||||
# we need to find the index of a specific value
|
||||
# then we need to find the index of a specific value if it exists
|
||||
key_entry = {}
|
||||
for field_name in key_setter.field_names:
|
||||
key_entry[field_name] = key_setter[field_name]
|
||||
key_entry[field_name] = getattr(key_setter, field_name, None)
|
||||
key_to_add = json.dumps(key_entry)
|
||||
existing_index = hashmap.get(key_to_add, None)
|
||||
print("existing_index", existing_index)
|
||||
@ -93,12 +94,18 @@ class GENERIC_MAP_OT_actions(Operator):
|
||||
key = keys_list.add()
|
||||
# copy the values over
|
||||
for field_name in key_setter.field_names:
|
||||
key[field_name] = key_setter[field_name]
|
||||
val = getattr(key_setter, field_name, None)
|
||||
if val is not None:
|
||||
key[field_name] = val
|
||||
# TODO: add error handling
|
||||
|
||||
value = values_list.add()
|
||||
# copy the values over
|
||||
for field_name in value_setter.field_names:
|
||||
value[field_name] = value_setter[field_name]
|
||||
val = getattr(value_setter, field_name, None)
|
||||
if val is not None:
|
||||
value[field_name] = val
|
||||
# TODO: add error handling
|
||||
|
||||
propertyGroup.list_index = index + 1 # we use this to force the change detection
|
||||
propertyGroup.values_index = index + 1 # we use this to force the change detection
|
||||
|
@ -122,16 +122,11 @@ def upsert_bevy_component(object, long_name, value):
|
||||
def remove_bevy_component(object, long_name):
|
||||
if 'bevy_components' in object:
|
||||
bevy_components = json.loads(object['bevy_components'])
|
||||
del bevy_components[long_name]
|
||||
object['bevy_components'] = json.dumps(bevy_components)
|
||||
|
||||
def rename_bevy_component(object, original_long_name, new_long_name):
|
||||
if 'bevy_components' in object:
|
||||
bevy_components = json.loads(object['bevy_components'])
|
||||
original_component = bevy_components.get(original_long_name, None)
|
||||
bevy_components[new_long_name] = original_component
|
||||
del bevy_components[original_long_name]
|
||||
object['bevy_components'] = json.dumps(bevy_components)
|
||||
if long_name in bevy_components:
|
||||
del bevy_components[long_name]
|
||||
object['bevy_components'] = json.dumps(bevy_components)
|
||||
if long_name in object:
|
||||
del object[long_name]
|
||||
|
||||
def get_bevy_components(object):
|
||||
if 'bevy_components' in object:
|
||||
@ -176,17 +171,12 @@ def add_component_to_object(object, component_definition, value=None):
|
||||
property_group_value_from_custom_property_value(propertyGroup, definition, registry, value)
|
||||
del object["__disable__update"]
|
||||
|
||||
# object[short_name] = value
|
||||
print("ADDING VAALUEEE", value)
|
||||
upsert_bevy_component(object, long_name, value)
|
||||
#ping_depsgraph_update(object)
|
||||
|
||||
|
||||
def upsert_component_in_object(object, long_name, registry):
|
||||
# print("upsert_component_in_object", object, "component name", component_name)
|
||||
# TODO: upsert this part too ?
|
||||
target_components_metadata = object.components_meta.components
|
||||
print("target_components_metadata", target_components_metadata)
|
||||
component_definition = registry.type_infos.get(long_name, None)
|
||||
if component_definition != None:
|
||||
short_name = component_definition["short_name"]
|
||||
@ -197,7 +187,7 @@ def upsert_component_in_object(object, long_name, registry):
|
||||
component_meta = next(filter(lambda component: component["long_name"] == long_name, target_components_metadata), None)
|
||||
if not component_meta:
|
||||
component_meta = target_components_metadata.add()
|
||||
component_meta.name = short_name
|
||||
component_meta.short_name = short_name
|
||||
component_meta.long_name = long_name
|
||||
propertyGroup = getattr(component_meta, property_group_name, None)
|
||||
else: # this one has metadata but we check that the relevant property group is present
|
||||
@ -300,7 +290,7 @@ def apply_customProperty_values_to_object_propertyGroups(object):
|
||||
source_componentMeta = next(filter(lambda component: component["long_name"] == component_name, components_metadata), None)
|
||||
# matching component means we already have this type of component
|
||||
propertyGroup = getattr(source_componentMeta, property_group_name, None)
|
||||
customProperty_value = object[component_name]
|
||||
customProperty_value = get_bevy_component_value_by_long_name(object, component_name)
|
||||
#value = property_group_value_to_custom_property_value(propertyGroup, component_definition, registry, None)
|
||||
|
||||
object["__disable__update"] = True # disable update callback while we set the values of the propertyGroup "tree" (as a propertyGroup can contain other propertyGroups)
|
||||
@ -311,8 +301,10 @@ def apply_customProperty_values_to_object_propertyGroups(object):
|
||||
|
||||
# removes the given component from the object: removes both the custom property and the matching metadata from the object
|
||||
def remove_component_from_object(object, component_name):
|
||||
# remove the component value
|
||||
remove_bevy_component(object, component_name)
|
||||
|
||||
# now remove the component's metadata
|
||||
components_metadata = getattr(object, "components_meta", None)
|
||||
if components_metadata == None:
|
||||
return False
|
||||
@ -332,6 +324,19 @@ def add_component_from_custom_property(object):
|
||||
add_metadata_to_components_without_metadata(object)
|
||||
apply_customProperty_values_to_object_propertyGroups(object)
|
||||
|
||||
def rename_component(object, original_long_name, new_long_name):
|
||||
registry = bpy.context.window_manager.components_registry
|
||||
type_infos = registry.type_infos
|
||||
component_definition = type_infos[new_long_name]
|
||||
|
||||
component_ron_value = get_bevy_component_value_by_long_name(object=object, long_name=original_long_name)
|
||||
if component_ron_value is None and original_long_name in object:
|
||||
component_ron_value = object[original_long_name]
|
||||
|
||||
remove_component_from_object(object, original_long_name)
|
||||
add_component_to_object(object, component_definition, component_ron_value)
|
||||
|
||||
|
||||
def toggle_component(object, component_name):
|
||||
components_in_object = object.components_meta.components
|
||||
component_meta = next(filter(lambda component: component["long_name"] == component_name, components_in_object), None)
|
||||
|
@ -4,7 +4,7 @@ import bpy
|
||||
from bpy_types import Operator
|
||||
from bpy.props import (StringProperty)
|
||||
|
||||
from .metadata import add_component_from_custom_property, add_component_to_object, apply_propertyGroup_values_to_object_customProperties_for_component, copy_propertyGroup_values_to_another_object, get_bevy_component_value_by_long_name, get_bevy_components, is_bevy_component_in_object, remove_component_from_object, rename_bevy_component, toggle_component
|
||||
from .metadata import add_component_from_custom_property, add_component_to_object, apply_propertyGroup_values_to_object_customProperties_for_component, copy_propertyGroup_values_to_another_object, get_bevy_component_value_by_long_name, get_bevy_components, is_bevy_component_in_object, remove_component_from_object, rename_component, toggle_component
|
||||
|
||||
class AddComponentOperator(Operator):
|
||||
"""Add Bevy component to object"""
|
||||
@ -214,31 +214,10 @@ class OT_rename_component(Operator):
|
||||
if original_name != '' and new_name != '' and original_name != new_name and len(target_objects) > 0:
|
||||
for index, object_name in enumerate(target_objects):
|
||||
object = bpy.data.objects[object_name]
|
||||
if object and original_name in get_bevy_components(object):
|
||||
|
||||
# copy data to new component, remove the old one
|
||||
try:
|
||||
rename_bevy_component(object=object, original_long_name=original_name, new_long_name=new_name)
|
||||
remove_component_from_object(object, original_name)
|
||||
except Exception as error:
|
||||
if '__disable__update' in object:
|
||||
del object["__disable__update"] # make sure custom properties are updateable afterwards, even in the case of failure
|
||||
# get metadata
|
||||
components_metadata = getattr(object, "components_meta", None)
|
||||
if components_metadata:
|
||||
components_metadata = components_metadata.components
|
||||
component_meta = next(filter(lambda component: component["long_name"] == new_name, components_metadata), None)
|
||||
if component_meta:
|
||||
component_meta.invalid = True
|
||||
component_meta.invalid_details = "unknow issue when renaming/transforming component, please remove it & add it back again"
|
||||
|
||||
errors.append( "failed to copy old component value to new component: object: '" + object.name + "', error: " + str(error))
|
||||
|
||||
if object and original_name in get_bevy_components(object) or original_name in object:
|
||||
try:
|
||||
# attempt conversion
|
||||
long_name = new_name
|
||||
component_definition = type_infos[long_name]
|
||||
add_component_to_object(object, component_definition, get_bevy_component_value_by_long_name(object, new_name))
|
||||
rename_component(object=object, original_long_name=original_name, new_long_name=new_name)
|
||||
except Exception as error:
|
||||
if '__disable__update' in object:
|
||||
del object["__disable__update"] # make sure custom properties are updateable afterwards, even in the case of failure
|
||||
|
@ -20,7 +20,7 @@ def draw_propertyGroup( propertyGroup, layout, nesting =[], rootName=None):
|
||||
display_name = field_names[0] if propertyGroup.tupple_or_struct == "struct" else ""
|
||||
subrow.prop(propertyGroup, field_names[0], text=display_name)
|
||||
subrow.separator()
|
||||
selection = getattr(propertyGroup, field_names[0])
|
||||
selection = getattr(propertyGroup, "selection")
|
||||
|
||||
for fname in field_names[1:]:
|
||||
if fname == "variant_" + selection:
|
||||
|
@ -28,12 +28,11 @@ conversion_tables = {
|
||||
#converts the value of a property group(no matter its complexity) into a single custom property value
|
||||
# this is more or less a glorified "to_ron()" method (not quite but close to)
|
||||
def property_group_value_to_custom_property_value(property_group, definition, registry, parent=None, value=None):
|
||||
print('definition', definition)
|
||||
long_name = definition["long_name"]
|
||||
type_info = definition["typeInfo"] if "typeInfo" in definition else None
|
||||
type_def = definition["type"] if "type" in definition else None
|
||||
is_value_type = long_name in conversion_tables
|
||||
# print("computing custom property: component name:", long_name, "type_info", type_info, "type_def", type_def)
|
||||
print("computing custom property: component name:", long_name, "type_info", type_info, "type_def", type_def, "value", value)
|
||||
|
||||
if is_value_type:
|
||||
value = conversion_tables[long_name](value)
|
||||
@ -89,11 +88,7 @@ def property_group_value_to_custom_property_value(property_group, definition, re
|
||||
|
||||
value = tuple(e for e in list(values.values()))
|
||||
elif type_info == "Enum":
|
||||
short_name = definition["short_name"]
|
||||
print("ENUM", definition, property_group.field_names, long_name)
|
||||
# TODO: perhaps use a mapping of (long) component name to a short ID , like we do in get_propertyGroupName_from_longName
|
||||
selected = getattr(property_group, short_name)
|
||||
|
||||
selected = getattr(property_group, "selection")
|
||||
if type_def == "object":
|
||||
selection_index = property_group.field_names.index("variant_"+selected)
|
||||
variant_name = property_group.field_names[selection_index]
|
||||
@ -174,7 +169,6 @@ def property_group_value_to_custom_property_value(property_group, definition, re
|
||||
value = value.replace("'", "")
|
||||
|
||||
if parent == None:
|
||||
print("transforming value", value, definition)
|
||||
value = str(value).replace("'", "")
|
||||
value = value.replace(",)",")")
|
||||
value = value.replace("{", "(").replace("}", ")") # FIXME: deal with hashmaps
|
||||
|
@ -268,7 +268,7 @@ def property_group_value_from_custom_property_value(property_group, definition,
|
||||
selection_index = property_group.field_names.index(chosen_variant_name)
|
||||
variant_definition = definition["oneOf"][selection_index-1]
|
||||
# first we set WHAT variant is selected
|
||||
setattr(property_group, field_names[0], chosen_variant_raw)
|
||||
setattr(property_group, "selection", chosen_variant_raw)
|
||||
|
||||
# and then we set the value of the variant
|
||||
if "prefixItems" in variant_definition:
|
||||
|
@ -7,7 +7,7 @@ def process_enum(registry, definition, update, nesting, nesting_long_names):
|
||||
long_name = definition["long_name"]
|
||||
|
||||
type_def = definition["type"] if "type" in definition else None
|
||||
values = definition["oneOf"]
|
||||
variants = definition["oneOf"]
|
||||
|
||||
nesting = nesting + [short_name]
|
||||
nesting_long_names = nesting_long_names = [long_name]
|
||||
@ -15,59 +15,53 @@ def process_enum(registry, definition, update, nesting, nesting_long_names):
|
||||
__annotations__ = {}
|
||||
original_type_name = "enum"
|
||||
|
||||
#print("processing enum", short_name, definition)
|
||||
# print("processing enum", short_name, long_name, definition)
|
||||
|
||||
if type_def == "object":
|
||||
labels = []
|
||||
additional_annotations = {}
|
||||
for item in values:
|
||||
item_name = item["long_name"]
|
||||
item_short_name = item["short_name"] if "short_name" in item else item_name
|
||||
variant_name = "variant_" + item_short_name
|
||||
labels.append(item_name)
|
||||
for variant in variants:
|
||||
variant_name = variant["long_name"]
|
||||
variant_prefixed_name = "variant_" + variant_name
|
||||
labels.append(variant_name)
|
||||
|
||||
if "prefixItems" in item:
|
||||
#print("tupple variant in enum", short_name, item)
|
||||
registry.add_custom_type(item_short_name, item)
|
||||
(sub_component_group, _) = process_component.process_component(registry, item, update, {"nested": True}, nesting, nesting_long_names)
|
||||
additional_annotations[variant_name] = sub_component_group
|
||||
elif "properties" in item:
|
||||
#print("struct variant in enum", short_name, item)
|
||||
registry.add_custom_type(item_short_name, item)
|
||||
(sub_component_group, _) = process_component.process_component(registry, item, update, {"nested": True}, nesting, nesting_long_names)
|
||||
additional_annotations[variant_name] = sub_component_group
|
||||
if "prefixItems" in variant:
|
||||
#print("tupple variant in enum", variant)
|
||||
registry.add_custom_type(variant_name, variant)
|
||||
(sub_component_group, _) = process_component.process_component(registry, variant, update, {"nested": True}, nesting, nesting_long_names)
|
||||
additional_annotations[variant_prefixed_name] = sub_component_group
|
||||
elif "properties" in variant:
|
||||
#print("struct variant in enum", variant)
|
||||
registry.add_custom_type(variant_name, variant)
|
||||
(sub_component_group, _) = process_component.process_component(registry, variant, update, {"nested": True}, nesting, nesting_long_names)
|
||||
additional_annotations[variant_prefixed_name] = sub_component_group
|
||||
else: # for the cases where it's neither a tupple nor a structs: FIXME: not 100% sure of this
|
||||
#print("other variant in enum", short_name)
|
||||
annotations = {"variant_"+item_name: StringProperty(default="----<ignore_field>----")}
|
||||
#print("other variant in enum")
|
||||
annotations = {"variant_"+variant_name: StringProperty(default="----<ignore_field>----")}
|
||||
additional_annotations = additional_annotations | annotations
|
||||
|
||||
items = tuple((e, e, e) for e in labels)
|
||||
property_name = short_name
|
||||
|
||||
blender_property_def = blender_property_mapping[original_type_name]
|
||||
blender_property = blender_property_def["type"](
|
||||
**blender_property_def["presets"],# we inject presets first
|
||||
name = property_name,
|
||||
items=items,
|
||||
items=items, # this is needed by Blender's EnumProperty , which we are using here
|
||||
update= update
|
||||
)
|
||||
__annotations__[property_name] = blender_property
|
||||
__annotations__["selection"] = blender_property
|
||||
|
||||
for a in additional_annotations:
|
||||
__annotations__[a] = additional_annotations[a]
|
||||
# enum_value => what field to display
|
||||
# a second field + property for the "content" of the enum
|
||||
else:
|
||||
items = tuple((e, e, "") for e in values)
|
||||
property_name = short_name
|
||||
|
||||
items = tuple((e, e, "") for e in variants)
|
||||
blender_property_def = blender_property_mapping[original_type_name]
|
||||
blender_property = blender_property_def["type"](
|
||||
**blender_property_def["presets"],# we inject presets first
|
||||
name = property_name,
|
||||
items=items,
|
||||
update= update
|
||||
)
|
||||
__annotations__[property_name] = blender_property
|
||||
__annotations__["selection"] = blender_property
|
||||
|
||||
return __annotations__
|
||||
|
@ -12,8 +12,8 @@ def process_map(registry, definition, update, nesting=[], nesting_long_names=[])
|
||||
nesting = nesting + [short_name]
|
||||
nesting_long_names = nesting_long_names + [long_name]
|
||||
|
||||
value_ref_name = definition["additionalProperties"]["type"]["$ref"].replace("#/$defs/", "")
|
||||
key_ref_name = long_name.split(',')[0].split('<')[1]# FIXME: hack !!!
|
||||
value_ref_name = definition["valueType"]["type"]["$ref"].replace("#/$defs/", "")
|
||||
key_ref_name = definition["keyType"]["type"]["$ref"].replace("#/$defs/", "")
|
||||
|
||||
#print("definition", definition)
|
||||
__annotations__ = {}
|
||||
@ -21,11 +21,11 @@ def process_map(registry, definition, update, nesting=[], nesting_long_names=[])
|
||||
key_definition = type_infos[key_ref_name]
|
||||
original_long_name = key_definition["long_name"]
|
||||
is_key_value_type = original_long_name in value_types_defaults
|
||||
definition_link = f"#/$defs/{key_ref_name}"
|
||||
definition_link = definition["keyType"]["type"]["$ref"]
|
||||
|
||||
#if the content of the list is a unit type, we need to generate a fake wrapper, otherwise we cannot use layout.prop(group, "propertyName") as there is no propertyName !
|
||||
if is_key_value_type:
|
||||
keys_property_group_class = generate_wrapper_propertyGroup(f"{long_name}_values", original_long_name, definition_link, registry, update)
|
||||
keys_property_group_class = generate_wrapper_propertyGroup(f"{long_name}_keys", original_long_name, definition_link, registry, update)
|
||||
else:
|
||||
(_, list_content_group_class) = process_component.process_component(registry, key_definition, update, {"nested": True, "long_name": original_long_name}, nesting, nesting_long_names)
|
||||
keys_property_group_class = list_content_group_class
|
||||
@ -42,11 +42,11 @@ def process_map(registry, definition, update, nesting=[], nesting_long_names=[])
|
||||
value_definition = type_infos[value_ref_name]
|
||||
original_long_name = value_definition["long_name"]
|
||||
is_value_value_type = original_long_name in value_types_defaults
|
||||
definition_link = definition["additionalProperties"]["type"]["$ref"]#f"#/$defs/{value_ref_name}"
|
||||
definition_link = definition["valueType"]["type"]["$ref"]
|
||||
|
||||
#if the content of the list is a unit type, we need to generate a fake wrapper, otherwise we cannot use layout.prop(group, "propertyName") as there is no propertyName !
|
||||
if is_value_value_type:
|
||||
values_property_group_class = generate_wrapper_propertyGroup(f"{long_name}_keys", original_long_name, definition_link, registry, update)
|
||||
values_property_group_class = generate_wrapper_propertyGroup(f"{long_name}_values", original_long_name, definition_link, registry, update)
|
||||
else:
|
||||
(_, list_content_group_class) = process_component.process_component(registry, value_definition, update, {"nested": True, "long_name": original_long_name}, nesting, nesting_long_names)
|
||||
values_property_group_class = list_content_group_class
|
||||
|
@ -40,6 +40,8 @@ def generate_wrapper_propertyGroup(wrapped_type_long_name_name, item_long_name,
|
||||
blender_property = StringProperty(default="", update=update)
|
||||
if item_long_name in blender_property_mapping:
|
||||
value = value_types_defaults[item_long_name] if is_item_value_type else None
|
||||
print("AAAAAAAAAAAAH", wrapped_type_long_name_name, value)
|
||||
|
||||
blender_property_def = blender_property_mapping[item_long_name]
|
||||
blender_property = blender_property_def["type"](
|
||||
**blender_property_def["presets"],# we inject presets first
|
||||
|
@ -118,10 +118,10 @@ class COMPONENTS_OT_REFRESH_PROPGROUPS_FROM_CUSTOM_PROPERTIES_CURRENT(Operator):
|
||||
bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1)
|
||||
except:pass # ony run in ui
|
||||
|
||||
except Exception as error:
|
||||
except Exception as error_message:
|
||||
del object["__disable__update"] # make sure custom properties are updateable afterwards, even in the case of failure
|
||||
error = True
|
||||
self.report({'ERROR'}, "Failed to update propertyGroup values from custom property: Error:" + str(error))
|
||||
self.report({'ERROR'}, "Failed to update propertyGroup values from custom property: Error:" + str(error_message))
|
||||
if not error:
|
||||
self.report({'INFO'}, "Sucessfully generated UI values for custom properties for selected object")
|
||||
context.window_manager.components_from_custom_properties_progress = -1.0
|
||||
|
@ -131,7 +131,6 @@ class BEVY_COMPONENTS_PT_AdvancedToolsPanel(bpy.types.Panel):
|
||||
components_metadata = object.components_meta.components
|
||||
comp_names = []
|
||||
for index, component_meta in enumerate(components_metadata):
|
||||
short_name = component_meta.name
|
||||
long_name = component_meta.long_name
|
||||
if component_meta.invalid:
|
||||
self.draw_invalid_or_unregistered(layout, "Invalid", long_name, object)
|
||||
@ -146,7 +145,7 @@ class BEVY_COMPONENTS_PT_AdvancedToolsPanel(bpy.types.Panel):
|
||||
comp_names.append(long_name)
|
||||
|
||||
for custom_property in object.keys():
|
||||
if custom_property != 'components_meta' and custom_property not in comp_names:
|
||||
if custom_property != 'components_meta' and custom_property != 'bevy_components' and custom_property not in comp_names:
|
||||
self.draw_invalid_or_unregistered(layout, "Unregistered", custom_property, object)
|
||||
|
||||
if not object.name in objects_with_invalid_components:
|
||||
|
@ -162,7 +162,7 @@ def component_values_shuffler(seed=1, property_group=None, definition=None, regi
|
||||
selected = random.choice(available_variants)
|
||||
|
||||
# set selected variant
|
||||
setattr(property_group , component_name, selected)
|
||||
setattr(property_group , "selection", selected)
|
||||
|
||||
if type_def == "object":
|
||||
selection_index = property_group.field_names.index("variant_"+selected)
|
||||
|
@ -1,444 +1,555 @@
|
||||
|
||||
|
||||
expected_custom_property_values = {'AComponentWithAnExtremlyExageratedOrMaybeNotButCouldBeNameOrWut': '()',
|
||||
'Aabb': '(center: Vec3A(x:0.0, y:0.0, z:0.0), half_extents: Vec3A(x:0.0, y:0.0, z:0.0))',
|
||||
'AdditionalMassProperties': 'Mass(0.0)',
|
||||
'AnimationPlayer': '(animation: "", paused: true)',
|
||||
'Animations': '(named_animations: "")',
|
||||
'AutoAABBCollider': 'Cuboid',
|
||||
'BackgroundColor': '(Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0))',
|
||||
'BasicTest': '(a: 0.0, b: 0, c: " ")',
|
||||
'BlenderBackgroundShader': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), strength: 0.0)',
|
||||
'BlenderLightShadows': '(buffer_bias: 0.0, enabled: true)',
|
||||
'BlenderShadowSettings': '(cascade_size: 0)',
|
||||
'BloomSettings': '(composite_mode: EnergyConserving, high_pass_frequency: 0.0, intensity: 0.0, low_frequency_boost: '
|
||||
'0.0, low_frequency_boost_curvature: 0.0, prefilter_settings: (threshold: 0.0, threshold_softness: '
|
||||
'0.0))',
|
||||
'BlueprintName': '(" ")',
|
||||
'BlueprintsList': '("")',
|
||||
'BorderColor': '(Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0))',
|
||||
'Button': '()',
|
||||
'CalculatedClip': '(clip: (max: Vec2(x:0.0, y:0.0), min: Vec2(x:0.0, y:0.0)))',
|
||||
'Camera': '(clear_color: Default, hdr: true, is_active: true, msaa_writeback: true, order: 0, viewport: None)',
|
||||
'Camera2d': '()',
|
||||
'Camera3d': '(depth_load_op: Clear(0.0), depth_texture_usages: (0), screen_space_specular_transmission_quality: Low, '
|
||||
'screen_space_specular_transmission_steps: 0)',
|
||||
'CameraMainTextureUsages': 'None',
|
||||
'CameraRenderGraph': 'None',
|
||||
'CameraTrackable': '()',
|
||||
'CameraTracking': '(offset: Vec3(x:0.0, y:0.0, z:0.0))',
|
||||
'CameraTrackingOffset': '(Vec3(x:0.0, y:0.0, z:0.0))',
|
||||
'CascadeShadowConfig': '(bounds: [], minimum_distance: 0.0, overlap_proportion: 0.0)',
|
||||
'Cascades': '(cascades: "")',
|
||||
'CascadesFrusta': '()',
|
||||
'CascadesVisibleEntities': '()',
|
||||
'Ccd': '(enabled: true)',
|
||||
'Children': '([])',
|
||||
'ClusterConfig': 'None',
|
||||
'Collider': 'Ball(0.0)',
|
||||
'CollidingEntities': '("")',
|
||||
'CollisionGroups': '(filters: (0), memberships: (0))',
|
||||
'ColorGrading': '(exposure: 0.0, gamma: 0.0, post_saturation: 0.0, pre_saturation: 0.0)',
|
||||
'ContactForceEventThreshold': '(0.0)',
|
||||
'ContentSize': '()',
|
||||
'ContrastAdaptiveSharpeningSettings': '(denoise: true, enabled: true, sharpening_strength: 0.0)',
|
||||
'CubemapFrusta': '()',
|
||||
'CubemapVisibleEntities': '()',
|
||||
'Damping': '(angular_damping: 0.0, linear_damping: 0.0)',
|
||||
'DebandDither': 'Disabled',
|
||||
'DirectionalLight': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), illuminance: 0.0, shadow_depth_bias: 0.0, '
|
||||
'shadow_normal_bias: 0.0, shadows_enabled: true)',
|
||||
'Dominance': '(groups: 0)',
|
||||
'EnumComplex': 'Float(0.0)',
|
||||
'EnumTest': 'Metal',
|
||||
'Exposure': 'None',
|
||||
'ExternalForce': '(force: Vec3(x:0.0, y:0.0, z:0.0), torque: Vec3(x:0.0, y:0.0, z:0.0))',
|
||||
'ExternalImpulse': '(impulse: Vec3(x:0.0, y:0.0, z:0.0), torque_impulse: Vec3(x:0.0, y:0.0, z:0.0))',
|
||||
'FocusPolicy': 'Block',
|
||||
'FogSettings': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), directional_light_color: Rgba(red:1.0, '
|
||||
'green:1.0, blue:0.0, alpha:1.0), directional_light_exponent: 0.0, falloff: Linear(end: 0.0, start: '
|
||||
'0.0))',
|
||||
'Friction': '(coefficient: 0.0, combine_rule: "")',
|
||||
'Frustum': '()',
|
||||
'Fxaa': '(edge_threshold: "", edge_threshold_min: "", enabled: true)',
|
||||
'GlobalTransform': '((matrix3: (x_axis: Vec3A(x:0.0, y:0.0, z:0.0), y_axis: Vec3A(x:0.0, y:0.0, z:0.0), z_axis: '
|
||||
'Vec3A(x:0.0, y:0.0, z:0.0)), translation: Vec3A(x:0.0, y:0.0, z:0.0)))',
|
||||
'GltfExtras': '(value: " ")',
|
||||
'GltfProcessed': '()',
|
||||
'GravityScale': '(0.0)',
|
||||
'Group': '(0)',
|
||||
'Handle<()>': 'Strong("")',
|
||||
'Handle<AnimationClip>': 'Strong("")',
|
||||
'Handle<AudioSource>': 'Strong("")',
|
||||
'Handle<ColorMaterial>': 'Strong("")',
|
||||
'Handle<DynamicScene>': 'Strong("")',
|
||||
'Handle<ExtendedMaterial<StandardMaterial, MyExtension>>': 'Strong("")',
|
||||
'Handle<Font>': 'Strong("")',
|
||||
'Handle<Gltf>': 'Strong("")',
|
||||
'Handle<GltfMesh>': 'Strong("")',
|
||||
'Handle<GltfNode>': 'Strong("")',
|
||||
'Handle<GltfPrimitive>': 'Strong("")',
|
||||
'Handle<Image>': 'Strong("")',
|
||||
'Handle<LineGizmo>': 'Strong("")',
|
||||
'Handle<LoadedFolder>': 'Strong("")',
|
||||
'Handle<LoadedUntypedAsset>': 'Strong("")',
|
||||
'Handle<Mesh>': 'Strong("")',
|
||||
'Handle<Pitch>': 'Strong("")',
|
||||
'Handle<Scene>': 'Strong("")',
|
||||
'Handle<Shader>': 'Strong("")',
|
||||
'Handle<SkinnedMeshInverseBindposes>': 'Strong("")',
|
||||
'Handle<StandardDynamicAssetCollection>': 'Strong("")',
|
||||
'Handle<StandardMaterial>': 'Strong("")',
|
||||
'Handle<TextureAtlasLayout>': 'Strong("")',
|
||||
'Handle<WireframeMaterial>': 'Strong("")',
|
||||
'ImageScaleMode': 'Sliced((border: "", center_scale_mode: "", max_corner_scale: 0.0, sides_scale_mode: ""))',
|
||||
'InheritedVisibility': '(true)',
|
||||
'Interaction': 'Pressed',
|
||||
'Label': '()',
|
||||
'LightProbe': '()',
|
||||
'LockedAxes': '(0)',
|
||||
'MaterialInfo': '(name: " ", source: " ")',
|
||||
'Mesh2dHandle': '(Strong(""))',
|
||||
'MeshMorphWeights': '(weights: [])',
|
||||
'MorphWeights': '(first_mesh: "", weights: [])',
|
||||
'Name': '(hash: 0, name: " ")',
|
||||
'NestedTupleStuff': '(0.0, 0, (basic: (a: 0.0, b: 0, c: " "), color: (Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0)), '
|
||||
'colors_list: ([]), enable: true, enum_inner: Metal, nested: (vec: (Vec3(x:0.0, y:0.0, z:0.0))), '
|
||||
'text: " ", toggle: (true)))',
|
||||
'NestingTestLevel2': '(basic: (a: 0.0, b: 0, c: " "), color: (Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0)), '
|
||||
'colors_list: ([]), enable: true, enum_inner: Metal, nested: (vec: (Vec3(x:0.0, y:0.0, z:0.0))), '
|
||||
'text: " ", toggle: (true))',
|
||||
'NestingTestLevel3': '(vec: (Vec3(x:0.0, y:0.0, z:0.0)))',
|
||||
'NoFrustumCulling': '()',
|
||||
'NoWireframe': '()',
|
||||
'Node': '(calculated_size: Vec2(x:0.0, y:0.0), outline_offset: 0.0, outline_width: 0.0, stack_index: 0, '
|
||||
'unrounded_size: Vec2(x:0.0, y:0.0))',
|
||||
'NotShadowCaster': '()',
|
||||
'NotShadowReceiver': '()',
|
||||
'OrthographicProjection': '(area: (max: Vec2(x:0.0, y:0.0), min: Vec2(x:0.0, y:0.0)), far: 0.0, near: 0.0, scale: '
|
||||
'0.0, scaling_mode: Fixed(height: 0.0, width: 0.0), viewport_origin: Vec2(x:0.0, y:0.0))',
|
||||
'Outline': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), offset: Auto, width: Auto)',
|
||||
'Parent': '(0)',
|
||||
'PerspectiveProjection': '(aspect_ratio: 0.0, far: 0.0, fov: 0.0, near: 0.0)',
|
||||
'Pickable': '()',
|
||||
'PlaybackSettings': '(mode: Once, paused: true, spatial: true, spatial_scale: "", speed: 0.0, volume: (0.0))',
|
||||
'Player': '()',
|
||||
'PointLight': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), intensity: 0.0, radius: 0.0, range: 0.0, '
|
||||
'shadow_depth_bias: 0.0, shadow_normal_bias: 0.0, shadows_enabled: true)',
|
||||
'PrimaryWindow': '()',
|
||||
'Projection': 'Perspective((aspect_ratio: 0.0, far: 0.0, fov: 0.0, near: 0.0))',
|
||||
'RelativeCursorPosition': '(normalized: "", normalized_visible_node_rect: (max: Vec2(x:0.0, y:0.0), min: Vec2(x:0.0, '
|
||||
'y:0.0)))',
|
||||
'RenderLayers': '(0)',
|
||||
'Restitution': '(coefficient: 0.0, combine_rule: "")',
|
||||
'RigidBody': 'Dynamic',
|
||||
'SSAOSettings': '()',
|
||||
'ScreenSpaceAmbientOcclusionSettings': '(quality_level: "")',
|
||||
'Sensor': '()',
|
||||
'ShadowFilteringMethod': 'Hardware2x2',
|
||||
'SkinnedMesh': '(inverse_bindposes: Strong(""), joints: [])',
|
||||
'Sleeping': '(angular_threshold: 0.0, linear_threshold: 0.0, sleeping: true)',
|
||||
'SolverGroups': '(filters: (0), memberships: (0))',
|
||||
'SpatialListener': '(left_ear_offset: Vec3(x:0.0, y:0.0, z:0.0), right_ear_offset: Vec3(x:0.0, y:0.0, z:0.0))',
|
||||
'SpawnHere': '()',
|
||||
'SpotLight': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), inner_angle: 0.0, intensity: 0.0, outer_angle: '
|
||||
'0.0, radius: 0.0, range: 0.0, shadow_depth_bias: 0.0, shadow_normal_bias: 0.0, shadows_enabled: true)',
|
||||
'Sprite': '(anchor: Center, color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), custom_size: "", flip_x: true, '
|
||||
'flip_y: true, rect: "")',
|
||||
'Style': '(align_content: Default, align_items: Default, align_self: Auto, aspect_ratio: None, border: (bottom: Auto, '
|
||||
'left: Auto, right: Auto, top: Auto), bottom: Auto, column_gap: Auto, direction: Inherit, display: Flex, '
|
||||
'flex_basis: Auto, flex_direction: Row, flex_grow: 0.0, flex_shrink: 0.0, flex_wrap: NoWrap, '
|
||||
'grid_auto_columns: "", grid_auto_flow: Row, grid_auto_rows: "", grid_column: (end: "", span: "", start: '
|
||||
'""), grid_row: (end: "", span: "", start: ""), grid_template_columns: "", grid_template_rows: "", height: '
|
||||
'Auto, justify_content: Default, justify_items: Default, justify_self: Auto, left: Auto, margin: (bottom: '
|
||||
'Auto, left: Auto, right: Auto, top: Auto), max_height: Auto, max_width: Auto, min_height: Auto, min_width: '
|
||||
'Auto, overflow: (x: Visible, y: Visible), padding: (bottom: Auto, left: Auto, right: Auto, top: Auto), '
|
||||
'position_type: Relative, right: Auto, row_gap: Auto, top: Auto, width: Auto)',
|
||||
'Text': '(justify: Left, linebreak_behavior: WordBoundary, sections: [])',
|
||||
'Text2dBounds': '(size: Vec2(x:0.0, y:0.0))',
|
||||
'TextFlags': '(needs_new_measure_func: true, needs_recompute: true)',
|
||||
'TextLayoutInfo': '(glyphs: "", logical_size: Vec2(x:0.0, y:0.0))',
|
||||
'Tonemapping': 'None',
|
||||
'Transform': '(rotation: Quat(x:0.0, y:0.0, z:0.0, w:0.0), scale: Vec3(x:0.0, y:0.0, z:0.0), translation: Vec3(x:0.0, '
|
||||
'y:0.0, z:0.0))',
|
||||
'TupleTest2': '(0.0, 0, " ")',
|
||||
'TupleTestBool': '(true)',
|
||||
'TupleTestColor': '(Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0))',
|
||||
'TupleTestF32': '(0.0)',
|
||||
'TupleTestStr': '(" ")',
|
||||
'TupleTestU64': '(0)',
|
||||
'TupleVec': '([])',
|
||||
'TupleVec2': '(Vec2(x:0.0, y:0.0))',
|
||||
'TupleVec3': '(Vec3(x:0.0, y:0.0, z:0.0))',
|
||||
'TupleVecF32F32': '([])',
|
||||
'UiImage': '(flip_x: true, flip_y: true, texture: Strong(""))',
|
||||
'UiImageSize': '(size: Vec2(x:0.0, y:0.0))',
|
||||
'UnitTest': '()',
|
||||
'VecOfColors': '([])',
|
||||
'VecOfF32s': '([])',
|
||||
'VecOfVec3s2': '([])',
|
||||
'Velocity': '(angvel: Vec3(x:0.0, y:0.0, z:0.0), linvel: Vec3(x:0.0, y:0.0, z:0.0))',
|
||||
'ViewVisibility': '(true)',
|
||||
'Visibility': 'Inherited',
|
||||
'VisibleEntities': '()',
|
||||
'Window': '(canvas: None, composite_alpha_mode: Auto, cursor: (grab_mode: None, hit_test: true, icon: Default, '
|
||||
'visible: true), decorations: true, enabled_buttons: (close: true, maximize: true, minimize: true), '
|
||||
'focused: true, ime_enabled: true, ime_position: Vec2(x:0.0, y:0.0), internal: (maximize_request: None, '
|
||||
'minimize_request: None, physical_cursor_position: None), mode: Windowed, name: None, position: Automatic, '
|
||||
'present_mode: AutoVsync, prevent_default_event_handling: true, resizable: true, resize_constraints: '
|
||||
'(max_height: 0.0, max_width: 0.0, min_height: 0.0, min_width: 0.0), resolution: (physical_height: 0, '
|
||||
'physical_width: 0, scale_factor: 0.0, scale_factor_override: None), title: " ", transparent: true, '
|
||||
'visible: true, window_level: AlwaysOnBottom, window_theme: "")',
|
||||
'Wireframe': '()',
|
||||
'WireframeColor': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0))',
|
||||
'ZIndex': 'Local(0)'}
|
||||
expected_custom_property_values = {'bevy_animation::AnimationPlayer': '(animation: "", paused: true)',
|
||||
'bevy_asset::handle::Handle<()>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_animation::AnimationClip>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_asset::assets::LoadedUntypedAsset>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_asset::folder::LoadedFolder>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_asset_loader::standard_dynamic_asset::StandardDynamicAssetCollection>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_audio::audio_source::AudioSource>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_audio::pitch::Pitch>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_gizmos::LineGizmo>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_gltf::Gltf>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_gltf::GltfMesh>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_gltf::GltfNode>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_gltf::GltfPrimitive>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_pbr::extended_material::ExtendedMaterial<bevy_pbr::pbr_material::StandardMaterial, bevy_example::test_components::MyExtension>>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_pbr::pbr_material::StandardMaterial>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_pbr::wireframe::WireframeMaterial>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_render::mesh::mesh::Mesh>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_render::mesh::mesh::skinning::SkinnedMeshInverseBindposes>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_render::render_resource::shader::Shader>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_render::texture::image::Image>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_scene::dynamic_scene::DynamicScene>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_scene::scene::Scene>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_sprite::mesh2d::color_material::ColorMaterial>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_sprite::texture_atlas::TextureAtlasLayout>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_text::font::Font>': 'Strong("")',
|
||||
'bevy_audio::audio::PlaybackSettings': '(mode: Once, paused: true, spatial: true, spatial_scale: "", speed: 0.0, '
|
||||
'volume: (0.0))',
|
||||
'bevy_audio::audio::SpatialListener': '(left_ear_offset: Vec3(x:0.0, y:0.0, z:0.0), right_ear_offset: Vec3(x:0.0, '
|
||||
'y:0.0, z:0.0))',
|
||||
'bevy_core::name::Name': '(hash: 0, name: " ")',
|
||||
'bevy_core_pipeline::bloom::settings::BloomSettings': '(composite_mode: EnergyConserving, high_pass_frequency: 0.0, '
|
||||
'intensity: 0.0, low_frequency_boost: 0.0, '
|
||||
'low_frequency_boost_curvature: 0.0, prefilter_settings: '
|
||||
'(threshold: 0.0, threshold_softness: 0.0))',
|
||||
'bevy_core_pipeline::contrast_adaptive_sharpening::ContrastAdaptiveSharpeningSettings': '(denoise: true, enabled: '
|
||||
'true, sharpening_strength: '
|
||||
'0.0)',
|
||||
'bevy_core_pipeline::core_2d::camera_2d::Camera2d': '()',
|
||||
'bevy_core_pipeline::core_3d::camera_3d::Camera3d': '(depth_load_op: Clear(0.0), depth_texture_usages: (0), '
|
||||
'screen_space_specular_transmission_quality: Low, '
|
||||
'screen_space_specular_transmission_steps: 0)',
|
||||
'bevy_core_pipeline::fxaa::Fxaa': '(edge_threshold: "", edge_threshold_min: "", enabled: true)',
|
||||
'bevy_core_pipeline::tonemapping::DebandDither': 'Disabled',
|
||||
'bevy_core_pipeline::tonemapping::Tonemapping': 'None',
|
||||
'bevy_example::dupe_components::EnumTest': 'Metal',
|
||||
'bevy_example::game::animation::Marker1': '()',
|
||||
'bevy_example::game::animation::Marker2': '()',
|
||||
'bevy_example::game::animation::Marker3': '()',
|
||||
'bevy_example::game::animation::MarkerFox': '()',
|
||||
'bevy_example::test_components::AComponentWithAnExtremlyExageratedOrMaybeNotButCouldBeNameOrWut': '()',
|
||||
'bevy_example::test_components::BasicTest': '(a: 0.0, b: 0, c: " ")',
|
||||
'bevy_example::test_components::EnumComplex': 'Float(0.0)',
|
||||
'bevy_example::test_components::EnumTest': 'Metal',
|
||||
'bevy_example::test_components::HashmapTestIntColor': '(inner: {})',
|
||||
'bevy_example::test_components::HashmapTestIntString': '(named_animations: {})',
|
||||
'bevy_example::test_components::HashmapTestSimple': '(named_animations: {})',
|
||||
'bevy_example::test_components::HashmapTestStringColor': '(inner: {})',
|
||||
'bevy_example::test_components::HashmapTestStringColorFlat': '({})',
|
||||
'bevy_example::test_components::HashmapTestStringFloat': '(named_animations: {})',
|
||||
'bevy_example::test_components::NestedTupleStuff': '(0.0, 0, (basic: (a: 0.0, b: 0, c: " "), color: (Rgba(red:1.0, '
|
||||
'green:1.0, blue:0.0, alpha:1.0)), colors_list: ([]), enable: '
|
||||
'true, enum_inner: Metal, nested: (vec: (Vec3(x:0.0, y:0.0, '
|
||||
'z:0.0))), text: " ", toggle: (true)))',
|
||||
'bevy_example::test_components::NestingTestLevel2': '(basic: (a: 0.0, b: 0, c: " "), color: (Rgba(red:1.0, green:1.0, '
|
||||
'blue:0.0, alpha:1.0)), colors_list: ([]), enable: true, '
|
||||
'enum_inner: Metal, nested: (vec: (Vec3(x:0.0, y:0.0, z:0.0))), '
|
||||
'text: " ", toggle: (true))',
|
||||
'bevy_example::test_components::NestingTestLevel3': '(vec: (Vec3(x:0.0, y:0.0, z:0.0)))',
|
||||
'bevy_example::test_components::TupleTest2': '(0.0, 0, " ")',
|
||||
'bevy_example::test_components::TupleTestBool': '(true)',
|
||||
'bevy_example::test_components::TupleTestColor': '(Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0))',
|
||||
'bevy_example::test_components::TupleTestF32': '(0.0)',
|
||||
'bevy_example::test_components::TupleTestStr': '(" ")',
|
||||
'bevy_example::test_components::TupleTestU64': '(0)',
|
||||
'bevy_example::test_components::TupleVec': '([])',
|
||||
'bevy_example::test_components::TupleVec2': '(Vec2(x:0.0, y:0.0))',
|
||||
'bevy_example::test_components::TupleVec3': '(Vec3(x:0.0, y:0.0, z:0.0))',
|
||||
'bevy_example::test_components::TupleVecF32F32': '([])',
|
||||
'bevy_example::test_components::UnitTest': '()',
|
||||
'bevy_example::test_components::VecOfColors': '([])',
|
||||
'bevy_example::test_components::VecOfF32s': '([])',
|
||||
'bevy_example::test_components::VecOfVec3s2': '([])',
|
||||
'bevy_gltf::GltfExtras': '(value: " ")',
|
||||
'bevy_gltf_blueprints::animation::AnimationInfos': '(animations: [])',
|
||||
'bevy_gltf_blueprints::animation::AnimationMarkers': '({})',
|
||||
'bevy_gltf_blueprints::animation::BlueprintAnimations': '(named_animations: "")',
|
||||
'bevy_gltf_blueprints::animation::SceneAnimations': '(named_animations: "")',
|
||||
'bevy_gltf_blueprints::materials::MaterialInfo': '(name: " ", source: " ")',
|
||||
'bevy_gltf_blueprints::spawn_from_blueprints::BlueprintName': '(" ")',
|
||||
'bevy_gltf_blueprints::spawn_from_blueprints::BlueprintsList': '({})',
|
||||
'bevy_gltf_blueprints::spawn_from_blueprints::SpawnHere': '()',
|
||||
'bevy_gltf_components::GltfProcessed': '()',
|
||||
'bevy_gltf_components::blender_settings::lighting::BlenderBackgroundShader': '(color: Rgba(red:1.0, green:1.0, '
|
||||
'blue:0.0, alpha:1.0), strength: 0.0)',
|
||||
'bevy_gltf_components::blender_settings::lighting::BlenderLightShadows': '(buffer_bias: 0.0, enabled: true)',
|
||||
'bevy_gltf_components::blender_settings::lighting::BlenderShadowSettings': '(cascade_size: 0)',
|
||||
'bevy_gltf_worlflow_examples_common::core::camera::camera_replace_proxies::SSAOSettings': '()',
|
||||
'bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTrackable': '()',
|
||||
'bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTracking': '(offset: Vec3(x:0.0, y:0.0, '
|
||||
'z:0.0))',
|
||||
'bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTrackingOffset': '(Vec3(x:0.0, y:0.0, '
|
||||
'z:0.0))',
|
||||
'bevy_gltf_worlflow_examples_common::game::picking::Pickable': '()',
|
||||
'bevy_gltf_worlflow_examples_common::game::player::Player': '()',
|
||||
'bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::AutoAABBCollider': 'Cuboid',
|
||||
'bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::Collider': 'Ball(0.0)',
|
||||
'bevy_hierarchy::components::children::Children': '([])',
|
||||
'bevy_hierarchy::components::parent::Parent': '(0)',
|
||||
'bevy_pbr::bundle::CascadesVisibleEntities': '()',
|
||||
'bevy_pbr::bundle::CubemapVisibleEntities': '()',
|
||||
'bevy_pbr::fog::FogSettings': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), directional_light_color: '
|
||||
'Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), directional_light_exponent: 0.0, '
|
||||
'falloff: Linear(end: 0.0, start: 0.0))',
|
||||
'bevy_pbr::light::CascadeShadowConfig': '(bounds: [], minimum_distance: 0.0, overlap_proportion: 0.0)',
|
||||
'bevy_pbr::light::Cascades': '(cascades: "")',
|
||||
'bevy_pbr::light::ClusterConfig': 'None',
|
||||
'bevy_pbr::light::DirectionalLight': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), illuminance: 0.0, '
|
||||
'shadow_depth_bias: 0.0, shadow_normal_bias: 0.0, shadows_enabled: true)',
|
||||
'bevy_pbr::light::NotShadowCaster': '()',
|
||||
'bevy_pbr::light::NotShadowReceiver': '()',
|
||||
'bevy_pbr::light::PointLight': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), intensity: 0.0, radius: 0.0, '
|
||||
'range: 0.0, shadow_depth_bias: 0.0, shadow_normal_bias: 0.0, shadows_enabled: true)',
|
||||
'bevy_pbr::light::ShadowFilteringMethod': 'Hardware2x2',
|
||||
'bevy_pbr::light::SpotLight': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), inner_angle: 0.0, intensity: '
|
||||
'0.0, outer_angle: 0.0, radius: 0.0, range: 0.0, shadow_depth_bias: 0.0, '
|
||||
'shadow_normal_bias: 0.0, shadows_enabled: true)',
|
||||
'bevy_pbr::light_probe::LightProbe': '()',
|
||||
'bevy_pbr::ssao::ScreenSpaceAmbientOcclusionSettings': '(quality_level: "")',
|
||||
'bevy_pbr::wireframe::NoWireframe': '()',
|
||||
'bevy_pbr::wireframe::Wireframe': '()',
|
||||
'bevy_pbr::wireframe::WireframeColor': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0))',
|
||||
'bevy_rapier3d::dynamics::rigid_body::AdditionalMassProperties': 'Mass(0.0)',
|
||||
'bevy_rapier3d::dynamics::rigid_body::Ccd': '(enabled: true)',
|
||||
'bevy_rapier3d::dynamics::rigid_body::Damping': '(angular_damping: 0.0, linear_damping: 0.0)',
|
||||
'bevy_rapier3d::dynamics::rigid_body::Dominance': '(groups: 0)',
|
||||
'bevy_rapier3d::dynamics::rigid_body::ExternalForce': '(force: Vec3(x:0.0, y:0.0, z:0.0), torque: Vec3(x:0.0, y:0.0, '
|
||||
'z:0.0))',
|
||||
'bevy_rapier3d::dynamics::rigid_body::ExternalImpulse': '(impulse: Vec3(x:0.0, y:0.0, z:0.0), torque_impulse: '
|
||||
'Vec3(x:0.0, y:0.0, z:0.0))',
|
||||
'bevy_rapier3d::dynamics::rigid_body::GravityScale': '(0.0)',
|
||||
'bevy_rapier3d::dynamics::rigid_body::LockedAxes': '(0)',
|
||||
'bevy_rapier3d::dynamics::rigid_body::RigidBody': 'Dynamic',
|
||||
'bevy_rapier3d::dynamics::rigid_body::Sleeping': '(angular_threshold: 0.0, linear_threshold: 0.0, sleeping: true)',
|
||||
'bevy_rapier3d::dynamics::rigid_body::Velocity': '(angvel: Vec3(x:0.0, y:0.0, z:0.0), linvel: Vec3(x:0.0, y:0.0, '
|
||||
'z:0.0))',
|
||||
'bevy_rapier3d::geometry::collider::CollidingEntities': '("")',
|
||||
'bevy_rapier3d::geometry::collider::CollisionGroups': '(filters: (0), memberships: (0))',
|
||||
'bevy_rapier3d::geometry::collider::ContactForceEventThreshold': '(0.0)',
|
||||
'bevy_rapier3d::geometry::collider::Friction': '(coefficient: 0.0, combine_rule: "")',
|
||||
'bevy_rapier3d::geometry::collider::Group': '(0)',
|
||||
'bevy_rapier3d::geometry::collider::Restitution': '(coefficient: 0.0, combine_rule: "")',
|
||||
'bevy_rapier3d::geometry::collider::Sensor': '()',
|
||||
'bevy_rapier3d::geometry::collider::SolverGroups': '(filters: (0), memberships: (0))',
|
||||
'bevy_render::camera::camera::Camera': '(clear_color: Default, hdr: true, is_active: true, msaa_writeback: true, '
|
||||
'order: 0, viewport: None)',
|
||||
'bevy_render::camera::camera::CameraMainTextureUsages': 'None',
|
||||
'bevy_render::camera::camera::CameraRenderGraph': 'None',
|
||||
'bevy_render::camera::camera::Exposure': 'None',
|
||||
'bevy_render::camera::projection::OrthographicProjection': '(area: (max: Vec2(x:0.0, y:0.0), min: Vec2(x:0.0, '
|
||||
'y:0.0)), far: 0.0, near: 0.0, scale: 0.0, scaling_mode: '
|
||||
'Fixed(height: 0.0, width: 0.0), viewport_origin: '
|
||||
'Vec2(x:0.0, y:0.0))',
|
||||
'bevy_render::camera::projection::PerspectiveProjection': '(aspect_ratio: 0.0, far: 0.0, fov: 0.0, near: 0.0)',
|
||||
'bevy_render::camera::projection::Projection': 'Perspective((aspect_ratio: 0.0, far: 0.0, fov: 0.0, near: 0.0))',
|
||||
'bevy_render::mesh::mesh::skinning::SkinnedMesh': '(inverse_bindposes: Strong(""), joints: [])',
|
||||
'bevy_render::mesh::morph::MeshMorphWeights': '(weights: [])',
|
||||
'bevy_render::mesh::morph::MorphWeights': '(first_mesh: "", weights: [])',
|
||||
'bevy_render::primitives::Aabb': '(center: Vec3A(x:0.0, y:0.0, z:0.0), half_extents: Vec3A(x:0.0, y:0.0, z:0.0))',
|
||||
'bevy_render::primitives::CascadesFrusta': '()',
|
||||
'bevy_render::primitives::CubemapFrusta': '()',
|
||||
'bevy_render::primitives::Frustum': '()',
|
||||
'bevy_render::view::ColorGrading': '(exposure: 0.0, gamma: 0.0, post_saturation: 0.0, pre_saturation: 0.0)',
|
||||
'bevy_render::view::visibility::InheritedVisibility': '(true)',
|
||||
'bevy_render::view::visibility::NoFrustumCulling': '()',
|
||||
'bevy_render::view::visibility::ViewVisibility': '(true)',
|
||||
'bevy_render::view::visibility::Visibility': 'Inherited',
|
||||
'bevy_render::view::visibility::VisibleEntities': '()',
|
||||
'bevy_render::view::visibility::render_layers::RenderLayers': '(0)',
|
||||
'bevy_sprite::mesh2d::mesh::Mesh2dHandle': '(Strong(""))',
|
||||
'bevy_sprite::sprite::ImageScaleMode': 'Sliced((border: "", center_scale_mode: "", max_corner_scale: 0.0, '
|
||||
'sides_scale_mode: ""))',
|
||||
'bevy_sprite::sprite::Sprite': '(anchor: Center, color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), custom_size: '
|
||||
'"", flip_x: true, flip_y: true, rect: "")',
|
||||
'bevy_text::pipeline::TextLayoutInfo': '(glyphs: "", logical_size: Vec2(x:0.0, y:0.0))',
|
||||
'bevy_text::text2d::Text2dBounds': '(size: Vec2(x:0.0, y:0.0))',
|
||||
'bevy_text::text::Text': '(justify: Left, linebreak_behavior: WordBoundary, sections: [])',
|
||||
'bevy_transform::components::global_transform::GlobalTransform': '((matrix3: (x_axis: Vec3A(x:0.0, y:0.0, z:0.0), '
|
||||
'y_axis: Vec3A(x:0.0, y:0.0, z:0.0), z_axis: '
|
||||
'Vec3A(x:0.0, y:0.0, z:0.0)), translation: '
|
||||
'Vec3A(x:0.0, y:0.0, z:0.0)))',
|
||||
'bevy_transform::components::transform::Transform': '(rotation: Quat(x:0.0, y:0.0, z:0.0, w:0.0), scale: Vec3(x:0.0, '
|
||||
'y:0.0, z:0.0), translation: Vec3(x:0.0, y:0.0, z:0.0))',
|
||||
'bevy_ui::focus::FocusPolicy': 'Block',
|
||||
'bevy_ui::focus::Interaction': 'Pressed',
|
||||
'bevy_ui::focus::RelativeCursorPosition': '(normalized: "", normalized_visible_node_rect: (max: Vec2(x:0.0, y:0.0), '
|
||||
'min: Vec2(x:0.0, y:0.0)))',
|
||||
'bevy_ui::measurement::ContentSize': '()',
|
||||
'bevy_ui::ui_node::BackgroundColor': '(Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0))',
|
||||
'bevy_ui::ui_node::BorderColor': '(Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0))',
|
||||
'bevy_ui::ui_node::CalculatedClip': '(clip: (max: Vec2(x:0.0, y:0.0), min: Vec2(x:0.0, y:0.0)))',
|
||||
'bevy_ui::ui_node::Node': '(calculated_size: Vec2(x:0.0, y:0.0), outline_offset: 0.0, outline_width: 0.0, '
|
||||
'stack_index: 0, unrounded_size: Vec2(x:0.0, y:0.0))',
|
||||
'bevy_ui::ui_node::Outline': '(color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), offset: Auto, width: Auto)',
|
||||
'bevy_ui::ui_node::Style': '(align_content: Default, align_items: Default, align_self: Auto, aspect_ratio: None, '
|
||||
'border: (bottom: Auto, left: Auto, right: Auto, top: Auto), bottom: Auto, column_gap: '
|
||||
'Auto, direction: Inherit, display: Flex, flex_basis: Auto, flex_direction: Row, '
|
||||
'flex_grow: 0.0, flex_shrink: 0.0, flex_wrap: NoWrap, grid_auto_columns: "", '
|
||||
'grid_auto_flow: Row, grid_auto_rows: "", grid_column: (end: "", span: "", start: ""), '
|
||||
'grid_row: (end: "", span: "", start: ""), grid_template_columns: "", grid_template_rows: '
|
||||
'"", height: Auto, justify_content: Default, justify_items: Default, justify_self: Auto, '
|
||||
'left: Auto, margin: (bottom: Auto, left: Auto, right: Auto, top: Auto), max_height: Auto, '
|
||||
'max_width: Auto, min_height: Auto, min_width: Auto, overflow: (x: Visible, y: Visible), '
|
||||
'padding: (bottom: Auto, left: Auto, right: Auto, top: Auto), position_type: Relative, '
|
||||
'right: Auto, row_gap: Auto, top: Auto, width: Auto)',
|
||||
'bevy_ui::ui_node::UiImage': '(flip_x: true, flip_y: true, texture: Strong(""))',
|
||||
'bevy_ui::ui_node::ZIndex': 'Local(0)',
|
||||
'bevy_ui::widget::button::Button': '()',
|
||||
'bevy_ui::widget::image::UiImageSize': '(size: Vec2(x:0.0, y:0.0))',
|
||||
'bevy_ui::widget::label::Label': '()',
|
||||
'bevy_ui::widget::text::TextFlags': '(needs_new_measure_func: true, needs_recompute: true)',
|
||||
'bevy_window::window::PrimaryWindow': '()',
|
||||
'bevy_window::window::Window': '(canvas: None, composite_alpha_mode: Auto, cursor: (grab_mode: None, hit_test: true, '
|
||||
'icon: Default, visible: true), decorations: true, enabled_buttons: (close: true, '
|
||||
'maximize: true, minimize: true), focused: true, ime_enabled: true, ime_position: '
|
||||
'Vec2(x:0.0, y:0.0), internal: (maximize_request: None, minimize_request: None, '
|
||||
'physical_cursor_position: None), mode: Windowed, name: None, position: Automatic, '
|
||||
'present_mode: AutoVsync, prevent_default_event_handling: true, resizable: true, '
|
||||
'resize_constraints: (max_height: 0.0, max_width: 0.0, min_height: 0.0, min_width: '
|
||||
'0.0), resolution: (physical_height: 0, physical_width: 0, scale_factor: 0.0, '
|
||||
'scale_factor_override: None), title: " ", transparent: true, visible: true, '
|
||||
'window_level: AlwaysOnBottom, window_theme: "")'}
|
||||
|
||||
|
||||
|
||||
|
||||
expected_custom_property_values_randomized = {'AComponentWithAnExtremlyExageratedOrMaybeNotButCouldBeNameOrWut': '()',
|
||||
'Aabb': '(center: Vec3A(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019), half_extents: '
|
||||
'Vec3A(x:0.20609822869300842, y:0.8133212327957153, z:0.8235888481140137))',
|
||||
'AdditionalMassProperties': 'Mass(0.42888906598091125)',
|
||||
'AnimationPlayer': '(animation: "", paused: true)',
|
||||
'Animations': '(named_animations: "")',
|
||||
'AutoAABBCollider': 'Capsule',
|
||||
'BackgroundColor': '(Rgba(red:0.5714026093482971, green:0.42888906598091125, blue:0.5780913233757019, '
|
||||
'alpha:0.20609822869300842))',
|
||||
'BasicTest': '(a: 0.5714026093482971, b: 54, c: "psagopiu")',
|
||||
'BlenderBackgroundShader': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, blue:0.5780913233757019, '
|
||||
'alpha:0.20609822869300842), strength: 0.8133212327957153)',
|
||||
'BlenderLightShadows': '(buffer_bias: 0.5714026093482971, enabled: false)',
|
||||
'BlenderShadowSettings': '(cascade_size: 73)',
|
||||
'BloomSettings': '(composite_mode: EnergyConserving, high_pass_frequency: 0.42888906598091125, intensity: '
|
||||
'0.5780913233757019, low_frequency_boost: 0.20609822869300842, low_frequency_boost_curvature: '
|
||||
'0.8133212327957153, prefilter_settings: (threshold: 0.8235888481140137, threshold_softness: '
|
||||
'0.6534725427627563))',
|
||||
'BlueprintName': '("sbnpsago")',
|
||||
'BlueprintsList': '("")',
|
||||
'BorderColor': '(Rgba(red:0.5714026093482971, green:0.42888906598091125, blue:0.5780913233757019, '
|
||||
'alpha:0.20609822869300842))',
|
||||
'Button': '()',
|
||||
'CalculatedClip': '(clip: (max: Vec2(x:0.5714026093482971, y:0.42888906598091125), min: Vec2(x:0.5780913233757019, '
|
||||
'y:0.20609822869300842)))',
|
||||
'Camera': '(clear_color: None, hdr: false, is_active: false, msaa_writeback: false, order: 73, viewport: None)',
|
||||
'Camera2d': '()',
|
||||
'Camera3d': '(depth_load_op: Clear(0.42888906598091125), depth_texture_usages: (73), '
|
||||
'screen_space_specular_transmission_quality: Low, screen_space_specular_transmission_steps: 26)',
|
||||
'CameraMainTextureUsages': 'None',
|
||||
'CameraRenderGraph': 'None',
|
||||
'CameraTrackable': '()',
|
||||
'CameraTracking': '(offset: Vec3(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019))',
|
||||
'CameraTrackingOffset': '(Vec3(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019))',
|
||||
'CascadeShadowConfig': '(bounds: [0.42888906598091125], minimum_distance: 0.5780913233757019, overlap_proportion: '
|
||||
'0.20609822869300842)',
|
||||
'Cascades': '(cascades: "")',
|
||||
'CascadesFrusta': '()',
|
||||
'CascadesVisibleEntities': '()',
|
||||
'Ccd': '(enabled: true)',
|
||||
'Children': '([0])',
|
||||
'ClusterConfig': 'None',
|
||||
'Collider': 'Ball(0.42888906598091125)',
|
||||
'CollidingEntities': '("")',
|
||||
'CollisionGroups': '(filters: (73), memberships: (4))',
|
||||
'ColorGrading': '(exposure: 0.5714026093482971, gamma: 0.42888906598091125, post_saturation: 0.5780913233757019, '
|
||||
'pre_saturation: 0.20609822869300842)',
|
||||
'ContactForceEventThreshold': '(0.5714026093482971)',
|
||||
'ContentSize': '()',
|
||||
'ContrastAdaptiveSharpeningSettings': '(denoise: true, enabled: false, sharpening_strength: 0.42888906598091125)',
|
||||
'CubemapFrusta': '()',
|
||||
'CubemapVisibleEntities': '()',
|
||||
'Damping': '(angular_damping: 0.5714026093482971, linear_damping: 0.42888906598091125)',
|
||||
'DebandDither': 'Disabled',
|
||||
'DirectionalLight': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, blue:0.5780913233757019, '
|
||||
'alpha:0.20609822869300842), illuminance: 0.8133212327957153, shadow_depth_bias: '
|
||||
'0.8235888481140137, shadow_normal_bias: 0.6534725427627563, shadows_enabled: false)',
|
||||
'Dominance': '(groups: 73)',
|
||||
'EnumComplex': 'StructLike(a: 0.03258506581187248, b: 61, c: "sagopiuz")',
|
||||
'EnumTest': 'Squishy',
|
||||
'Exposure': 'None',
|
||||
'ExternalForce': '(force: Vec3(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019), torque: '
|
||||
'Vec3(x:0.20609822869300842, y:0.8133212327957153, z:0.8235888481140137))',
|
||||
'ExternalImpulse': '(impulse: Vec3(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019), '
|
||||
'torque_impulse: Vec3(x:0.20609822869300842, y:0.8133212327957153, z:0.8235888481140137))',
|
||||
'FocusPolicy': 'Block',
|
||||
'FogSettings': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, blue:0.5780913233757019, '
|
||||
'alpha:0.20609822869300842), directional_light_color: Rgba(red:0.8133212327957153, '
|
||||
'green:0.8235888481140137, blue:0.6534725427627563, alpha:0.16022956371307373), '
|
||||
'directional_light_exponent: 0.5206693410873413, falloff: ExponentialSquared(density: '
|
||||
'0.07608934491872787))',
|
||||
'Friction': '(coefficient: 0.5714026093482971, combine_rule: "")',
|
||||
'Frustum': '()',
|
||||
'Fxaa': '(edge_threshold: "", edge_threshold_min: "", enabled: true)',
|
||||
'GlobalTransform': '((matrix3: (x_axis: Vec3A(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019), '
|
||||
'y_axis: Vec3A(x:0.20609822869300842, y:0.8133212327957153, z:0.8235888481140137), z_axis: '
|
||||
'Vec3A(x:0.6534725427627563, y:0.16022956371307373, z:0.5206693410873413)), translation: '
|
||||
'Vec3A(x:0.3277728259563446, y:0.24999667704105377, z:0.952816903591156)))',
|
||||
'GltfExtras': '(value: "sbnpsago")',
|
||||
'GltfProcessed': '()',
|
||||
'GravityScale': '(0.5714026093482971)',
|
||||
'Group': '(73)',
|
||||
'Handle<()>': 'Strong("")',
|
||||
'Handle<AnimationClip>': 'Strong("")',
|
||||
'Handle<AudioSource>': 'Strong("")',
|
||||
'Handle<ColorMaterial>': 'Strong("")',
|
||||
'Handle<DynamicScene>': 'Strong("")',
|
||||
'Handle<ExtendedMaterial<StandardMaterial, MyExtension>>': 'Strong("")',
|
||||
'Handle<Font>': 'Strong("")',
|
||||
'Handle<Gltf>': 'Strong("")',
|
||||
'Handle<GltfMesh>': 'Strong("")',
|
||||
'Handle<GltfNode>': 'Strong("")',
|
||||
'Handle<GltfPrimitive>': 'Strong("")',
|
||||
'Handle<Image>': 'Strong("")',
|
||||
'Handle<LineGizmo>': 'Strong("")',
|
||||
'Handle<LoadedFolder>': 'Strong("")',
|
||||
'Handle<LoadedUntypedAsset>': 'Strong("")',
|
||||
'Handle<Mesh>': 'Strong("")',
|
||||
'Handle<Pitch>': 'Strong("")',
|
||||
'Handle<Scene>': 'Strong("")',
|
||||
'Handle<Shader>': 'Strong("")',
|
||||
'Handle<SkinnedMeshInverseBindposes>': 'Strong("")',
|
||||
'Handle<StandardDynamicAssetCollection>': 'Strong("")',
|
||||
'Handle<StandardMaterial>': 'Strong("")',
|
||||
'Handle<TextureAtlasLayout>': 'Strong("")',
|
||||
'Handle<WireframeMaterial>': 'Strong("")',
|
||||
'ImageScaleMode': 'Sliced((border: "", center_scale_mode: "", max_corner_scale: 0.42888906598091125, '
|
||||
'sides_scale_mode: ""))',
|
||||
'InheritedVisibility': '(true)',
|
||||
'Interaction': 'None',
|
||||
'Label': '()',
|
||||
'LightProbe': '()',
|
||||
'LockedAxes': '(73)',
|
||||
'MaterialInfo': '(name: "sbnpsago", source: "piuzfbqp")',
|
||||
'Mesh2dHandle': '(Strong(""))',
|
||||
'MeshMorphWeights': '(weights: [0.42888906598091125])',
|
||||
'MorphWeights': '(first_mesh: "", weights: [0.42888906598091125])',
|
||||
'Name': '(hash: 73, name: "bnpsagop")',
|
||||
'NestedTupleStuff': '(0.5714026093482971, 54, (basic: (a: 0.4825616776943207, b: 1, c: "gopiuzfb"), color: '
|
||||
'(Rgba(red:0.5206693410873413, green:0.3277728259563446, blue:0.24999667704105377, '
|
||||
'alpha:0.952816903591156)), colors_list: ([Rgba(red:0.0445563830435276, green:0.8601610660552979, '
|
||||
'blue:0.6031906008720398, alpha:0.38160598278045654), Rgba(red:0.2836182117462158, '
|
||||
'green:0.6749648451805115, blue:0.456831157207489, alpha:0.6858614683151245)]), enable: true, '
|
||||
'enum_inner: Rock, nested: (vec: (Vec3(x:0.1329781413078308, y:0.7678378224372864, '
|
||||
'z:0.9824132323265076))), text: "otmbsahe", toggle: (false)))',
|
||||
'NestingTestLevel2': '(basic: (a: 0.5714026093482971, b: 54, c: "psagopiu"), color: (Rgba(red:0.8106188178062439, '
|
||||
'green:0.03440357372164726, blue:0.49008557200431824, alpha:0.07608934491872787)), colors_list: '
|
||||
'([Rgba(red:0.0445563830435276, green:0.8601610660552979, blue:0.6031906008720398, '
|
||||
'alpha:0.38160598278045654), Rgba(red:0.2836182117462158, green:0.6749648451805115, '
|
||||
'blue:0.456831157207489, alpha:0.6858614683151245)]), enable: true, enum_inner: Rock, nested: '
|
||||
'(vec: (Vec3(x:0.1329781413078308, y:0.7678378224372864, z:0.9824132323265076))), text: '
|
||||
'"otmbsahe", toggle: (false))',
|
||||
'NestingTestLevel3': '(vec: (Vec3(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019)))',
|
||||
'NoFrustumCulling': '()',
|
||||
'NoWireframe': '()',
|
||||
'Node': '(calculated_size: Vec2(x:0.5714026093482971, y:0.42888906598091125), outline_offset: 0.5780913233757019, '
|
||||
'outline_width: 0.20609822869300842, stack_index: 62, unrounded_size: Vec2(x:0.8235888481140137, '
|
||||
'y:0.6534725427627563))',
|
||||
'NotShadowCaster': '()',
|
||||
'NotShadowReceiver': '()',
|
||||
'OrthographicProjection': '(area: (max: Vec2(x:0.5714026093482971, y:0.42888906598091125), min: '
|
||||
'Vec2(x:0.5780913233757019, y:0.20609822869300842)), far: 0.8133212327957153, near: '
|
||||
'0.8235888481140137, scale: 0.6534725427627563, scaling_mode: '
|
||||
'WindowSize(0.03440357372164726), viewport_origin: Vec2(x:0.49008557200431824, '
|
||||
'y:0.07608934491872787))',
|
||||
'Outline': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, blue:0.5780913233757019, '
|
||||
'alpha:0.20609822869300842), offset: VMax(0.4912964105606079), width: Percent(0.6534725427627563))',
|
||||
'Parent': '(0)',
|
||||
'PerspectiveProjection': '(aspect_ratio: 0.5714026093482971, far: 0.42888906598091125, fov: 0.5780913233757019, near: '
|
||||
'0.20609822869300842)',
|
||||
'Pickable': '()',
|
||||
'PlaybackSettings': '(mode: Once, paused: false, spatial: false, spatial_scale: "", speed: 0.5780913233757019, '
|
||||
'volume: (0.20609822869300842))',
|
||||
'Player': '()',
|
||||
'PointLight': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, blue:0.5780913233757019, '
|
||||
'alpha:0.20609822869300842), intensity: 0.8133212327957153, radius: 0.8235888481140137, range: '
|
||||
'0.6534725427627563, shadow_depth_bias: 0.16022956371307373, shadow_normal_bias: 0.5206693410873413, '
|
||||
'shadows_enabled: false)',
|
||||
'PrimaryWindow': '()',
|
||||
'Projection': 'Perspective((aspect_ratio: 0.42888906598091125, far: 0.5780913233757019, fov: 0.20609822869300842, '
|
||||
'near: 0.8133212327957153))',
|
||||
'RelativeCursorPosition': '(normalized: "", normalized_visible_node_rect: (max: Vec2(x:0.5714026093482971, '
|
||||
'y:0.42888906598091125), min: Vec2(x:0.5780913233757019, y:0.20609822869300842)))',
|
||||
'RenderLayers': '(73)',
|
||||
'Restitution': '(coefficient: 0.5714026093482971, combine_rule: "")',
|
||||
'RigidBody': 'Dynamic',
|
||||
'SSAOSettings': '()',
|
||||
'ScreenSpaceAmbientOcclusionSettings': '(quality_level: "")',
|
||||
'Sensor': '()',
|
||||
'ShadowFilteringMethod': 'Jimenez14',
|
||||
'SkinnedMesh': '(inverse_bindposes: Strong(""), joints: [0, 0])',
|
||||
'Sleeping': '(angular_threshold: 0.5714026093482971, linear_threshold: 0.42888906598091125, sleeping: true)',
|
||||
'SolverGroups': '(filters: (73), memberships: (4))',
|
||||
'SpatialListener': '(left_ear_offset: Vec3(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019), '
|
||||
'right_ear_offset: Vec3(x:0.20609822869300842, y:0.8133212327957153, z:0.8235888481140137))',
|
||||
'SpawnHere': '()',
|
||||
'SpotLight': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, blue:0.5780913233757019, '
|
||||
'alpha:0.20609822869300842), inner_angle: 0.8133212327957153, intensity: 0.8235888481140137, '
|
||||
'outer_angle: 0.6534725427627563, radius: 0.16022956371307373, range: 0.5206693410873413, '
|
||||
'shadow_depth_bias: 0.3277728259563446, shadow_normal_bias: 0.24999667704105377, shadows_enabled: true)',
|
||||
'Sprite': '(anchor: Custom(Vec2(x:0.03258506581187248, y:0.4825616776943207)), color: Rgba(red:0.014832446351647377, '
|
||||
'green:0.46258050203323364, blue:0.4912964105606079, alpha:0.27752065658569336), custom_size: "", flip_x: '
|
||||
'true, flip_y: false, rect: "")',
|
||||
'Style': '(align_content: SpaceAround, align_items: Default, align_self: Baseline, aspect_ratio: '
|
||||
'Some(0.5780913233757019), border: (bottom: Px(0.46258050203323364), left: Vw(0.8235888481140137), right: '
|
||||
'VMin(0.8106188178062439), top: Auto), bottom: Vh(0.49008557200431824), column_gap: Auto, direction: '
|
||||
'Inherit, display: None, flex_basis: Percent(0.0445563830435276), flex_direction: Column, flex_grow: '
|
||||
'0.6031906008720398, flex_shrink: 0.38160598278045654, flex_wrap: Wrap, grid_auto_columns: "", '
|
||||
'grid_auto_flow: RowDense, grid_auto_rows: "", grid_column: (end: "", span: "", start: ""), grid_row: (end: '
|
||||
'"", span: "", start: ""), grid_template_columns: "", grid_template_rows: "", height: '
|
||||
'Vw(0.17467059195041656), justify_content: FlexEnd, justify_items: Stretch, justify_self: End, left: '
|
||||
'Px(0.45692843198776245), margin: (bottom: VMax(0.9824132323265076), left: Vw(0.6133268475532532), right: '
|
||||
'Auto, top: Vh(0.004055144265294075)), max_height: Px(0.1949533075094223), max_width: '
|
||||
'Percent(0.5363451838493347), min_height: VMax(0.8981962203979492), min_width: Percent(0.666689932346344), '
|
||||
'overflow: (x: Clip, y: Clip), padding: (bottom: Vw(0.06499417871236801), left: Vh(0.32468828558921814), '
|
||||
'right: Vh(0.15641891956329346), top: Px(0.9697836637496948)), position_type: Relative, right: Auto, '
|
||||
'row_gap: Auto, top: Vw(0.3011642396450043), width: Vh(0.6578909158706665))',
|
||||
'Text': '(justify: Right, linebreak_behavior: WordBoundary, sections: [(style: (color: Rgba(red:0.4825616776943207, '
|
||||
'green:0.014832446351647377, blue:0.46258050203323364, alpha:0.4912964105606079), font: Weak(Index(index: '
|
||||
'"")), font_size: 0.03440357372164726), value: "pkchxlbn"), (style: (color: Rgba(red:0.8601610660552979, '
|
||||
'green:0.6031906008720398, blue:0.38160598278045654, alpha:0.2836182117462158), font: Weak(Uuid(uuid: '
|
||||
'"73b3b118-7d01-4778-8bcc-4e79055f5d22")), font_size: 0.17467059195041656), value: "jvleoyho")])',
|
||||
'Text2dBounds': '(size: Vec2(x:0.5714026093482971, y:0.42888906598091125))',
|
||||
'TextFlags': '(needs_new_measure_func: true, needs_recompute: false)',
|
||||
'TextLayoutInfo': '(glyphs: "", logical_size: Vec2(x:0.5714026093482971, y:0.42888906598091125))',
|
||||
'Tonemapping': 'None',
|
||||
'Transform': '(rotation: Quat(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019, '
|
||||
'w:0.20609822869300842), scale: Vec3(x:0.8133212327957153, y:0.8235888481140137, z:0.6534725427627563), '
|
||||
'translation: Vec3(x:0.16022956371307373, y:0.5206693410873413, z:0.3277728259563446))',
|
||||
'TupleTest2': '(0.5714026093482971, 54, "psagopiu")',
|
||||
'TupleTestBool': '(true)',
|
||||
'TupleTestColor': '(Rgba(red:0.5714026093482971, green:0.42888906598091125, blue:0.5780913233757019, '
|
||||
'alpha:0.20609822869300842))',
|
||||
'TupleTestF32': '(0.5714026093482971)',
|
||||
'TupleTestStr': '("sbnpsago")',
|
||||
'TupleTestU64': '(73)',
|
||||
'TupleVec': '(["npsagopi"])',
|
||||
'TupleVec2': '(Vec2(x:0.5714026093482971, y:0.42888906598091125))',
|
||||
'TupleVec3': '(Vec3(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019))',
|
||||
'TupleVecF32F32': '([(0.42888906598091125, 0.5780913233757019)])',
|
||||
'UiImage': '(flip_x: true, flip_y: false, texture: Weak(Uuid(uuid: "73b3b118-7d01-4778-8bcc-4e79055f5d22")))',
|
||||
'UiImageSize': '(size: Vec2(x:0.5714026093482971, y:0.42888906598091125))',
|
||||
'UnitTest': '()',
|
||||
'VecOfColors': '([Rgba(red:0.42888906598091125, green:0.5780913233757019, blue:0.20609822869300842, '
|
||||
'alpha:0.8133212327957153)])',
|
||||
'VecOfF32s': '([0.42888906598091125])',
|
||||
'VecOfVec3s2': '([(Vec3(x:0.42888906598091125, y:0.5780913233757019, z:0.20609822869300842))])',
|
||||
'Velocity': '(angvel: Vec3(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019), linvel: '
|
||||
'Vec3(x:0.20609822869300842, y:0.8133212327957153, z:0.8235888481140137))',
|
||||
'ViewVisibility': '(true)',
|
||||
'Visibility': 'Visible',
|
||||
'VisibleEntities': '()',
|
||||
'Window': '(canvas: None, composite_alpha_mode: PostMultiplied, cursor: (grab_mode: Confined, hit_test: true, icon: '
|
||||
'Default, visible: false), decorations: false, enabled_buttons: (close: true, maximize: false, minimize: '
|
||||
'true), focused: false, ime_enabled: true, ime_position: Vec2(x:0.8106188178062439, y:0.03440357372164726), '
|
||||
'internal: (maximize_request: Some(false), minimize_request: None, physical_cursor_position: None), mode: '
|
||||
'SizedFullscreen, name: None, position: Centered(Current), present_mode: Immediate, '
|
||||
'prevent_default_event_handling: false, resizable: false, resize_constraints: (max_height: '
|
||||
'0.42126399278640747, max_width: 0.8268482089042664, min_height: 0.2623211145401001, min_width: '
|
||||
'0.17467059195041656), resolution: (physical_height: 38, physical_width: 84, scale_factor: '
|
||||
'0.36258742213249207, scale_factor_override: Some(0.7678378224372864)), title: "hotmbsah", transparent: '
|
||||
'false, visible: false, window_level: Normal, window_theme: "")',
|
||||
'Wireframe': '()',
|
||||
'WireframeColor': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, blue:0.5780913233757019, '
|
||||
'alpha:0.20609822869300842))',
|
||||
'ZIndex': 'Local(54)'}
|
||||
expected_custom_property_values_randomized = {'bevy_animation::AnimationPlayer': '(animation: "", paused: true)',
|
||||
'bevy_asset::handle::Handle<()>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_animation::AnimationClip>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_asset::assets::LoadedUntypedAsset>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_asset::folder::LoadedFolder>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_asset_loader::standard_dynamic_asset::StandardDynamicAssetCollection>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_audio::audio_source::AudioSource>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_audio::pitch::Pitch>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_gizmos::LineGizmo>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_gltf::Gltf>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_gltf::GltfMesh>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_gltf::GltfNode>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_gltf::GltfPrimitive>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_pbr::extended_material::ExtendedMaterial<bevy_pbr::pbr_material::StandardMaterial, bevy_example::test_components::MyExtension>>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_pbr::pbr_material::StandardMaterial>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_pbr::wireframe::WireframeMaterial>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_render::mesh::mesh::Mesh>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_render::mesh::mesh::skinning::SkinnedMeshInverseBindposes>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_render::render_resource::shader::Shader>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_render::texture::image::Image>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_scene::dynamic_scene::DynamicScene>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_scene::scene::Scene>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_sprite::mesh2d::color_material::ColorMaterial>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_sprite::texture_atlas::TextureAtlasLayout>': 'Strong("")',
|
||||
'bevy_asset::handle::Handle<bevy_text::font::Font>': 'Strong("")',
|
||||
'bevy_audio::audio::PlaybackSettings': '(mode: Once, paused: false, spatial: false, spatial_scale: "", speed: '
|
||||
'0.5780913233757019, volume: (0.20609822869300842))',
|
||||
'bevy_audio::audio::SpatialListener': '(left_ear_offset: Vec3(x:0.5714026093482971, y:0.42888906598091125, '
|
||||
'z:0.5780913233757019), right_ear_offset: Vec3(x:0.20609822869300842, '
|
||||
'y:0.8133212327957153, z:0.8235888481140137))',
|
||||
'bevy_core::name::Name': '(hash: 73, name: "bnpsagop")',
|
||||
'bevy_core_pipeline::bloom::settings::BloomSettings': '(composite_mode: EnergyConserving, high_pass_frequency: '
|
||||
'0.42888906598091125, intensity: 0.5780913233757019, '
|
||||
'low_frequency_boost: 0.20609822869300842, '
|
||||
'low_frequency_boost_curvature: 0.8133212327957153, '
|
||||
'prefilter_settings: (threshold: 0.8235888481140137, '
|
||||
'threshold_softness: 0.6534725427627563))',
|
||||
'bevy_core_pipeline::contrast_adaptive_sharpening::ContrastAdaptiveSharpeningSettings': '(denoise: true, enabled: '
|
||||
'false, sharpening_strength: '
|
||||
'0.42888906598091125)',
|
||||
'bevy_core_pipeline::core_2d::camera_2d::Camera2d': '()',
|
||||
'bevy_core_pipeline::core_3d::camera_3d::Camera3d': '(depth_load_op: Clear(0.42888906598091125), '
|
||||
'depth_texture_usages: (73), '
|
||||
'screen_space_specular_transmission_quality: Low, '
|
||||
'screen_space_specular_transmission_steps: 26)',
|
||||
'bevy_core_pipeline::fxaa::Fxaa': '(edge_threshold: "", edge_threshold_min: "", enabled: true)',
|
||||
'bevy_core_pipeline::tonemapping::DebandDither': 'Disabled',
|
||||
'bevy_core_pipeline::tonemapping::Tonemapping': 'None',
|
||||
'bevy_example::dupe_components::EnumTest': 'Squishy',
|
||||
'bevy_example::game::animation::Marker1': '()',
|
||||
'bevy_example::game::animation::Marker2': '()',
|
||||
'bevy_example::game::animation::Marker3': '()',
|
||||
'bevy_example::game::animation::MarkerFox': '()',
|
||||
'bevy_example::test_components::AComponentWithAnExtremlyExageratedOrMaybeNotButCouldBeNameOrWut': '()',
|
||||
'bevy_example::test_components::BasicTest': '(a: 0.5714026093482971, b: 54, c: "psagopiu")',
|
||||
'bevy_example::test_components::EnumComplex': 'StructLike(a: 0.03258506581187248, b: 61, c: "sagopiuz")',
|
||||
'bevy_example::test_components::EnumTest': 'Squishy',
|
||||
'bevy_example::test_components::HashmapTestIntColor': '(inner: {})',
|
||||
'bevy_example::test_components::HashmapTestIntString': '(named_animations: {})',
|
||||
'bevy_example::test_components::HashmapTestSimple': '(named_animations: {})',
|
||||
'bevy_example::test_components::HashmapTestStringColor': '(inner: {})',
|
||||
'bevy_example::test_components::HashmapTestStringColorFlat': '({})',
|
||||
'bevy_example::test_components::HashmapTestStringFloat': '(named_animations: {})',
|
||||
'bevy_example::test_components::NestedTupleStuff': '(0.5714026093482971, 54, (basic: (a: 0.4825616776943207, b: 1, c: '
|
||||
'"gopiuzfb"), color: (Rgba(red:0.5206693410873413, '
|
||||
'green:0.3277728259563446, blue:0.24999667704105377, '
|
||||
'alpha:0.952816903591156)), colors_list: '
|
||||
'([Rgba(red:0.0445563830435276, green:0.8601610660552979, '
|
||||
'blue:0.6031906008720398, alpha:0.38160598278045654), '
|
||||
'Rgba(red:0.2836182117462158, green:0.6749648451805115, '
|
||||
'blue:0.456831157207489, alpha:0.6858614683151245)]), enable: '
|
||||
'true, enum_inner: Rock, nested: (vec: (Vec3(x:0.1329781413078308, '
|
||||
'y:0.7678378224372864, z:0.9824132323265076))), text: "otmbsahe", '
|
||||
'toggle: (false)))',
|
||||
'bevy_example::test_components::NestingTestLevel2': '(basic: (a: 0.5714026093482971, b: 54, c: "psagopiu"), color: '
|
||||
'(Rgba(red:0.8106188178062439, green:0.03440357372164726, '
|
||||
'blue:0.49008557200431824, alpha:0.07608934491872787)), '
|
||||
'colors_list: ([Rgba(red:0.0445563830435276, '
|
||||
'green:0.8601610660552979, blue:0.6031906008720398, '
|
||||
'alpha:0.38160598278045654), Rgba(red:0.2836182117462158, '
|
||||
'green:0.6749648451805115, blue:0.456831157207489, '
|
||||
'alpha:0.6858614683151245)]), enable: true, enum_inner: Rock, '
|
||||
'nested: (vec: (Vec3(x:0.1329781413078308, y:0.7678378224372864, '
|
||||
'z:0.9824132323265076))), text: "otmbsahe", toggle: (false))',
|
||||
'bevy_example::test_components::NestingTestLevel3': '(vec: (Vec3(x:0.5714026093482971, y:0.42888906598091125, '
|
||||
'z:0.5780913233757019)))',
|
||||
'bevy_example::test_components::TupleTest2': '(0.5714026093482971, 54, "psagopiu")',
|
||||
'bevy_example::test_components::TupleTestBool': '(true)',
|
||||
'bevy_example::test_components::TupleTestColor': '(Rgba(red:0.5714026093482971, green:0.42888906598091125, '
|
||||
'blue:0.5780913233757019, alpha:0.20609822869300842))',
|
||||
'bevy_example::test_components::TupleTestF32': '(0.5714026093482971)',
|
||||
'bevy_example::test_components::TupleTestStr': '("sbnpsago")',
|
||||
'bevy_example::test_components::TupleTestU64': '(73)',
|
||||
'bevy_example::test_components::TupleVec': '(["npsagopi"])',
|
||||
'bevy_example::test_components::TupleVec2': '(Vec2(x:0.5714026093482971, y:0.42888906598091125))',
|
||||
'bevy_example::test_components::TupleVec3': '(Vec3(x:0.5714026093482971, y:0.42888906598091125, '
|
||||
'z:0.5780913233757019))',
|
||||
'bevy_example::test_components::TupleVecF32F32': '([(0.42888906598091125, 0.5780913233757019)])',
|
||||
'bevy_example::test_components::UnitTest': '()',
|
||||
'bevy_example::test_components::VecOfColors': '([Rgba(red:0.42888906598091125, green:0.5780913233757019, '
|
||||
'blue:0.20609822869300842, alpha:0.8133212327957153)])',
|
||||
'bevy_example::test_components::VecOfF32s': '([0.42888906598091125])',
|
||||
'bevy_example::test_components::VecOfVec3s2': '([(Vec3(x:0.42888906598091125, y:0.5780913233757019, '
|
||||
'z:0.20609822869300842))])',
|
||||
'bevy_gltf::GltfExtras': '(value: "sbnpsago")',
|
||||
'bevy_gltf_blueprints::animation::AnimationInfos': '(animations: [(frame_end: 0.42888906598091125, '
|
||||
'frame_end_override: 0.5780913233757019, frame_start: '
|
||||
'0.20609822869300842, frame_start_override: 0.8133212327957153, '
|
||||
'frames_length: 0.8235888481140137, name: "uzfbqpkc")])',
|
||||
'bevy_gltf_blueprints::animation::AnimationMarkers': '({})',
|
||||
'bevy_gltf_blueprints::animation::BlueprintAnimations': '(named_animations: "")',
|
||||
'bevy_gltf_blueprints::animation::SceneAnimations': '(named_animations: "")',
|
||||
'bevy_gltf_blueprints::materials::MaterialInfo': '(name: "sbnpsago", source: "piuzfbqp")',
|
||||
'bevy_gltf_blueprints::spawn_from_blueprints::BlueprintName': '("sbnpsago")',
|
||||
'bevy_gltf_blueprints::spawn_from_blueprints::BlueprintsList': '({})',
|
||||
'bevy_gltf_blueprints::spawn_from_blueprints::SpawnHere': '()',
|
||||
'bevy_gltf_components::GltfProcessed': '()',
|
||||
'bevy_gltf_components::blender_settings::lighting::BlenderBackgroundShader': '(color: Rgba(red:0.5714026093482971, '
|
||||
'green:0.42888906598091125, '
|
||||
'blue:0.5780913233757019, '
|
||||
'alpha:0.20609822869300842), strength: '
|
||||
'0.8133212327957153)',
|
||||
'bevy_gltf_components::blender_settings::lighting::BlenderLightShadows': '(buffer_bias: 0.5714026093482971, enabled: '
|
||||
'false)',
|
||||
'bevy_gltf_components::blender_settings::lighting::BlenderShadowSettings': '(cascade_size: 73)',
|
||||
'bevy_gltf_worlflow_examples_common::core::camera::camera_replace_proxies::SSAOSettings': '()',
|
||||
'bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTrackable': '()',
|
||||
'bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTracking': '(offset: '
|
||||
'Vec3(x:0.5714026093482971, '
|
||||
'y:0.42888906598091125, '
|
||||
'z:0.5780913233757019))',
|
||||
'bevy_gltf_worlflow_examples_common::core::camera::camera_tracking::CameraTrackingOffset': '(Vec3(x:0.5714026093482971, '
|
||||
'y:0.42888906598091125, '
|
||||
'z:0.5780913233757019))',
|
||||
'bevy_gltf_worlflow_examples_common::game::picking::Pickable': '()',
|
||||
'bevy_gltf_worlflow_examples_common::game::player::Player': '()',
|
||||
'bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::AutoAABBCollider': 'Capsule',
|
||||
'bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::Collider': 'Ball(0.42888906598091125)',
|
||||
'bevy_hierarchy::components::children::Children': '([0])',
|
||||
'bevy_hierarchy::components::parent::Parent': '(0)',
|
||||
'bevy_pbr::bundle::CascadesVisibleEntities': '()',
|
||||
'bevy_pbr::bundle::CubemapVisibleEntities': '()',
|
||||
'bevy_pbr::fog::FogSettings': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, '
|
||||
'blue:0.5780913233757019, alpha:0.20609822869300842), directional_light_color: '
|
||||
'Rgba(red:0.8133212327957153, green:0.8235888481140137, blue:0.6534725427627563, '
|
||||
'alpha:0.16022956371307373), directional_light_exponent: 0.5206693410873413, falloff: '
|
||||
'ExponentialSquared(density: 0.07608934491872787))',
|
||||
'bevy_pbr::light::CascadeShadowConfig': '(bounds: [0.42888906598091125], minimum_distance: 0.5780913233757019, '
|
||||
'overlap_proportion: 0.20609822869300842)',
|
||||
'bevy_pbr::light::Cascades': '(cascades: "")',
|
||||
'bevy_pbr::light::ClusterConfig': 'None',
|
||||
'bevy_pbr::light::DirectionalLight': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, '
|
||||
'blue:0.5780913233757019, alpha:0.20609822869300842), illuminance: '
|
||||
'0.8133212327957153, shadow_depth_bias: 0.8235888481140137, shadow_normal_bias: '
|
||||
'0.6534725427627563, shadows_enabled: false)',
|
||||
'bevy_pbr::light::NotShadowCaster': '()',
|
||||
'bevy_pbr::light::NotShadowReceiver': '()',
|
||||
'bevy_pbr::light::PointLight': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, '
|
||||
'blue:0.5780913233757019, alpha:0.20609822869300842), intensity: 0.8133212327957153, '
|
||||
'radius: 0.8235888481140137, range: 0.6534725427627563, shadow_depth_bias: '
|
||||
'0.16022956371307373, shadow_normal_bias: 0.5206693410873413, shadows_enabled: false)',
|
||||
'bevy_pbr::light::ShadowFilteringMethod': 'Jimenez14',
|
||||
'bevy_pbr::light::SpotLight': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, '
|
||||
'blue:0.5780913233757019, alpha:0.20609822869300842), inner_angle: 0.8133212327957153, '
|
||||
'intensity: 0.8235888481140137, outer_angle: 0.6534725427627563, radius: '
|
||||
'0.16022956371307373, range: 0.5206693410873413, shadow_depth_bias: 0.3277728259563446, '
|
||||
'shadow_normal_bias: 0.24999667704105377, shadows_enabled: true)',
|
||||
'bevy_pbr::light_probe::LightProbe': '()',
|
||||
'bevy_pbr::ssao::ScreenSpaceAmbientOcclusionSettings': '(quality_level: "")',
|
||||
'bevy_pbr::wireframe::NoWireframe': '()',
|
||||
'bevy_pbr::wireframe::Wireframe': '()',
|
||||
'bevy_pbr::wireframe::WireframeColor': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, '
|
||||
'blue:0.5780913233757019, alpha:0.20609822869300842))',
|
||||
'bevy_rapier3d::dynamics::rigid_body::AdditionalMassProperties': 'Mass(0.42888906598091125)',
|
||||
'bevy_rapier3d::dynamics::rigid_body::Ccd': '(enabled: true)',
|
||||
'bevy_rapier3d::dynamics::rigid_body::Damping': '(angular_damping: 0.5714026093482971, linear_damping: '
|
||||
'0.42888906598091125)',
|
||||
'bevy_rapier3d::dynamics::rigid_body::Dominance': '(groups: 73)',
|
||||
'bevy_rapier3d::dynamics::rigid_body::ExternalForce': '(force: Vec3(x:0.5714026093482971, y:0.42888906598091125, '
|
||||
'z:0.5780913233757019), torque: Vec3(x:0.20609822869300842, '
|
||||
'y:0.8133212327957153, z:0.8235888481140137))',
|
||||
'bevy_rapier3d::dynamics::rigid_body::ExternalImpulse': '(impulse: Vec3(x:0.5714026093482971, y:0.42888906598091125, '
|
||||
'z:0.5780913233757019), torque_impulse: '
|
||||
'Vec3(x:0.20609822869300842, y:0.8133212327957153, '
|
||||
'z:0.8235888481140137))',
|
||||
'bevy_rapier3d::dynamics::rigid_body::GravityScale': '(0.5714026093482971)',
|
||||
'bevy_rapier3d::dynamics::rigid_body::LockedAxes': '(73)',
|
||||
'bevy_rapier3d::dynamics::rigid_body::RigidBody': 'Dynamic',
|
||||
'bevy_rapier3d::dynamics::rigid_body::Sleeping': '(angular_threshold: 0.5714026093482971, linear_threshold: '
|
||||
'0.42888906598091125, sleeping: true)',
|
||||
'bevy_rapier3d::dynamics::rigid_body::Velocity': '(angvel: Vec3(x:0.5714026093482971, y:0.42888906598091125, '
|
||||
'z:0.5780913233757019), linvel: Vec3(x:0.20609822869300842, '
|
||||
'y:0.8133212327957153, z:0.8235888481140137))',
|
||||
'bevy_rapier3d::geometry::collider::CollidingEntities': '("")',
|
||||
'bevy_rapier3d::geometry::collider::CollisionGroups': '(filters: (73), memberships: (4))',
|
||||
'bevy_rapier3d::geometry::collider::ContactForceEventThreshold': '(0.5714026093482971)',
|
||||
'bevy_rapier3d::geometry::collider::Friction': '(coefficient: 0.5714026093482971, combine_rule: "")',
|
||||
'bevy_rapier3d::geometry::collider::Group': '(73)',
|
||||
'bevy_rapier3d::geometry::collider::Restitution': '(coefficient: 0.5714026093482971, combine_rule: "")',
|
||||
'bevy_rapier3d::geometry::collider::Sensor': '()',
|
||||
'bevy_rapier3d::geometry::collider::SolverGroups': '(filters: (73), memberships: (4))',
|
||||
'bevy_render::camera::camera::Camera': '(clear_color: None, hdr: false, is_active: false, msaa_writeback: false, '
|
||||
'order: 73, viewport: None)',
|
||||
'bevy_render::camera::camera::CameraMainTextureUsages': 'None',
|
||||
'bevy_render::camera::camera::CameraRenderGraph': 'None',
|
||||
'bevy_render::camera::camera::Exposure': 'None',
|
||||
'bevy_render::camera::projection::OrthographicProjection': '(area: (max: Vec2(x:0.5714026093482971, '
|
||||
'y:0.42888906598091125), min: Vec2(x:0.5780913233757019, '
|
||||
'y:0.20609822869300842)), far: 0.8133212327957153, near: '
|
||||
'0.8235888481140137, scale: 0.6534725427627563, '
|
||||
'scaling_mode: WindowSize(0.03440357372164726), '
|
||||
'viewport_origin: Vec2(x:0.49008557200431824, '
|
||||
'y:0.07608934491872787))',
|
||||
'bevy_render::camera::projection::PerspectiveProjection': '(aspect_ratio: 0.5714026093482971, far: '
|
||||
'0.42888906598091125, fov: 0.5780913233757019, near: '
|
||||
'0.20609822869300842)',
|
||||
'bevy_render::camera::projection::Projection': 'Perspective((aspect_ratio: 0.42888906598091125, far: '
|
||||
'0.5780913233757019, fov: 0.20609822869300842, near: '
|
||||
'0.8133212327957153))',
|
||||
'bevy_render::mesh::mesh::skinning::SkinnedMesh': '(inverse_bindposes: Strong(""), joints: [0, 0])',
|
||||
'bevy_render::mesh::morph::MeshMorphWeights': '(weights: [0.42888906598091125])',
|
||||
'bevy_render::mesh::morph::MorphWeights': '(first_mesh: "", weights: [0.42888906598091125])',
|
||||
'bevy_render::primitives::Aabb': '(center: Vec3A(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019), '
|
||||
'half_extents: Vec3A(x:0.20609822869300842, y:0.8133212327957153, '
|
||||
'z:0.8235888481140137))',
|
||||
'bevy_render::primitives::CascadesFrusta': '()',
|
||||
'bevy_render::primitives::CubemapFrusta': '()',
|
||||
'bevy_render::primitives::Frustum': '()',
|
||||
'bevy_render::view::ColorGrading': '(exposure: 0.5714026093482971, gamma: 0.42888906598091125, post_saturation: '
|
||||
'0.5780913233757019, pre_saturation: 0.20609822869300842)',
|
||||
'bevy_render::view::visibility::InheritedVisibility': '(true)',
|
||||
'bevy_render::view::visibility::NoFrustumCulling': '()',
|
||||
'bevy_render::view::visibility::ViewVisibility': '(true)',
|
||||
'bevy_render::view::visibility::Visibility': 'Visible',
|
||||
'bevy_render::view::visibility::VisibleEntities': '()',
|
||||
'bevy_render::view::visibility::render_layers::RenderLayers': '(73)',
|
||||
'bevy_sprite::mesh2d::mesh::Mesh2dHandle': '(Strong(""))',
|
||||
'bevy_sprite::sprite::ImageScaleMode': 'Sliced((border: "", center_scale_mode: "", max_corner_scale: '
|
||||
'0.42888906598091125, sides_scale_mode: ""))',
|
||||
'bevy_sprite::sprite::Sprite': '(anchor: Custom(Vec2(x:0.03258506581187248, y:0.4825616776943207)), color: '
|
||||
'Rgba(red:0.014832446351647377, green:0.46258050203323364, blue:0.4912964105606079, '
|
||||
'alpha:0.27752065658569336), custom_size: "", flip_x: true, flip_y: false, rect: "")',
|
||||
'bevy_text::pipeline::TextLayoutInfo': '(glyphs: "", logical_size: Vec2(x:0.5714026093482971, y:0.42888906598091125))',
|
||||
'bevy_text::text2d::Text2dBounds': '(size: Vec2(x:0.5714026093482971, y:0.42888906598091125))',
|
||||
'bevy_text::text::Text': '(justify: Right, linebreak_behavior: WordBoundary, sections: [(style: (color: '
|
||||
'Rgba(red:0.4825616776943207, green:0.014832446351647377, blue:0.46258050203323364, '
|
||||
'alpha:0.4912964105606079), font: Weak(Index(index: "")), font_size: 0.03440357372164726), '
|
||||
'value: "pkchxlbn"), (style: (color: Rgba(red:0.8601610660552979, green:0.6031906008720398, '
|
||||
'blue:0.38160598278045654, alpha:0.2836182117462158), font: Weak(Uuid(uuid: '
|
||||
'"73b3b118-7d01-4778-8bcc-4e79055f5d22")), font_size: 0.17467059195041656), value: '
|
||||
'"jvleoyho")])',
|
||||
'bevy_transform::components::global_transform::GlobalTransform': '((matrix3: (x_axis: Vec3A(x:0.5714026093482971, '
|
||||
'y:0.42888906598091125, z:0.5780913233757019), '
|
||||
'y_axis: Vec3A(x:0.20609822869300842, '
|
||||
'y:0.8133212327957153, z:0.8235888481140137), '
|
||||
'z_axis: Vec3A(x:0.6534725427627563, '
|
||||
'y:0.16022956371307373, z:0.5206693410873413)), '
|
||||
'translation: Vec3A(x:0.3277728259563446, '
|
||||
'y:0.24999667704105377, z:0.952816903591156)))',
|
||||
'bevy_transform::components::transform::Transform': '(rotation: Quat(x:0.5714026093482971, y:0.42888906598091125, '
|
||||
'z:0.5780913233757019, w:0.20609822869300842), scale: '
|
||||
'Vec3(x:0.8133212327957153, y:0.8235888481140137, '
|
||||
'z:0.6534725427627563), translation: Vec3(x:0.16022956371307373, '
|
||||
'y:0.5206693410873413, z:0.3277728259563446))',
|
||||
'bevy_ui::focus::FocusPolicy': 'Block',
|
||||
'bevy_ui::focus::Interaction': 'None',
|
||||
'bevy_ui::focus::RelativeCursorPosition': '(normalized: "", normalized_visible_node_rect: (max: '
|
||||
'Vec2(x:0.5714026093482971, y:0.42888906598091125), min: '
|
||||
'Vec2(x:0.5780913233757019, y:0.20609822869300842)))',
|
||||
'bevy_ui::measurement::ContentSize': '()',
|
||||
'bevy_ui::ui_node::BackgroundColor': '(Rgba(red:0.5714026093482971, green:0.42888906598091125, '
|
||||
'blue:0.5780913233757019, alpha:0.20609822869300842))',
|
||||
'bevy_ui::ui_node::BorderColor': '(Rgba(red:0.5714026093482971, green:0.42888906598091125, blue:0.5780913233757019, '
|
||||
'alpha:0.20609822869300842))',
|
||||
'bevy_ui::ui_node::CalculatedClip': '(clip: (max: Vec2(x:0.5714026093482971, y:0.42888906598091125), min: '
|
||||
'Vec2(x:0.5780913233757019, y:0.20609822869300842)))',
|
||||
'bevy_ui::ui_node::Node': '(calculated_size: Vec2(x:0.5714026093482971, y:0.42888906598091125), outline_offset: '
|
||||
'0.5780913233757019, outline_width: 0.20609822869300842, stack_index: 62, unrounded_size: '
|
||||
'Vec2(x:0.8235888481140137, y:0.6534725427627563))',
|
||||
'bevy_ui::ui_node::Outline': '(color: Rgba(red:0.5714026093482971, green:0.42888906598091125, '
|
||||
'blue:0.5780913233757019, alpha:0.20609822869300842), offset: VMax(0.4912964105606079), '
|
||||
'width: Percent(0.6534725427627563))',
|
||||
'bevy_ui::ui_node::Style': '(align_content: SpaceAround, align_items: Default, align_self: Baseline, aspect_ratio: '
|
||||
'Some(0.5780913233757019), border: (bottom: Px(0.46258050203323364), left: '
|
||||
'Vw(0.8235888481140137), right: VMin(0.8106188178062439), top: Auto), bottom: '
|
||||
'Vh(0.49008557200431824), column_gap: Auto, direction: Inherit, display: None, flex_basis: '
|
||||
'Percent(0.0445563830435276), flex_direction: Column, flex_grow: 0.6031906008720398, '
|
||||
'flex_shrink: 0.38160598278045654, flex_wrap: Wrap, grid_auto_columns: "", grid_auto_flow: '
|
||||
'RowDense, grid_auto_rows: "", grid_column: (end: "", span: "", start: ""), grid_row: '
|
||||
'(end: "", span: "", start: ""), grid_template_columns: "", grid_template_rows: "", '
|
||||
'height: Vw(0.17467059195041656), justify_content: FlexEnd, justify_items: Stretch, '
|
||||
'justify_self: End, left: Px(0.45692843198776245), margin: (bottom: '
|
||||
'VMax(0.9824132323265076), left: Vw(0.6133268475532532), right: Auto, top: '
|
||||
'Vh(0.004055144265294075)), max_height: Px(0.1949533075094223), max_width: '
|
||||
'Percent(0.5363451838493347), min_height: VMax(0.8981962203979492), min_width: '
|
||||
'Percent(0.666689932346344), overflow: (x: Clip, y: Clip), padding: (bottom: '
|
||||
'Vw(0.06499417871236801), left: Vh(0.32468828558921814), right: Vh(0.15641891956329346), '
|
||||
'top: Px(0.9697836637496948)), position_type: Relative, right: Auto, row_gap: Auto, top: '
|
||||
'Vw(0.3011642396450043), width: Vh(0.6578909158706665))',
|
||||
'bevy_ui::ui_node::UiImage': '(flip_x: true, flip_y: false, texture: Weak(Uuid(uuid: '
|
||||
'"73b3b118-7d01-4778-8bcc-4e79055f5d22")))',
|
||||
'bevy_ui::ui_node::ZIndex': 'Local(54)',
|
||||
'bevy_ui::widget::button::Button': '()',
|
||||
'bevy_ui::widget::image::UiImageSize': '(size: Vec2(x:0.5714026093482971, y:0.42888906598091125))',
|
||||
'bevy_ui::widget::label::Label': '()',
|
||||
'bevy_ui::widget::text::TextFlags': '(needs_new_measure_func: true, needs_recompute: false)',
|
||||
'bevy_window::window::PrimaryWindow': '()',
|
||||
'bevy_window::window::Window': '(canvas: None, composite_alpha_mode: PostMultiplied, cursor: (grab_mode: Confined, '
|
||||
'hit_test: true, icon: Default, visible: false), decorations: false, enabled_buttons: '
|
||||
'(close: true, maximize: false, minimize: true), focused: false, ime_enabled: true, '
|
||||
'ime_position: Vec2(x:0.8106188178062439, y:0.03440357372164726), internal: '
|
||||
'(maximize_request: Some(false), minimize_request: None, physical_cursor_position: '
|
||||
'None), mode: SizedFullscreen, name: None, position: Centered(Current), present_mode: '
|
||||
'Immediate, prevent_default_event_handling: false, resizable: false, '
|
||||
'resize_constraints: (max_height: 0.42126399278640747, max_width: 0.8268482089042664, '
|
||||
'min_height: 0.2623211145401001, min_width: 0.17467059195041656), resolution: '
|
||||
'(physical_height: 38, physical_width: 84, scale_factor: 0.36258742213249207, '
|
||||
'scale_factor_override: Some(0.7678378224372864)), title: "hotmbsah", transparent: '
|
||||
'false, visible: false, window_level: Normal, window_theme: "")'}
|
@ -53,7 +53,7 @@ def test_components_should_generate_correct_custom_properties(setup_data):
|
||||
pp.pprint(custom_property_values)
|
||||
|
||||
assert len(errors) == 0
|
||||
assert len(added_components) == 159
|
||||
assert len(added_components) == 173
|
||||
|
||||
|
||||
def test_components_should_generate_correct_custom_properties_with_randomized_values(setup_data):
|
||||
@ -104,7 +104,7 @@ def test_components_should_generate_correct_custom_properties_with_randomized_va
|
||||
|
||||
print("error_components", error_components)
|
||||
assert len(errors) == 0
|
||||
assert len(added_components) == 159
|
||||
assert len(added_components) == 173
|
||||
|
||||
def test_components_should_generate_correct_propertyGroup_values_from_custom_properties(setup_data):
|
||||
registry = bpy.context.window_manager.components_registry
|
||||
@ -139,7 +139,7 @@ def test_components_should_generate_correct_propertyGroup_values_from_custom_pro
|
||||
added_components.append(long_name)
|
||||
# randomise values
|
||||
component_values_shuffler(seed= 10, property_group=propertyGroup, definition=definition, registry=registry)
|
||||
custom_property_value = object[long_name]
|
||||
custom_property_value = get_bevy_component_value_by_long_name(object, long_name)
|
||||
|
||||
# first check if custom property value matches what we expect
|
||||
assert custom_property_value == expected_custom_property_values_randomized[long_name]
|
||||
@ -161,7 +161,7 @@ def test_components_should_generate_correct_propertyGroup_values_from_custom_pro
|
||||
for index, error in enumerate(errors):
|
||||
print("ERROR", error, failing_components[index])
|
||||
assert len(errors) == 0
|
||||
assert len(added_components) == 159
|
||||
assert len(added_components) == 173
|
||||
|
||||
|
||||
def test_remove_components(setup_data):
|
||||
@ -187,13 +187,7 @@ def test_remove_components(setup_data):
|
||||
|
||||
try:
|
||||
add_component_operator(component_type=long_name)
|
||||
|
||||
property_group_name = registry.get_propertyGroupName_from_longName(long_name)
|
||||
object = bpy.context.object
|
||||
|
||||
target_components_metadata = object.components_meta.components
|
||||
component_meta = next(filter(lambda component: component["long_name"] == long_name, target_components_metadata), None)
|
||||
propertyGroup = getattr(component_meta, property_group_name, None)
|
||||
# print("propertyGroup", propertyGroup, propertyGroup.field_names)
|
||||
added_components.append(long_name)
|
||||
except Exception as error:
|
||||
@ -204,9 +198,8 @@ def test_remove_components(setup_data):
|
||||
errors.clear()
|
||||
remove_component_operator = bpy.ops.object.remove_bevy_component
|
||||
for long_name in added_components:
|
||||
component_name = type_infos[long_name]
|
||||
try:
|
||||
remove_component_operator(component_name=component_name)
|
||||
remove_component_operator(component_name=long_name)
|
||||
except Exception as error:
|
||||
errors.append(error)
|
||||
assert len(errors) == 0
|
||||
@ -217,7 +210,7 @@ def test_copy_paste_components(setup_data):
|
||||
registry.schemaPath = setup_data["schema_path"]
|
||||
bpy.ops.object.reload_registry()
|
||||
|
||||
long_name = "BasicTest"
|
||||
long_name = "bevy_example::test_components::BasicTest"
|
||||
|
||||
# SOURCE object setup
|
||||
add_component_operator = bpy.ops.object.add_bevy_component
|
||||
|
@ -4,7 +4,7 @@ import bpy
|
||||
import pprint
|
||||
import pytest
|
||||
|
||||
from ..components.metadata import get_bevy_components, upsert_bevy_component
|
||||
from ..components.metadata import get_bevy_component_value_by_long_name, get_bevy_components, is_bevy_component_in_object, upsert_bevy_component
|
||||
|
||||
from .setup_data import setup_data
|
||||
|
||||
@ -37,11 +37,11 @@ def test_rename_component_single_unit_struct(setup_data):
|
||||
|
||||
rename_component_operator(original_name=source_component_name, new_name=target_component_name, target_objects=json.dumps([object.name]))
|
||||
|
||||
is_old_component_in_object = source_component_name in object
|
||||
is_new_component_in_object = target_component_name in object
|
||||
is_old_component_in_object = is_bevy_component_in_object(object, source_component_name)
|
||||
is_new_component_in_object = is_bevy_component_in_object(object, target_component_name)
|
||||
assert is_old_component_in_object == False
|
||||
assert is_new_component_in_object == True
|
||||
assert get_bevy_components(object, target_component_name) == '()'
|
||||
assert get_bevy_component_value_by_long_name(object, target_component_name) == '()'
|
||||
assert get_component_propGroup(registry, target_component_name, get_component_metadata(object, target_component_name)) != None
|
||||
|
||||
|
||||
@ -55,16 +55,16 @@ def test_rename_component_single_complex_struct(setup_data):
|
||||
|
||||
|
||||
source_component_name = "bevy_example::test_components::ProxyCollider"
|
||||
target_component_name = "bevy_example::test_components::Collider"
|
||||
object[source_component_name] = 'Capsule(Vec3(x:1.0, y:2.0, z:0.0), Vec3(x:0.0, y:0.0, z:0.0), 3.0)'
|
||||
target_component_name = "bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::Collider"
|
||||
upsert_bevy_component(object, source_component_name, 'Capsule(Vec3(x:1.0, y:2.0, z:0.0), Vec3(x:0.0, y:0.0, z:0.0), 3.0)')
|
||||
|
||||
rename_component_operator(original_name=source_component_name, new_name=target_component_name, target_objects=json.dumps([object.name]))
|
||||
|
||||
is_old_component_in_object = source_component_name in object
|
||||
is_new_component_in_object = target_component_name in object
|
||||
is_old_component_in_object = is_bevy_component_in_object(object, source_component_name)
|
||||
is_new_component_in_object = is_bevy_component_in_object(object, target_component_name)
|
||||
assert is_old_component_in_object == False
|
||||
assert is_new_component_in_object == True
|
||||
assert object[target_component_name] == 'Capsule(Vec3(x:1.0, y:2.0, z:0.0), Vec3(x:0.0, y:0.0, z:0.0), 3.0)'
|
||||
assert get_bevy_component_value_by_long_name(object, target_component_name) == 'Capsule(Vec3(x:1.0, y:2.0, z:0.0), Vec3(x:0.0, y:0.0, z:0.0), 3.0)'
|
||||
assert get_component_propGroup(registry, target_component_name, get_component_metadata(object, target_component_name)) != None
|
||||
|
||||
|
||||
@ -75,22 +75,22 @@ def test_rename_component_bulk(setup_data):
|
||||
|
||||
rename_component_operator = bpy.ops.object.rename_bevy_component
|
||||
|
||||
source_component_name = "SomeOldUnitStruct"
|
||||
target_component_name = "UnitTest"
|
||||
source_component_name = "bevy_example::test_components::SomeOldUnitStruct"
|
||||
target_component_name = "bevy_example::test_components::UnitTest"
|
||||
objects_names = []
|
||||
for object in bpy.data.objects:
|
||||
object[source_component_name] = '()'
|
||||
upsert_bevy_component(object, source_component_name, '()')
|
||||
objects_names.append(object.name)
|
||||
|
||||
# bulk rename
|
||||
rename_component_operator(original_name=source_component_name, new_name=target_component_name, target_objects=json.dumps(objects_names))
|
||||
|
||||
for object in bpy.data.objects:
|
||||
is_old_component_in_object = source_component_name in object
|
||||
is_new_component_in_object = target_component_name in object
|
||||
is_old_component_in_object = is_bevy_component_in_object(object, source_component_name)
|
||||
is_new_component_in_object = is_bevy_component_in_object(object, target_component_name)
|
||||
assert is_old_component_in_object == False
|
||||
assert is_new_component_in_object == True
|
||||
assert object[target_component_name] == '()'
|
||||
assert get_bevy_component_value_by_long_name(object, target_component_name) == '()'
|
||||
assert get_component_propGroup(registry, target_component_name, get_component_metadata(object, target_component_name)) != None
|
||||
|
||||
def test_rename_component_single_error_handling(setup_data):
|
||||
@ -102,9 +102,9 @@ def test_rename_component_single_error_handling(setup_data):
|
||||
object = bpy.context.object
|
||||
|
||||
|
||||
source_component_name = "SomeOldUnitStruct"
|
||||
target_component_name = "UnitTest"
|
||||
object[source_component_name] = 'Capsule(Vec3(x:1.0, y:2.0, z:0.0), Vec3(x:0.0, y:0.0, z:0.0), 3.0)'
|
||||
source_component_name = "bevy_example::test_components::SomeOldUnitStruct"
|
||||
target_component_name = "bevy_example::test_components::UnitTest"
|
||||
upsert_bevy_component(object, source_component_name, 'Capsule(Vec3(x:1.0, y:2.0, z:0.0), Vec3(x:0.0, y:0.0, z:0.0), 3.0)')
|
||||
|
||||
expected_error = f'Error: Failed to rename component: Errors:["wrong custom property values to generate target component: object: \'{object.name}\', error: input string too big for a unit struct"]\n'
|
||||
expected_error = re.escape(expected_error)
|
||||
@ -113,11 +113,11 @@ def test_rename_component_single_error_handling(setup_data):
|
||||
|
||||
target_component_metadata = get_component_metadata(object, target_component_name)
|
||||
|
||||
is_old_component_in_object = source_component_name in object
|
||||
is_new_component_in_object = target_component_name in object
|
||||
is_old_component_in_object = is_bevy_component_in_object(object, source_component_name)
|
||||
is_new_component_in_object = is_bevy_component_in_object(object, target_component_name)
|
||||
assert is_old_component_in_object == False
|
||||
assert is_new_component_in_object == True
|
||||
assert object[target_component_name] == 'Capsule(Vec3(x:1.0, y:2.0, z:0.0), Vec3(x:0.0, y:0.0, z:0.0), 3.0)'
|
||||
assert get_bevy_component_value_by_long_name(object, target_component_name) == 'Capsule(Vec3(x:1.0, y:2.0, z:0.0), Vec3(x:0.0, y:0.0, z:0.0), 3.0)'
|
||||
assert get_component_propGroup(registry, target_component_name, target_component_metadata) != None
|
||||
assert target_component_metadata.invalid == True
|
||||
|
||||
@ -132,9 +132,9 @@ def test_rename_component_single_error_handling_clean_errors(setup_data):
|
||||
object = bpy.context.object
|
||||
|
||||
|
||||
source_component_name = "SomeOldUnitStruct"
|
||||
target_component_name = "UnitTest"
|
||||
object[source_component_name] = 'Capsule(Vec3(x:1.0, y:2.0, z:0.0), Vec3(x:0.0, y:0.0, z:0.0), 3.0)'
|
||||
source_component_name = "bevy_example::test_components::SomeOldUnitStruct"
|
||||
target_component_name = "bevy_example::test_components::UnitTest"
|
||||
upsert_bevy_component(object, source_component_name, 'Capsule(Vec3(x:1.0, y:2.0, z:0.0), Vec3(x:0.0, y:0.0, z:0.0), 3.0)')
|
||||
|
||||
expected_error = f'Error: Failed to rename component: Errors:["wrong custom property values to generate target component: object: \'{object.name}\', error: input string too big for a unit struct"]\n'
|
||||
expected_error = re.escape(expected_error)
|
||||
@ -143,11 +143,11 @@ def test_rename_component_single_error_handling_clean_errors(setup_data):
|
||||
|
||||
target_component_metadata = get_component_metadata(object, target_component_name)
|
||||
|
||||
is_old_component_in_object = source_component_name in object
|
||||
is_new_component_in_object = target_component_name in object
|
||||
is_old_component_in_object = is_bevy_component_in_object(object, source_component_name)
|
||||
is_new_component_in_object = is_bevy_component_in_object(object, target_component_name)
|
||||
assert is_old_component_in_object == False
|
||||
assert is_new_component_in_object == True
|
||||
assert object[target_component_name] == 'Capsule(Vec3(x:1.0, y:2.0, z:0.0), Vec3(x:0.0, y:0.0, z:0.0), 3.0)'
|
||||
assert get_bevy_component_value_by_long_name(object, target_component_name) == 'Capsule(Vec3(x:1.0, y:2.0, z:0.0), Vec3(x:0.0, y:0.0, z:0.0), 3.0)'
|
||||
assert get_component_propGroup(registry, target_component_name, target_component_metadata) != None
|
||||
assert target_component_metadata.invalid == True
|
||||
|
||||
|
@ -64,7 +64,7 @@ def test_shuffler(setup_data):
|
||||
assert get_bevy_component_value_by_long_name(object, long_name) == 'StructLike(a: 0.41416797041893005, b: 38, c: "ljfywwrv")'
|
||||
|
||||
# And another complex component
|
||||
long_name = "bevy_example::test_components::AnimationPlayer"
|
||||
long_name = "bevy_animation::AnimationPlayer"
|
||||
add_component_operator(component_type=long_name)
|
||||
|
||||
property_group_name = registry.get_propertyGroupName_from_longName(long_name)
|
||||
@ -116,7 +116,7 @@ def test_shuffler(setup_data):
|
||||
assert get_bevy_component_value_by_long_name(object, long_name) == '([0.8066907525062561, 0.9604947566986084])'
|
||||
|
||||
# And another complex component
|
||||
long_name = "bevy_example::test_components::SkinnedMesh"
|
||||
long_name = "bevy_render::mesh::mesh::skinning::SkinnedMesh"
|
||||
add_component_operator(component_type=long_name)
|
||||
|
||||
property_group_name = registry.get_propertyGroupName_from_longName(long_name)
|
||||
@ -133,7 +133,7 @@ def test_shuffler(setup_data):
|
||||
|
||||
|
||||
# And another complex component
|
||||
long_name = "bevy_example::test_components::CameraRenderGraph"
|
||||
long_name = "bevy_render::camera::camera::CameraRenderGraph"
|
||||
add_component_operator(component_type=long_name)
|
||||
|
||||
property_group_name = registry.get_propertyGroupName_from_longName(long_name)
|
||||
|
Loading…
Reference in New Issue
Block a user