chore(tools):
* updated tests & data for bevy_components, fixed minor issues in conversions & shuffler * bumped version numbers
This commit is contained in:
parent
906318b51e
commit
43267b7aa6
|
@ -3480,6 +3480,31 @@
|
|||
"type": "object",
|
||||
"typeInfo": "Struct"
|
||||
},
|
||||
"bevy_gltf_components::blender_settings::lighting::BlenderLightShadows": {
|
||||
"additionalProperties": false,
|
||||
"isComponent": true,
|
||||
"isResource": false,
|
||||
"properties": {
|
||||
"buffer_bias": {
|
||||
"type": {
|
||||
"$ref": "#/$defs/f32"
|
||||
}
|
||||
},
|
||||
"enabled": {
|
||||
"type": {
|
||||
"$ref": "#/$defs/bool"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"enabled",
|
||||
"buffer_bias"
|
||||
],
|
||||
"short_name": "BlenderLightShadows",
|
||||
"title": "bevy_gltf_components::blender_settings::lighting::BlenderLightShadows",
|
||||
"type": "object",
|
||||
"typeInfo": "Struct"
|
||||
},
|
||||
"bevy_gltf_components::blender_settings::lighting::BlenderShadowSettings": {
|
||||
"additionalProperties": false,
|
||||
"isComponent": true,
|
||||
|
@ -3556,51 +3581,29 @@
|
|||
"type": "array",
|
||||
"typeInfo": "TupleStruct"
|
||||
},
|
||||
"bevy_gltf_worlflow_examples_common::core::lighting::lighting_replace_proxies::BlenderBackgroundShader": {
|
||||
"bevy_gltf_worlflow_examples_common::game::picking::Pickable": {
|
||||
"additionalProperties": false,
|
||||
"isComponent": true,
|
||||
"isResource": false,
|
||||
"properties": {
|
||||
"brightness": {
|
||||
"type": {
|
||||
"$ref": "#/$defs/f32"
|
||||
}
|
||||
},
|
||||
"color": {
|
||||
"type": {
|
||||
"$ref": "#/$defs/bevy_render::color::Color"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"color",
|
||||
"brightness"
|
||||
],
|
||||
"short_name": "BlenderBackgroundShader",
|
||||
"title": "bevy_gltf_worlflow_examples_common::core::lighting::lighting_replace_proxies::BlenderBackgroundShader",
|
||||
"properties": {},
|
||||
"required": [],
|
||||
"short_name": "Pickable",
|
||||
"title": "bevy_gltf_worlflow_examples_common::game::picking::Pickable",
|
||||
"type": "object",
|
||||
"typeInfo": "Struct"
|
||||
},
|
||||
"bevy_gltf_worlflow_examples_common::core::lighting::lighting_replace_proxies::BlenderShadowSettings": {
|
||||
"bevy_gltf_worlflow_examples_common::game::player::Player": {
|
||||
"additionalProperties": false,
|
||||
"isComponent": true,
|
||||
"isResource": false,
|
||||
"properties": {
|
||||
"size": {
|
||||
"type": {
|
||||
"$ref": "#/$defs/usize"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"size"
|
||||
],
|
||||
"short_name": "BlenderShadowSettings",
|
||||
"title": "bevy_gltf_worlflow_examples_common::core::lighting::lighting_replace_proxies::BlenderShadowSettings",
|
||||
"properties": {},
|
||||
"required": [],
|
||||
"short_name": "Player",
|
||||
"title": "bevy_gltf_worlflow_examples_common::game::player::Player",
|
||||
"type": "object",
|
||||
"typeInfo": "Struct"
|
||||
},
|
||||
"bevy_gltf_worlflow_examples_common::core::physics_rapier::physics_replace_proxies::AutoAABBCollider": {
|
||||
"bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::AutoAABBCollider": {
|
||||
"isComponent": true,
|
||||
"isResource": false,
|
||||
"oneOf": [
|
||||
|
@ -3609,11 +3612,11 @@
|
|||
"Capsule"
|
||||
],
|
||||
"short_name": "AutoAABBCollider",
|
||||
"title": "bevy_gltf_worlflow_examples_common::core::physics_rapier::physics_replace_proxies::AutoAABBCollider",
|
||||
"title": "bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::AutoAABBCollider",
|
||||
"type": "string",
|
||||
"typeInfo": "Enum"
|
||||
},
|
||||
"bevy_gltf_worlflow_examples_common::core::physics_rapier::physics_replace_proxies::Collider": {
|
||||
"bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::Collider": {
|
||||
"isComponent": true,
|
||||
"isResource": false,
|
||||
"oneOf": [
|
||||
|
@ -3674,32 +3677,10 @@
|
|||
}
|
||||
],
|
||||
"short_name": "Collider",
|
||||
"title": "bevy_gltf_worlflow_examples_common::core::physics_rapier::physics_replace_proxies::Collider",
|
||||
"title": "bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::Collider",
|
||||
"type": "object",
|
||||
"typeInfo": "Enum"
|
||||
},
|
||||
"bevy_gltf_worlflow_examples_common::game::picking::Pickable": {
|
||||
"additionalProperties": false,
|
||||
"isComponent": true,
|
||||
"isResource": false,
|
||||
"properties": {},
|
||||
"required": [],
|
||||
"short_name": "Pickable",
|
||||
"title": "bevy_gltf_worlflow_examples_common::game::picking::Pickable",
|
||||
"type": "object",
|
||||
"typeInfo": "Struct"
|
||||
},
|
||||
"bevy_gltf_worlflow_examples_common::game::player::Player": {
|
||||
"additionalProperties": false,
|
||||
"isComponent": true,
|
||||
"isResource": false,
|
||||
"properties": {},
|
||||
"required": [],
|
||||
"short_name": "Player",
|
||||
"title": "bevy_gltf_worlflow_examples_common::game::player::Player",
|
||||
"type": "object",
|
||||
"typeInfo": "Struct"
|
||||
},
|
||||
"bevy_hierarchy::components::children::Children": {
|
||||
"isComponent": true,
|
||||
"isResource": false,
|
||||
|
|
|
@ -3724,7 +3724,29 @@
|
|||
"type": "array",
|
||||
"typeInfo": "TupleStruct"
|
||||
},
|
||||
"bevy_gltf_worlflow_examples_common::core::physics_rapier::physics_replace_proxies::AutoAABBCollider": {
|
||||
"bevy_gltf_worlflow_examples_common::game::picking::Pickable": {
|
||||
"additionalProperties": false,
|
||||
"isComponent": true,
|
||||
"isResource": false,
|
||||
"properties": {},
|
||||
"required": [],
|
||||
"short_name": "Pickable",
|
||||
"title": "bevy_gltf_worlflow_examples_common::game::picking::Pickable",
|
||||
"type": "object",
|
||||
"typeInfo": "Struct"
|
||||
},
|
||||
"bevy_gltf_worlflow_examples_common::game::player::Player": {
|
||||
"additionalProperties": false,
|
||||
"isComponent": true,
|
||||
"isResource": false,
|
||||
"properties": {},
|
||||
"required": [],
|
||||
"short_name": "Player",
|
||||
"title": "bevy_gltf_worlflow_examples_common::game::player::Player",
|
||||
"type": "object",
|
||||
"typeInfo": "Struct"
|
||||
},
|
||||
"bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::AutoAABBCollider": {
|
||||
"isComponent": true,
|
||||
"isResource": false,
|
||||
"oneOf": [
|
||||
|
@ -3733,11 +3755,11 @@
|
|||
"Capsule"
|
||||
],
|
||||
"short_name": "AutoAABBCollider",
|
||||
"title": "bevy_gltf_worlflow_examples_common::core::physics_rapier::physics_replace_proxies::AutoAABBCollider",
|
||||
"title": "bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::AutoAABBCollider",
|
||||
"type": "string",
|
||||
"typeInfo": "Enum"
|
||||
},
|
||||
"bevy_gltf_worlflow_examples_common::core::physics_rapier::physics_replace_proxies::Collider": {
|
||||
"bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::Collider": {
|
||||
"isComponent": true,
|
||||
"isResource": false,
|
||||
"oneOf": [
|
||||
|
@ -3798,32 +3820,10 @@
|
|||
}
|
||||
],
|
||||
"short_name": "Collider",
|
||||
"title": "bevy_gltf_worlflow_examples_common::core::physics_rapier::physics_replace_proxies::Collider",
|
||||
"title": "bevy_gltf_worlflow_examples_common_rapier::physics::physics_replace_proxies::Collider",
|
||||
"type": "object",
|
||||
"typeInfo": "Enum"
|
||||
},
|
||||
"bevy_gltf_worlflow_examples_common::game::picking::Pickable": {
|
||||
"additionalProperties": false,
|
||||
"isComponent": true,
|
||||
"isResource": false,
|
||||
"properties": {},
|
||||
"required": [],
|
||||
"short_name": "Pickable",
|
||||
"title": "bevy_gltf_worlflow_examples_common::game::picking::Pickable",
|
||||
"type": "object",
|
||||
"typeInfo": "Struct"
|
||||
},
|
||||
"bevy_gltf_worlflow_examples_common::game::player::Player": {
|
||||
"additionalProperties": false,
|
||||
"isComponent": true,
|
||||
"isResource": false,
|
||||
"properties": {},
|
||||
"required": [],
|
||||
"short_name": "Player",
|
||||
"title": "bevy_gltf_worlflow_examples_common::game::player::Player",
|
||||
"type": "object",
|
||||
"typeInfo": "Struct"
|
||||
},
|
||||
"bevy_hierarchy::components::children::Children": {
|
||||
"isComponent": true,
|
||||
"isResource": false,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
bl_info = {
|
||||
"name": "bevy_components",
|
||||
"author": "kaosigh",
|
||||
"version": (0, 3, 0),
|
||||
"version": (0, 4, 0),
|
||||
"blender": (3, 4, 0),
|
||||
"location": "VIEW_3D",
|
||||
"description": "UI to help create Bevy blueprints and components",
|
||||
|
|
|
@ -164,7 +164,7 @@ type_mappings = {
|
|||
'alloc::borrow::Cow<str>': lambda value: str(value.replace('"', "")),
|
||||
|
||||
'bevy_render::color::Color': lambda value: parse_color(value, float, "Rgba"),
|
||||
'bevy_ecs::Entity': lambda value: int(value),
|
||||
'bevy_ecs::entity::Entity': lambda value: int(value),
|
||||
}
|
||||
|
||||
def is_def_value_type(definition, registry):
|
||||
|
|
|
@ -150,7 +150,7 @@ class ComponentsRegistry(PropertyGroup):
|
|||
|
||||
"enum": dict(type=EnumProperty, presets=dict()),
|
||||
|
||||
'bevy_ecs::Entity': {"type": IntProperty, "presets": {"min":0} },
|
||||
'bevy_ecs::entity::Entity': {"type": IntProperty, "presets": {"min":0} },
|
||||
'bevy_utils::Uuid': dict(type=StringProperty, presets=dict()),
|
||||
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ class ComponentsRegistry(PropertyGroup):
|
|||
|
||||
"bevy_render::color::Color": [1.0, 1.0, 0.0, 1.0],
|
||||
|
||||
'bevy_ecs::Entity': 0,#4294967295, # this is the same as Bevy's Entity::Placeholder, too big for Blender..sigh
|
||||
'bevy_ecs::entity::Entity': 0,#4294967295, # this is the same as Bevy's Entity::Placeholder, too big for Blender..sigh
|
||||
'bevy_utils::Uuid': '"'+str(uuid.uuid4())+'"'
|
||||
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ type_mappings = {
|
|||
'alloc::string::String': lambda : random_word(8),
|
||||
'alloc::borrow::Cow<str>': lambda : random_word(8),
|
||||
|
||||
'bevy_ecs::Entity': lambda: 0, #4294967295, #
|
||||
'bevy_ecs::entity::Entity': lambda: 0, #4294967295, #
|
||||
'bevy_utils::Uuid': lambda: '"'+str( uuid.UUID("73b3b118-7d01-4778-8bcc-4e79055f5d22") )+'"'
|
||||
}
|
||||
#
|
||||
|
@ -199,6 +199,7 @@ def component_values_shuffler(seed=1, property_group=None, definition=None, regi
|
|||
for i in range(0, number_of_list_items_to_add):
|
||||
new_entry = item_list.add()
|
||||
item_type_name = getattr(new_entry, "type_name") # we get the REAL type name
|
||||
|
||||
definition = registry.type_infos[item_type_name] if item_type_name in registry.type_infos else None
|
||||
|
||||
if definition != None:
|
||||
|
@ -207,7 +208,7 @@ def component_values_shuffler(seed=1, property_group=None, definition=None, regi
|
|||
pass
|
||||
else:
|
||||
print("something else")
|
||||
fieldValue = type_mappings[type_name]()
|
||||
fieldValue = type_mappings[type_name]() if type_name in type_mappings else 'None'
|
||||
return fieldValue
|
||||
|
||||
#return value
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
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)',
|
||||
'BlenderBackgroundShader': '(strength: 0.0, color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.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))',
|
||||
|
@ -16,11 +18,12 @@ expected_custom_property_values = {'AComponentWithAnExtremlyExageratedOrMaybeNot
|
|||
'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': '(hdr: true, is_active: true, msaa_writeback: true, order: 0, viewport: None)',
|
||||
'Camera2d': '(clear_color: Default)',
|
||||
'Camera3d': '(clear_color: Default, depth_load_op: Clear(0.0), depth_texture_usages: "", '
|
||||
'screen_space_specular_transmission_quality: "", screen_space_specular_transmission_steps: 0)',
|
||||
'CameraRenderGraph': '(" ")',
|
||||
'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))',
|
||||
|
@ -47,17 +50,20 @@ expected_custom_property_values = {'AComponentWithAnExtremlyExageratedOrMaybeNot
|
|||
'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: "")',
|
||||
'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("")',
|
||||
|
@ -82,11 +88,13 @@ expected_custom_property_values = {'AComponentWithAnExtremlyExageratedOrMaybeNot
|
|||
'Handle<SkinnedMeshInverseBindposes>': 'Strong("")',
|
||||
'Handle<StandardDynamicAssetCollection>': 'Strong("")',
|
||||
'Handle<StandardMaterial>': 'Strong("")',
|
||||
'Handle<TextureAtlas>': '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(""))',
|
||||
|
@ -112,6 +120,7 @@ expected_custom_property_values = {'AComponentWithAnExtremlyExageratedOrMaybeNot
|
|||
'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)',
|
||||
|
@ -126,10 +135,10 @@ expected_custom_property_values = {'AComponentWithAnExtremlyExageratedOrMaybeNot
|
|||
'ScreenSpaceAmbientOcclusionSettings': '(quality_level: "")',
|
||||
'Sensor': '()',
|
||||
'ShadowFilteringMethod': 'Hardware2x2',
|
||||
'BlenderShadowSettings': '(cascade_size: 0)',
|
||||
'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)',
|
||||
|
@ -144,12 +153,10 @@ expected_custom_property_values = {'AComponentWithAnExtremlyExageratedOrMaybeNot
|
|||
'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': '(alignment: Left, linebreak_behavior: WordBoundary, sections: [])',
|
||||
'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))',
|
||||
'TextureAtlasSprite': '(anchor: Center, color: Rgba(red:1.0, green:1.0, blue:0.0, alpha:1.0), custom_size: "", '
|
||||
'flip_x: true, flip_y: true, index: 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))',
|
||||
|
@ -163,10 +170,8 @@ expected_custom_property_values = {'AComponentWithAnExtremlyExageratedOrMaybeNot
|
|||
'TupleVec2': '(Vec2(x:0.0, y:0.0))',
|
||||
'TupleVec3': '(Vec3(x:0.0, y:0.0, z:0.0))',
|
||||
'TupleVecF32F32': '([])',
|
||||
'UiCameraConfig': '(show_ui: true)',
|
||||
'UiImage': '(flip_x: true, flip_y: true, texture: Strong(""))',
|
||||
'UiImageSize': '(size: Vec2(x:0.0, y:0.0))',
|
||||
'UiTextureAtlasImage': '(flip_x: true, flip_y: true, index: 0)',
|
||||
'UnitTest': '()',
|
||||
'VecOfColors': '([])',
|
||||
'VecOfF32s': '([])',
|
||||
|
@ -177,13 +182,14 @@ expected_custom_property_values = {'AComponentWithAnExtremlyExageratedOrMaybeNot
|
|||
'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), '
|
||||
'fit_canvas_to_parent: 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, '
|
||||
'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: "")',
|
||||
'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)'}
|
||||
|
||||
|
||||
|
@ -193,14 +199,16 @@ expected_custom_property_values_randomized = {'AComponentWithAnExtremlyExagerate
|
|||
'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)',
|
||||
'BlenderBackgroundShader': '(strength: 0.5714026093482971, color: Rgba(red:0.42888906598091125, '
|
||||
'green:0.5780913233757019, blue:0.20609822869300842, alpha:0.8133212327957153))',
|
||||
'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: '
|
||||
|
@ -211,11 +219,12 @@ expected_custom_property_values_randomized = {'AComponentWithAnExtremlyExagerate
|
|||
'Button': '()',
|
||||
'CalculatedClip': '(clip: (max: Vec2(x:0.5714026093482971, y:0.42888906598091125), min: Vec2(x:0.5780913233757019, '
|
||||
'y:0.20609822869300842)))',
|
||||
'Camera': '(hdr: true, is_active: false, msaa_writeback: false, order: 61, viewport: None)',
|
||||
'Camera2d': '(clear_color: None)',
|
||||
'Camera3d': '(clear_color: None, depth_load_op: Clear(0.42888906598091125), depth_texture_usages: "", '
|
||||
'screen_space_specular_transmission_quality: "", screen_space_specular_transmission_steps: 73)',
|
||||
'CameraRenderGraph': '("sbnpsago")',
|
||||
'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))',
|
||||
|
@ -245,6 +254,7 @@ expected_custom_property_values_randomized = {'AComponentWithAnExtremlyExagerate
|
|||
'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), '
|
||||
|
@ -253,7 +263,8 @@ expected_custom_property_values_randomized = {'AComponentWithAnExtremlyExagerate
|
|||
'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: "")',
|
||||
'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)',
|
||||
|
@ -262,6 +273,7 @@ expected_custom_property_values_randomized = {'AComponentWithAnExtremlyExagerate
|
|||
'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("")',
|
||||
|
@ -286,11 +298,14 @@ expected_custom_property_values_randomized = {'AComponentWithAnExtremlyExagerate
|
|||
'Handle<SkinnedMeshInverseBindposes>': 'Strong("")',
|
||||
'Handle<StandardDynamicAssetCollection>': 'Strong("")',
|
||||
'Handle<StandardMaterial>': 'Strong("")',
|
||||
'Handle<TextureAtlas>': '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(""))',
|
||||
|
@ -330,6 +345,8 @@ expected_custom_property_values_randomized = {'AComponentWithAnExtremlyExagerate
|
|||
'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: '
|
||||
|
@ -347,10 +364,11 @@ expected_custom_property_values_randomized = {'AComponentWithAnExtremlyExagerate
|
|||
'ScreenSpaceAmbientOcclusionSettings': '(quality_level: "")',
|
||||
'Sensor': '()',
|
||||
'ShadowFilteringMethod': 'Jimenez14',
|
||||
'BlenderShadowSettings': '(cascade_size: 73)',
|
||||
'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, '
|
||||
|
@ -373,7 +391,7 @@ expected_custom_property_values_randomized = {'AComponentWithAnExtremlyExagerate
|
|||
'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': '(alignment: Right, linebreak_behavior: WordBoundary, sections: [(style: (color: Rgba(red:0.4825616776943207, '
|
||||
'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: '
|
||||
|
@ -381,9 +399,6 @@ expected_custom_property_values_randomized = {'AComponentWithAnExtremlyExagerate
|
|||
'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))',
|
||||
'TextureAtlasSprite': '(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, index: 4)',
|
||||
'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), '
|
||||
|
@ -399,10 +414,8 @@ expected_custom_property_values_randomized = {'AComponentWithAnExtremlyExagerate
|
|||
'TupleVec2': '(Vec2(x:0.5714026093482971, y:0.42888906598091125))',
|
||||
'TupleVec3': '(Vec3(x:0.5714026093482971, y:0.42888906598091125, z:0.5780913233757019))',
|
||||
'TupleVecF32F32': '([(0.42888906598091125, 0.5780913233757019)])',
|
||||
'UiCameraConfig': '(show_ui: true)',
|
||||
'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))',
|
||||
'UiTextureAtlasImage': '(flip_x: true, flip_y: false, index: 54)',
|
||||
'UnitTest': '()',
|
||||
'VecOfColors': '([Rgba(red:0.42888906598091125, green:0.5780913233757019, blue:0.20609822869300842, '
|
||||
'alpha:0.8133212327957153)])',
|
||||
|
@ -415,15 +428,15 @@ expected_custom_property_values_randomized = {'AComponentWithAnExtremlyExagerate
|
|||
'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), fit_canvas_to_parent: false, focused: true, ime_enabled: true, ime_position: '
|
||||
'Vec2(x:0.16022956371307373, y:0.5206693410873413), internal: (maximize_request: Some(false), '
|
||||
'minimize_request: None, physical_cursor_position: Some(DVec2(x:0.0445563830435276, '
|
||||
'y:0.8601610660552979))), mode: SizedFullscreen, position: Centered(Primary), present_mode: Fifo, '
|
||||
'prevent_default_event_handling: true, resizable: true, resize_constraints: (max_height: '
|
||||
'0.2623211145401001, max_width: 0.17467059195041656, min_height: 0.30310511589050293, min_width: '
|
||||
'0.36258742213249207), resolution: (physical_height: 58, physical_width: 98, scale_factor: '
|
||||
'0.8600491285324097, scale_factor_override: None), title: "otmbsahe", transparent: false, visible: true, '
|
||||
'window_level: Normal, window_theme: "")',
|
||||
'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)'}
|
||||
|
||||
|
|
|
@ -48,12 +48,12 @@ def test_components_should_generate_correct_custom_properties(setup_data):
|
|||
except Exception as error:
|
||||
errors.append(error)
|
||||
|
||||
"""pp = pprint.PrettyPrinter(depth=14, width=120)
|
||||
'''pp = pprint.PrettyPrinter(depth=14, width=120)
|
||||
print("CUSTOM PROPERTY VALUES")
|
||||
pp.pprint(custom_property_values)"""
|
||||
pp.pprint(custom_property_values)'''
|
||||
|
||||
assert len(errors) == 0
|
||||
assert len(added_components) == 152
|
||||
assert len(added_components) == 158
|
||||
|
||||
|
||||
def test_components_should_generate_correct_custom_properties_with_randomized_values(setup_data):
|
||||
|
@ -105,7 +105,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) == 152
|
||||
assert len(added_components) == 158
|
||||
|
||||
def test_components_should_generate_correct_propertyGroup_values_from_custom_properties(setup_data):
|
||||
registry = bpy.context.window_manager.components_registry
|
||||
|
@ -163,7 +163,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) == 152
|
||||
assert len(added_components) == 158
|
||||
|
||||
|
||||
def test_remove_components(setup_data):
|
||||
|
|
|
@ -140,3 +140,21 @@ def test_shuffler(setup_data):
|
|||
# cheating / making things easier for us for complex types: we use the custom property value
|
||||
assert object[short_name] == '(inverse_bindposes: Weak(Uuid(uuid: "73b3b118-7d01-4778-8bcc-4e79055f5d22")), joints: [0, 0])'
|
||||
|
||||
|
||||
# And another complex component
|
||||
short_name = "CameraRenderGraph"
|
||||
component_type = registry.short_names_to_long_names[short_name]
|
||||
add_component_operator(component_type=component_type)
|
||||
|
||||
property_group_name = registry.get_propertyGroupName_from_shortName(short_name)
|
||||
target_components_metadata = object.components_meta.components
|
||||
component_meta = next(filter(lambda component: component["name"] == short_name, target_components_metadata), None)
|
||||
propertyGroup = getattr(component_meta, property_group_name, None)
|
||||
|
||||
definition = type_infos[component_type]
|
||||
component_values_shuffler(seed= 17, property_group=propertyGroup, definition=definition, registry=registry)
|
||||
|
||||
print("propertyGroup", object[short_name])
|
||||
# cheating / making things easier for us for complex types: we use the custom property value
|
||||
assert object[short_name] == 'None'
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
bl_info = {
|
||||
"name": "gltf_auto_export",
|
||||
"author": "kaosigh",
|
||||
"version": (0, 14, 0),
|
||||
"version": (0, 15, 0),
|
||||
"blender": (3, 4, 0),
|
||||
"location": "File > Import-Export",
|
||||
"description": "glTF/glb auto-export",
|
||||
|
|
Loading…
Reference in New Issue