LUMIX_PROP refactor
This commit is contained in:
parent
e9c1e9a189
commit
724d31f486
8 changed files with 162 additions and 158 deletions
|
@ -115,24 +115,24 @@ AnimationSystemImpl::AnimationSystemImpl(Engine& engine)
|
|||
using namespace Reflection;
|
||||
static auto anim_scene = scene("animation",
|
||||
component("property_animator",
|
||||
property("Animation", LUMIX_PROP(AnimationScene, getPropertyAnimation, setPropertyAnimation),
|
||||
property("Animation", LUMIX_PROP(AnimationScene, PropertyAnimation),
|
||||
ResourceAttribute("Property animation (*.anp)", PROPERTY_ANIMATION_TYPE))
|
||||
),
|
||||
component("anim_controller",
|
||||
property("Source", LUMIX_PROP(AnimationScene, getControllerSource, setControllerSource),
|
||||
property("Source", LUMIX_PROP(AnimationScene, ControllerSource),
|
||||
ResourceAttribute("Animation controller (*.act)", CONTROLLER_RESOURCE_TYPE)),
|
||||
AnimSetProperty()
|
||||
),
|
||||
component("animable",
|
||||
property("Animation", LUMIX_PROP(AnimationScene, getAnimation, setAnimation),
|
||||
property("Animation", LUMIX_PROP(AnimationScene, Animation),
|
||||
ResourceAttribute("Animation (*.ani)", ANIMATION_TYPE)),
|
||||
property("Start time", LUMIX_PROP(AnimationScene, getAnimableStartTime, setAnimableStartTime),
|
||||
property("Start time", LUMIX_PROP(AnimationScene, AnimableStartTime),
|
||||
MinAttribute(0)),
|
||||
property("Time scale", LUMIX_PROP(AnimationScene, getAnimableTimeScale, setAnimableTimeScale),
|
||||
property("Time scale", LUMIX_PROP(AnimationScene, AnimableTimeScale),
|
||||
MinAttribute(0))
|
||||
),
|
||||
component("shared_anim_controller",
|
||||
property("Parent", LUMIX_PROP(AnimationScene, getSharedControllerParent, setSharedControllerParent))
|
||||
property("Parent", LUMIX_PROP(AnimationScene, SharedControllerParent))
|
||||
)
|
||||
);
|
||||
registerScene(anim_scene);
|
||||
|
|
|
@ -22,19 +22,19 @@ static void registerProperties(IAllocator& allocator)
|
|||
using namespace Reflection;
|
||||
static auto audio_scene = scene("audio",
|
||||
component("ambient_sound",
|
||||
property("3D", LUMIX_PROP(AudioScene, isAmbientSound3D, setAmbientSound3D)),
|
||||
dyn_enum_property("Sound", LUMIX_PROP(AudioScene, getAmbientSoundClipIndex, setAmbientSoundClipIndex), &AudioScene::getClipCount, &AudioScene::getClipName)
|
||||
property("3D", LUMIX_PROP_FULL(AudioScene, isAmbientSound3D, setAmbientSound3D)),
|
||||
dyn_enum_property("Sound", LUMIX_PROP(AudioScene, AmbientSoundClipIndex), &AudioScene::getClipCount, &AudioScene::getClipName)
|
||||
),
|
||||
component("audio_listener"),
|
||||
component("echo_zone",
|
||||
property("Radius", LUMIX_PROP(AudioScene, getEchoZoneRadius, setEchoZoneRadius),
|
||||
property("Radius", LUMIX_PROP(AudioScene, EchoZoneRadius),
|
||||
MinAttribute(0)),
|
||||
property("Delay (ms)", LUMIX_PROP(AudioScene, getEchoZoneDelay, setEchoZoneDelay),
|
||||
property("Delay (ms)", LUMIX_PROP(AudioScene, EchoZoneDelay),
|
||||
MinAttribute(0))),
|
||||
component("chorus_zone",
|
||||
property("Radius", LUMIX_PROP(AudioScene, getChorusZoneRadius, setChorusZoneRadius),
|
||||
property("Radius", LUMIX_PROP(AudioScene, ChorusZoneRadius),
|
||||
MinAttribute(0)),
|
||||
property("Delay (ms)", LUMIX_PROP(AudioScene, getChorusZoneDelay, setChorusZoneDelay),
|
||||
property("Delay (ms)", LUMIX_PROP(AudioScene, ChorusZoneDelay),
|
||||
MinAttribute(0))
|
||||
)
|
||||
);
|
||||
|
|
|
@ -8,8 +8,10 @@
|
|||
#include "engine/metaprogramming.h"
|
||||
|
||||
|
||||
#define LUMIX_PROP(Scene, Getter, Setter) \
|
||||
#define LUMIX_PROP_FULL(Scene, Getter, Setter) \
|
||||
&Scene::Getter, #Scene "::" #Getter, &Scene::Setter, #Scene "::" #Setter
|
||||
#define LUMIX_PROP(Scene, Property) \
|
||||
&Scene::get##Property, #Scene "::get" #Property, &Scene::set##Property, #Scene "::set" #Property
|
||||
|
||||
#define LUMIX_FUNC(Func)\
|
||||
&Func, #Func
|
||||
|
|
|
@ -79,29 +79,29 @@ struct GUISystemImpl LUMIX_FINAL : public GUISystem
|
|||
using namespace Reflection;
|
||||
static auto lua_scene = scene("gui",
|
||||
component("gui_text",
|
||||
property("Text", LUMIX_PROP(GUIScene, getText, setText)),
|
||||
property("Font", LUMIX_PROP(GUIScene, getTextFontPath, setTextFontPath),
|
||||
property("Text", LUMIX_PROP(GUIScene, Text)),
|
||||
property("Font", LUMIX_PROP(GUIScene, TextFontPath),
|
||||
ResourceAttribute("Font (*.ttf)", FONT_TYPE)),
|
||||
property("Font Size", LUMIX_PROP(GUIScene, getTextFontSize, setTextFontSize)),
|
||||
property("Color", LUMIX_PROP(GUIScene, getTextColorRGBA, setTextColorRGBA),
|
||||
property("Font Size", LUMIX_PROP(GUIScene, TextFontSize)),
|
||||
property("Color", LUMIX_PROP(GUIScene, TextColorRGBA),
|
||||
ColorAttribute())
|
||||
),
|
||||
component("gui_image",
|
||||
property("Color", LUMIX_PROP(GUIScene, getImageColorRGBA, setImageColorRGBA),
|
||||
property("Color", LUMIX_PROP(GUIScene, ImageColorRGBA),
|
||||
ColorAttribute()),
|
||||
property("Sprite", LUMIX_PROP(GUIScene, getImageSprite, setImageSprite),
|
||||
property("Sprite", LUMIX_PROP(GUIScene, ImageSprite),
|
||||
ResourceAttribute("Sprite (*.spr)", SPRITE_TYPE))
|
||||
),
|
||||
component("gui_rect",
|
||||
property("Enabled", LUMIX_PROP(GUIScene, isRectEnabled, enableRect)),
|
||||
property("Top Points", LUMIX_PROP(GUIScene, getRectTopPoints, setRectTopPoints)),
|
||||
property("Top Relative", LUMIX_PROP(GUIScene, getRectTopRelative, setRectTopRelative)),
|
||||
property("Right Points", LUMIX_PROP(GUIScene, getRectRightPoints, setRectRightPoints)),
|
||||
property("Right Relative", LUMIX_PROP(GUIScene, getRectRightRelative, setRectRightRelative)),
|
||||
property("Bottom Points", LUMIX_PROP(GUIScene, getRectBottomPoints, setRectBottomPoints)),
|
||||
property("Bottom Relative", LUMIX_PROP(GUIScene, getRectBottomRelative, setRectBottomRelative)),
|
||||
property("Left Points", LUMIX_PROP(GUIScene, getRectLeftPoints, setRectLeftPoints)),
|
||||
property("Left Relative", LUMIX_PROP(GUIScene, getRectLeftRelative, setRectLeftRelative))
|
||||
property("Enabled", LUMIX_PROP_FULL(GUIScene, isRectEnabled, enableRect)),
|
||||
property("Top Points", LUMIX_PROP(GUIScene, RectTopPoints)),
|
||||
property("Top Relative", LUMIX_PROP(GUIScene, RectTopRelative)),
|
||||
property("Right Points", LUMIX_PROP(GUIScene, RectRightPoints)),
|
||||
property("Right Relative", LUMIX_PROP(GUIScene, RectRightRelative)),
|
||||
property("Bottom Points", LUMIX_PROP(GUIScene, RectBottomPoints)),
|
||||
property("Bottom Relative", LUMIX_PROP(GUIScene, RectBottomRelative)),
|
||||
property("Left Points", LUMIX_PROP(GUIScene, RectLeftPoints)),
|
||||
property("Left Relative", LUMIX_PROP(GUIScene, RectLeftRelative))
|
||||
)
|
||||
);
|
||||
registerScene(lua_scene);
|
||||
|
|
|
@ -1793,7 +1793,7 @@ namespace Lumix
|
|||
using namespace Reflection;
|
||||
static auto lua_scene = scene("lua_script",
|
||||
component("lua_script",
|
||||
blob_property("data", LUMIX_PROP(LuaScriptScene, getScriptData, setScriptData))
|
||||
blob_property("data", LUMIX_PROP(LuaScriptScene, ScriptData))
|
||||
)
|
||||
);
|
||||
registerScene(lua_scene);
|
||||
|
|
|
@ -127,12 +127,12 @@ void NavigationSystem::registerProperties()
|
|||
functions(
|
||||
function(LUMIX_FUNC(NavigationScene::navigate))
|
||||
),
|
||||
property("Radius", LUMIX_PROP(NavigationScene, getAgentRadius, setAgentRadius),
|
||||
property("Radius", LUMIX_PROP(NavigationScene, AgentRadius),
|
||||
MinAttribute(0)),
|
||||
property("Height", LUMIX_PROP(NavigationScene, getAgentHeight, setAgentHeight),
|
||||
property("Height", LUMIX_PROP(NavigationScene, AgentHeight),
|
||||
MinAttribute(0)),
|
||||
property("Use root motion", LUMIX_PROP(NavigationScene, useAgentRootMotion, setUseAgentRootMotion)),
|
||||
property("Get root motion from animation", LUMIX_PROP(NavigationScene, isGettingRootMotionFromAnim, setIsGettingRootMotionFromAnim))
|
||||
property("Use root motion", LUMIX_PROP_FULL(NavigationScene, useAgentRootMotion, setUseAgentRootMotion)),
|
||||
property("Get root motion from animation", LUMIX_PROP_FULL(NavigationScene, isGettingRootMotionFromAnim, setIsGettingRootMotionFromAnim))
|
||||
)
|
||||
);
|
||||
registerScene(navigation_scene);
|
||||
|
|
|
@ -55,119 +55,119 @@ namespace Lumix
|
|||
function(LUMIX_FUNC(PhysicsScene::raycastEx))
|
||||
),
|
||||
component("ragdoll",
|
||||
blob_property("data", LUMIX_PROP(PhysicsScene, getRagdollData, setRagdollData)),
|
||||
property("Layer", LUMIX_PROP(PhysicsScene, getRagdollLayer, setRagdollLayer))
|
||||
blob_property("data", LUMIX_PROP(PhysicsScene, RagdollData)),
|
||||
property("Layer", LUMIX_PROP(PhysicsScene, RagdollLayer))
|
||||
),
|
||||
component("sphere_rigid_actor",
|
||||
property("Radius", LUMIX_PROP(PhysicsScene, getSphereRadius, setSphereRadius),
|
||||
property("Radius", LUMIX_PROP(PhysicsScene, SphereRadius),
|
||||
MinAttribute(0)),
|
||||
property("Layer", LUMIX_PROP(PhysicsScene, getActorLayer, setActorLayer)),
|
||||
enum_property("Dynamic", LUMIX_PROP(PhysicsScene, getDynamicType, setDynamicType), 3, getDynamicTypeName),
|
||||
property("Trigger", LUMIX_PROP(PhysicsScene, getIsTrigger, setIsTrigger))
|
||||
property("Layer", LUMIX_PROP(PhysicsScene, ActorLayer)),
|
||||
enum_property("Dynamic", LUMIX_PROP(PhysicsScene, DynamicType), 3, getDynamicTypeName),
|
||||
property("Trigger", LUMIX_PROP(PhysicsScene, IsTrigger))
|
||||
),
|
||||
component("capsule_rigid_actor",
|
||||
property("Radius", LUMIX_PROP(PhysicsScene, getCapsuleRadius, setCapsuleRadius),
|
||||
property("Radius", LUMIX_PROP(PhysicsScene, CapsuleRadius),
|
||||
MinAttribute(0)),
|
||||
property("Height", LUMIX_PROP(PhysicsScene, getCapsuleHeight, setCapsuleHeight)),
|
||||
enum_property("Dynamic", LUMIX_PROP(PhysicsScene, getDynamicType, setDynamicType), 3, getDynamicTypeName),
|
||||
property("Trigger", LUMIX_PROP(PhysicsScene, getIsTrigger, setIsTrigger))
|
||||
property("Height", LUMIX_PROP(PhysicsScene, CapsuleHeight)),
|
||||
enum_property("Dynamic", LUMIX_PROP(PhysicsScene, DynamicType), 3, getDynamicTypeName),
|
||||
property("Trigger", LUMIX_PROP(PhysicsScene, IsTrigger))
|
||||
),
|
||||
component("d6_joint",
|
||||
property("Connected body", LUMIX_PROP(PhysicsScene, getJointConnectedBody, setJointConnectedBody)),
|
||||
property("Axis position", LUMIX_PROP(PhysicsScene, getJointAxisPosition, setJointAxisPosition)),
|
||||
property("Axis direction", LUMIX_PROP(PhysicsScene, getJointAxisDirection, setJointAxisDirection)),
|
||||
enum_property("X motion", LUMIX_PROP(PhysicsScene, getD6JointXMotion, setD6JointXMotion), 3, getD6MotionName),
|
||||
enum_property("Y motion", LUMIX_PROP(PhysicsScene, getD6JointYMotion, setD6JointYMotion), 3, getD6MotionName),
|
||||
enum_property("Z motion", LUMIX_PROP(PhysicsScene, getD6JointZMotion, setD6JointZMotion), 3, getD6MotionName),
|
||||
enum_property("Swing 1", LUMIX_PROP(PhysicsScene, getD6JointSwing1Motion, setD6JointSwing1Motion), 3, getD6MotionName),
|
||||
enum_property("Swing 2", LUMIX_PROP(PhysicsScene, getD6JointSwing2Motion, setD6JointSwing2Motion), 3, getD6MotionName),
|
||||
enum_property("Twist", LUMIX_PROP(PhysicsScene, getD6JointTwistMotion, setD6JointTwistMotion), 3, getD6MotionName),
|
||||
property("Linear limit", LUMIX_PROP(PhysicsScene, getD6JointLinearLimit, setD6JointLinearLimit),
|
||||
property("Connected body", LUMIX_PROP(PhysicsScene, JointConnectedBody)),
|
||||
property("Axis position", LUMIX_PROP(PhysicsScene, JointAxisPosition)),
|
||||
property("Axis direction", LUMIX_PROP(PhysicsScene, JointAxisDirection)),
|
||||
enum_property("X motion", LUMIX_PROP(PhysicsScene, D6JointXMotion), 3, getD6MotionName),
|
||||
enum_property("Y motion", LUMIX_PROP(PhysicsScene, D6JointYMotion), 3, getD6MotionName),
|
||||
enum_property("Z motion", LUMIX_PROP(PhysicsScene, D6JointZMotion), 3, getD6MotionName),
|
||||
enum_property("Swing 1", LUMIX_PROP(PhysicsScene, D6JointSwing1Motion), 3, getD6MotionName),
|
||||
enum_property("Swing 2", LUMIX_PROP(PhysicsScene, D6JointSwing2Motion), 3, getD6MotionName),
|
||||
enum_property("Twist", LUMIX_PROP(PhysicsScene, D6JointTwistMotion), 3, getD6MotionName),
|
||||
property("Linear limit", LUMIX_PROP(PhysicsScene, D6JointLinearLimit),
|
||||
MinAttribute(0)),
|
||||
property("Swing limit", LUMIX_PROP(PhysicsScene, getD6JointSwingLimit, setD6JointSwingLimit),
|
||||
property("Swing limit", LUMIX_PROP(PhysicsScene, D6JointSwingLimit),
|
||||
RadiansAttribute()),
|
||||
property("Twist limit", LUMIX_PROP(PhysicsScene, getD6JointTwistLimit, setD6JointTwistLimit),
|
||||
property("Twist limit", LUMIX_PROP(PhysicsScene, D6JointTwistLimit),
|
||||
RadiansAttribute()),
|
||||
property("Damping", LUMIX_PROP(PhysicsScene, getD6JointDamping, setD6JointDamping)),
|
||||
property("Stiffness", LUMIX_PROP(PhysicsScene, getD6JointStiffness, setD6JointStiffness)),
|
||||
property("Restitution", LUMIX_PROP(PhysicsScene, getD6JointRestitution, setD6JointRestitution))
|
||||
property("Damping", LUMIX_PROP(PhysicsScene, D6JointDamping)),
|
||||
property("Stiffness", LUMIX_PROP(PhysicsScene, D6JointStiffness)),
|
||||
property("Restitution", LUMIX_PROP(PhysicsScene, D6JointRestitution))
|
||||
),
|
||||
component("spherical_joint",
|
||||
property("Connected body", LUMIX_PROP(PhysicsScene, getJointConnectedBody, setJointConnectedBody)),
|
||||
property("Axis position", LUMIX_PROP(PhysicsScene, getJointAxisPosition, setJointAxisPosition)),
|
||||
property("Axis direction", LUMIX_PROP(PhysicsScene, getJointAxisDirection, setJointAxisDirection)),
|
||||
property("Use limit", LUMIX_PROP(PhysicsScene, getSphericalJointUseLimit, setSphericalJointUseLimit)),
|
||||
property("Limit", LUMIX_PROP(PhysicsScene, getSphericalJointLimit, setSphericalJointLimit),
|
||||
property("Connected body", LUMIX_PROP(PhysicsScene, JointConnectedBody)),
|
||||
property("Axis position", LUMIX_PROP(PhysicsScene, JointAxisPosition)),
|
||||
property("Axis direction", LUMIX_PROP(PhysicsScene, JointAxisDirection)),
|
||||
property("Use limit", LUMIX_PROP(PhysicsScene, SphericalJointUseLimit)),
|
||||
property("Limit", LUMIX_PROP(PhysicsScene, SphericalJointLimit),
|
||||
RadiansAttribute())
|
||||
),
|
||||
component("distance_joint",
|
||||
property("Connected body", LUMIX_PROP(PhysicsScene, getJointConnectedBody, setJointConnectedBody)),
|
||||
property("Axis position", LUMIX_PROP(PhysicsScene, getJointAxisPosition, setJointAxisPosition)),
|
||||
property("Damping", LUMIX_PROP(PhysicsScene, getDistanceJointDamping, setDistanceJointDamping),
|
||||
property("Connected body", LUMIX_PROP(PhysicsScene, JointConnectedBody)),
|
||||
property("Axis position", LUMIX_PROP(PhysicsScene, JointAxisPosition)),
|
||||
property("Damping", LUMIX_PROP(PhysicsScene, DistanceJointDamping),
|
||||
MinAttribute(0)),
|
||||
property("Stiffness", LUMIX_PROP(PhysicsScene, getDistanceJointStiffness, setDistanceJointStiffness),
|
||||
property("Stiffness", LUMIX_PROP(PhysicsScene, DistanceJointStiffness),
|
||||
MinAttribute(0)),
|
||||
property("Tolerance", LUMIX_PROP(PhysicsScene, getDistanceJointTolerance, setDistanceJointTolerance),
|
||||
property("Tolerance", LUMIX_PROP(PhysicsScene, DistanceJointTolerance),
|
||||
MinAttribute(0)),
|
||||
property("Limits", LUMIX_PROP(PhysicsScene, getDistanceJointLimits, setDistanceJointLimits))
|
||||
property("Limits", LUMIX_PROP(PhysicsScene, DistanceJointLimits))
|
||||
),
|
||||
component("hinge_joint",
|
||||
property("Connected body", LUMIX_PROP(PhysicsScene, getJointConnectedBody, setJointConnectedBody)),
|
||||
property("Damping", LUMIX_PROP(PhysicsScene, getHingeJointDamping, setHingeJointDamping),
|
||||
property("Connected body", LUMIX_PROP(PhysicsScene, JointConnectedBody)),
|
||||
property("Damping", LUMIX_PROP(PhysicsScene, HingeJointDamping),
|
||||
MinAttribute(0)),
|
||||
property("Stiffness", LUMIX_PROP(PhysicsScene, getHingeJointStiffness, setHingeJointStiffness),
|
||||
property("Stiffness", LUMIX_PROP(PhysicsScene, HingeJointStiffness),
|
||||
MinAttribute(0)),
|
||||
property("Axis position", LUMIX_PROP(PhysicsScene, getJointAxisPosition, setJointAxisPosition)),
|
||||
property("Axis direction", LUMIX_PROP(PhysicsScene, getJointAxisDirection, setJointAxisDirection)),
|
||||
property("Use limit", LUMIX_PROP(PhysicsScene, getHingeJointUseLimit, setHingeJointUseLimit)),
|
||||
property("Limit", LUMIX_PROP(PhysicsScene, getHingeJointLimit, setHingeJointLimit),
|
||||
property("Axis position", LUMIX_PROP(PhysicsScene, JointAxisPosition)),
|
||||
property("Axis direction", LUMIX_PROP(PhysicsScene, JointAxisDirection)),
|
||||
property("Use limit", LUMIX_PROP(PhysicsScene, HingeJointUseLimit)),
|
||||
property("Limit", LUMIX_PROP(PhysicsScene, HingeJointLimit),
|
||||
RadiansAttribute())
|
||||
),
|
||||
component("physical_controller",
|
||||
functions(
|
||||
function(LUMIX_FUNC(PhysicsScene::moveController))
|
||||
),
|
||||
property("Radius", LUMIX_PROP(PhysicsScene, getControllerRadius, setControllerRadius)),
|
||||
property("Height", LUMIX_PROP(PhysicsScene, getControllerHeight, setControllerHeight)),
|
||||
property("Layer", LUMIX_PROP(PhysicsScene, getControllerLayer, setControllerLayer))
|
||||
property("Radius", LUMIX_PROP(PhysicsScene, ControllerRadius)),
|
||||
property("Height", LUMIX_PROP(PhysicsScene, ControllerHeight)),
|
||||
property("Layer", LUMIX_PROP(PhysicsScene, ControllerLayer))
|
||||
),
|
||||
component("rigid_actor",
|
||||
property("Layer", LUMIX_PROP(PhysicsScene, getActorLayer, setActorLayer)),
|
||||
enum_property("Dynamic", LUMIX_PROP(PhysicsScene, getDynamicType, setDynamicType), 3, getDynamicTypeName),
|
||||
property("Trigger", LUMIX_PROP(PhysicsScene, getIsTrigger, setIsTrigger)),
|
||||
property("Layer", LUMIX_PROP(PhysicsScene, ActorLayer)),
|
||||
enum_property("Dynamic", LUMIX_PROP(PhysicsScene, DynamicType), 3, getDynamicTypeName),
|
||||
property("Trigger", LUMIX_PROP(PhysicsScene, IsTrigger)),
|
||||
array("Box geometry", &PhysicsScene::getBoxGeometryCount, &PhysicsScene::addBoxGeometry, &PhysicsScene::removeBoxGeometry,
|
||||
property("Size", LUMIX_PROP(PhysicsScene, getBoxGeomHalfExtents, setBoxGeomHalfExtents)),
|
||||
property("Position offset", LUMIX_PROP(PhysicsScene, getBoxGeomOffsetPosition, setBoxGeomOffsetPosition)),
|
||||
property("Rotation offset", LUMIX_PROP(PhysicsScene, getBoxGeomOffsetRotation, setBoxGeomOffsetRotation),
|
||||
property("Size", LUMIX_PROP(PhysicsScene, BoxGeomHalfExtents)),
|
||||
property("Position offset", LUMIX_PROP(PhysicsScene, BoxGeomOffsetPosition)),
|
||||
property("Rotation offset", LUMIX_PROP(PhysicsScene, BoxGeomOffsetRotation),
|
||||
RadiansAttribute())
|
||||
),
|
||||
array("Sphere geometry", &PhysicsScene::getBoxGeometryCount, &PhysicsScene::addBoxGeometry, &PhysicsScene::removeBoxGeometry,
|
||||
property("Radius", LUMIX_PROP(PhysicsScene, getSphereGeomRadius, setSphereGeomRadius),
|
||||
property("Radius", LUMIX_PROP(PhysicsScene, SphereGeomRadius),
|
||||
MinAttribute(0)),
|
||||
property("Position offset", LUMIX_PROP(PhysicsScene, getSphereGeomOffsetPosition, setSphereGeomOffsetPosition)),
|
||||
property("Rotation offset", LUMIX_PROP(PhysicsScene, getSphereGeomOffsetRotation, setSphereGeomOffsetRotation),
|
||||
property("Position offset", LUMIX_PROP(PhysicsScene, SphereGeomOffsetPosition)),
|
||||
property("Rotation offset", LUMIX_PROP(PhysicsScene, SphereGeomOffsetRotation),
|
||||
RadiansAttribute())
|
||||
)
|
||||
),
|
||||
component("box_rigid_actor",
|
||||
property("Layer", LUMIX_PROP(PhysicsScene, getActorLayer, setActorLayer)),
|
||||
enum_property("Dynamic", LUMIX_PROP(PhysicsScene, getDynamicType, setDynamicType), 3, getDynamicTypeName),
|
||||
property("Trigger", LUMIX_PROP(PhysicsScene, getIsTrigger, setIsTrigger)),
|
||||
property("Size", LUMIX_PROP(PhysicsScene, getHalfExtents, setHalfExtents))
|
||||
property("Layer", LUMIX_PROP(PhysicsScene, ActorLayer)),
|
||||
enum_property("Dynamic", LUMIX_PROP(PhysicsScene, DynamicType), 3, getDynamicTypeName),
|
||||
property("Trigger", LUMIX_PROP(PhysicsScene, IsTrigger)),
|
||||
property("Size", LUMIX_PROP(PhysicsScene, HalfExtents))
|
||||
),
|
||||
component("mesh_rigid_actor",
|
||||
property("Layer", LUMIX_PROP(PhysicsScene, getActorLayer, setActorLayer)),
|
||||
enum_property("Dynamic", LUMIX_PROP(PhysicsScene, getDynamicType, setDynamicType), 3, getDynamicTypeName),
|
||||
property("Source", LUMIX_PROP(PhysicsScene, getShapeSource, setShapeSource),
|
||||
property("Layer", LUMIX_PROP(PhysicsScene, ActorLayer)),
|
||||
enum_property("Dynamic", LUMIX_PROP(PhysicsScene, DynamicType), 3, getDynamicTypeName),
|
||||
property("Source", LUMIX_PROP(PhysicsScene, ShapeSource),
|
||||
ResourceAttribute("Physics (*.phy)", PHYSICS_TYPE))
|
||||
),
|
||||
component("physical_heightfield",
|
||||
property("Layer", LUMIX_PROP(PhysicsScene, getHeightfieldLayer, setHeightfieldLayer)),
|
||||
property("Heightmap", LUMIX_PROP(PhysicsScene, getHeightmapSource, setHeightmapSource),
|
||||
property("Layer", LUMIX_PROP(PhysicsScene, HeightfieldLayer)),
|
||||
property("Heightmap", LUMIX_PROP(PhysicsScene, HeightmapSource),
|
||||
ResourceAttribute("Image (*.raw)", TEXTURE_TYPE)),
|
||||
property("Y scale", LUMIX_PROP(PhysicsScene, getHeightmapYScale, setHeightmapYScale),
|
||||
property("Y scale", LUMIX_PROP(PhysicsScene, HeightmapYScale),
|
||||
MinAttribute(0)),
|
||||
property("XZ scale", LUMIX_PROP(PhysicsScene, getHeightmapXZScale, setHeightmapXZScale),
|
||||
property("XZ scale", LUMIX_PROP(PhysicsScene, HeightmapXZScale),
|
||||
MinAttribute(0))
|
||||
)
|
||||
);
|
||||
|
|
|
@ -149,139 +149,141 @@ static void registerProperties(IAllocator& allocator)
|
|||
{
|
||||
using namespace Reflection;
|
||||
|
||||
//&RenderScene::getParticleEmitterShapeRadius
|
||||
|
||||
static auto render_scene = scene("renderer",
|
||||
component("bone_attachment",
|
||||
property("Parent", LUMIX_PROP(RenderScene, getBoneAttachmentParent, setBoneAttachmentParent)),
|
||||
property("Relative position", LUMIX_PROP(RenderScene, getBoneAttachmentPosition, setBoneAttachmentPosition)),
|
||||
property("Relative rotation", LUMIX_PROP(RenderScene, getBoneAttachmentRotation, setBoneAttachmentRotation),
|
||||
property("Parent", LUMIX_PROP(RenderScene, BoneAttachmentParent)),
|
||||
property("Relative position", LUMIX_PROP(RenderScene, BoneAttachmentPosition)),
|
||||
property("Relative rotation", LUMIX_PROP(RenderScene, BoneAttachmentRotation),
|
||||
RadiansAttribute()),
|
||||
BoneProperty()
|
||||
),
|
||||
component("particle_emitter_spawn_shape",
|
||||
property("Radius", LUMIX_PROP(RenderScene, getParticleEmitterShapeRadius, setParticleEmitterShapeRadius))
|
||||
property("Radius", LUMIX_PROP(RenderScene, ParticleEmitterShapeRadius))
|
||||
),
|
||||
component("particle_emitter_plane",
|
||||
property("Bounce", LUMIX_PROP(RenderScene, getParticleEmitterPlaneBounce, setParticleEmitterPlaneBounce),
|
||||
property("Bounce", LUMIX_PROP(RenderScene, ParticleEmitterPlaneBounce),
|
||||
ClampAttribute(0, 1)),
|
||||
array("Planes", &RenderScene::getParticleEmitterPlaneCount, &RenderScene::addParticleEmitterPlane, &RenderScene::removeParticleEmitterPlane,
|
||||
property("Entity", LUMIX_PROP(RenderScene, getParticleEmitterPlaneEntity, setParticleEmitterPlaneEntity))
|
||||
property("Entity", LUMIX_PROP(RenderScene, ParticleEmitterPlaneEntity))
|
||||
)
|
||||
),
|
||||
component("particle_emitter_attractor",
|
||||
property("Force", LUMIX_PROP(RenderScene, getParticleEmitterAttractorForce, setParticleEmitterAttractorForce)),
|
||||
property("Force", LUMIX_PROP(RenderScene, ParticleEmitterAttractorForce)),
|
||||
array("Attractors", &RenderScene::getParticleEmitterAttractorCount, &RenderScene::addParticleEmitterAttractor, &RenderScene::removeParticleEmitterAttractor,
|
||||
property("Entity", LUMIX_PROP(RenderScene, getParticleEmitterAttractorEntity, setParticleEmitterAttractorEntity))
|
||||
property("Entity", LUMIX_PROP(RenderScene, ParticleEmitterAttractorEntity))
|
||||
)
|
||||
),
|
||||
component("particle_emitter_alpha",
|
||||
sampled_func_property("Alpha", LUMIX_PROP(RenderScene, getParticleEmitterAlpha, setParticleEmitterAlpha), &RenderScene::getParticleEmitterAlphaCount, 1)
|
||||
sampled_func_property("Alpha", LUMIX_PROP(RenderScene, ParticleEmitterAlpha), &RenderScene::getParticleEmitterAlphaCount, 1)
|
||||
),
|
||||
component("particle_emitter_random_rotation"),
|
||||
component("environment_probe"),
|
||||
component("particle_emitter_force",
|
||||
property("Acceleration", LUMIX_PROP(RenderScene, getParticleEmitterAcceleration, setParticleEmitterAcceleration))
|
||||
property("Acceleration", LUMIX_PROP(RenderScene, ParticleEmitterAcceleration))
|
||||
),
|
||||
component("particle_emitter_subimage",
|
||||
property("Rows", LUMIX_PROP(RenderScene, getParticleEmitterSubimageRows, setParticleEmitterSubimageRows)),
|
||||
property("Columns", LUMIX_PROP(RenderScene, getParticleEmitterSubimageCols, setParticleEmitterSubimageCols))
|
||||
property("Rows", LUMIX_PROP(RenderScene, ParticleEmitterSubimageRows)),
|
||||
property("Columns", LUMIX_PROP(RenderScene, ParticleEmitterSubimageCols))
|
||||
),
|
||||
component("particle_emitter_size",
|
||||
sampled_func_property("Size", LUMIX_PROP(RenderScene, getParticleEmitterSize, setParticleEmitterSize), &RenderScene::getParticleEmitterSizeCount, 1)
|
||||
sampled_func_property("Size", LUMIX_PROP(RenderScene, ParticleEmitterSize), &RenderScene::getParticleEmitterSizeCount, 1)
|
||||
),
|
||||
component("scripted_particle_emitter",
|
||||
property("Material", LUMIX_PROP(RenderScene, getScriptedParticleEmitterMaterialPath, setScriptedParticleEmitterMaterialPath),
|
||||
property("Material", LUMIX_PROP(RenderScene, ScriptedParticleEmitterMaterialPath),
|
||||
ResourceAttribute("Material (*.mat)", MATERIAL_TYPE))
|
||||
),
|
||||
component("particle_emitter",
|
||||
property("Life", LUMIX_PROP(RenderScene, getParticleEmitterInitialLife, setParticleEmitterInitialLife)),
|
||||
property("Initial size", LUMIX_PROP(RenderScene, getParticleEmitterInitialSize, setParticleEmitterInitialSize)),
|
||||
property("Spawn period", LUMIX_PROP(RenderScene, getParticleEmitterSpawnPeriod, setParticleEmitterSpawnPeriod)),
|
||||
property("Autoemit", LUMIX_PROP(RenderScene, getParticleEmitterAutoemit, setParticleEmitterAutoemit)),
|
||||
property("Local space", LUMIX_PROP(RenderScene, getParticleEmitterLocalSpace, setParticleEmitterLocalSpace)),
|
||||
property("Material", LUMIX_PROP(RenderScene, getParticleEmitterMaterialPath, setParticleEmitterMaterialPath),
|
||||
property("Life", LUMIX_PROP(RenderScene, ParticleEmitterInitialLife)),
|
||||
property("Initial size", LUMIX_PROP(RenderScene, ParticleEmitterInitialSize)),
|
||||
property("Spawn period", LUMIX_PROP(RenderScene, ParticleEmitterSpawnPeriod)),
|
||||
property("Autoemit", LUMIX_PROP(RenderScene, ParticleEmitterAutoemit)),
|
||||
property("Local space", LUMIX_PROP(RenderScene, ParticleEmitterLocalSpace)),
|
||||
property("Material", LUMIX_PROP(RenderScene, ParticleEmitterMaterialPath),
|
||||
ResourceAttribute("Material (*.mat)", MATERIAL_TYPE)),
|
||||
property("Spawn count", LUMIX_PROP(RenderScene, getParticleEmitterSpawnCount, setParticleEmitterSpawnCount))
|
||||
property("Spawn count", LUMIX_PROP(RenderScene, ParticleEmitterSpawnCount))
|
||||
),
|
||||
component("particle_emitter_linear_movement",
|
||||
property("x", LUMIX_PROP(RenderScene, getParticleEmitterLinearMovementX, setParticleEmitterLinearMovementX)),
|
||||
property("y", LUMIX_PROP(RenderScene, getParticleEmitterLinearMovementY, setParticleEmitterLinearMovementY)),
|
||||
property("z", LUMIX_PROP(RenderScene, getParticleEmitterLinearMovementZ, setParticleEmitterLinearMovementZ))
|
||||
property("x", LUMIX_PROP(RenderScene, ParticleEmitterLinearMovementX)),
|
||||
property("y", LUMIX_PROP(RenderScene, ParticleEmitterLinearMovementY)),
|
||||
property("z", LUMIX_PROP(RenderScene, ParticleEmitterLinearMovementZ))
|
||||
),
|
||||
component("camera",
|
||||
property("Slot", LUMIX_PROP(RenderScene, getCameraSlot, setCameraSlot)),
|
||||
property("Orthographic size", LUMIX_PROP(RenderScene, getCameraOrthoSize, setCameraOrthoSize),
|
||||
property("Slot", LUMIX_PROP(RenderScene, CameraSlot)),
|
||||
property("Orthographic size", LUMIX_PROP(RenderScene, CameraOrthoSize),
|
||||
MinAttribute(0)),
|
||||
property("Orthographic", LUMIX_PROP(RenderScene, isCameraOrtho, setCameraOrtho)),
|
||||
property("FOV", LUMIX_PROP(RenderScene, getCameraFOV, setCameraFOV),
|
||||
property("Orthographic", LUMIX_PROP_FULL(RenderScene, isCameraOrtho, setCameraOrtho)),
|
||||
property("FOV", LUMIX_PROP(RenderScene, CameraFOV),
|
||||
RadiansAttribute()),
|
||||
property("Near", LUMIX_PROP(RenderScene, getCameraNearPlane, setCameraNearPlane),
|
||||
property("Near", LUMIX_PROP(RenderScene, CameraNearPlane),
|
||||
MinAttribute(0)),
|
||||
property("Far", LUMIX_PROP(RenderScene, getCameraFarPlane, setCameraFarPlane),
|
||||
property("Far", LUMIX_PROP(RenderScene, CameraFarPlane),
|
||||
MinAttribute(0))
|
||||
),
|
||||
component("renderable",
|
||||
property("Enabled", LUMIX_PROP(RenderScene, isModelInstanceEnabled, enableModelInstance)),
|
||||
property("Source", LUMIX_PROP(RenderScene, getModelInstancePath, setModelInstancePath),
|
||||
property("Enabled", LUMIX_PROP_FULL(RenderScene, isModelInstanceEnabled, enableModelInstance)),
|
||||
property("Source", LUMIX_PROP(RenderScene, ModelInstancePath),
|
||||
ResourceAttribute("Mesh (*.msh)", MODEL_TYPE)),
|
||||
property("Keep skin", LUMIX_PROP(RenderScene, getModelInstanceKeepSkin, setModelInstanceKeepSkin)),
|
||||
property("Keep skin", LUMIX_PROP(RenderScene, ModelInstanceKeepSkin)),
|
||||
const_array("Materials", &RenderScene::getModelInstanceMaterialsCount,
|
||||
property("Source", LUMIX_PROP(RenderScene, getModelInstanceMaterial, setModelInstanceMaterial),
|
||||
property("Source", LUMIX_PROP(RenderScene, ModelInstanceMaterial),
|
||||
ResourceAttribute("Material (*.mat)", MATERIAL_TYPE))
|
||||
)
|
||||
),
|
||||
component("global_light",
|
||||
property("Color", LUMIX_PROP(RenderScene, getGlobalLightColor, setGlobalLightColor),
|
||||
property("Color", LUMIX_PROP(RenderScene, GlobalLightColor),
|
||||
ColorAttribute()),
|
||||
property("Intensity", LUMIX_PROP(RenderScene, getGlobalLightIntensity, setGlobalLightIntensity),
|
||||
property("Intensity", LUMIX_PROP(RenderScene, GlobalLightIntensity),
|
||||
MinAttribute(0)),
|
||||
property("Indirect intensity", LUMIX_PROP(RenderScene, getGlobalLightIndirectIntensity, setGlobalLightIndirectIntensity), MinAttribute(0)),
|
||||
property("Fog density", LUMIX_PROP(RenderScene, getFogDensity, setFogDensity),
|
||||
property("Indirect intensity", LUMIX_PROP(RenderScene, GlobalLightIndirectIntensity), MinAttribute(0)),
|
||||
property("Fog density", LUMIX_PROP(RenderScene, FogDensity),
|
||||
ClampAttribute(0, 1)),
|
||||
property("Fog bottom", LUMIX_PROP(RenderScene, getFogBottom, setFogBottom)),
|
||||
property("Fog height", LUMIX_PROP(RenderScene, getFogHeight, setFogHeight),
|
||||
property("Fog bottom", LUMIX_PROP(RenderScene, FogBottom)),
|
||||
property("Fog height", LUMIX_PROP(RenderScene, FogHeight),
|
||||
MinAttribute(0)),
|
||||
property("Fog color", LUMIX_PROP(RenderScene, getFogColor, setFogColor),
|
||||
property("Fog color", LUMIX_PROP(RenderScene, FogColor),
|
||||
ColorAttribute()),
|
||||
property("Shadow cascades", LUMIX_PROP(RenderScene, getShadowmapCascades, setShadowmapCascades))
|
||||
property("Shadow cascades", LUMIX_PROP(RenderScene, ShadowmapCascades))
|
||||
),
|
||||
component("point_light",
|
||||
property("Diffuse color", LUMIX_PROP(RenderScene, getPointLightColor, setPointLightColor),
|
||||
property("Diffuse color", LUMIX_PROP(RenderScene, PointLightColor),
|
||||
ColorAttribute()),
|
||||
property("Specular color", LUMIX_PROP(RenderScene, getPointLightSpecularColor, setPointLightSpecularColor),
|
||||
property("Specular color", LUMIX_PROP(RenderScene, PointLightSpecularColor),
|
||||
ColorAttribute()),
|
||||
property("Diffuse intensity", LUMIX_PROP(RenderScene, getPointLightIntensity, setPointLightIntensity),
|
||||
property("Diffuse intensity", LUMIX_PROP(RenderScene, PointLightIntensity),
|
||||
MinAttribute(0)),
|
||||
property("Specular intensity", LUMIX_PROP(RenderScene, getPointLightSpecularIntensity, setPointLightSpecularIntensity), MinAttribute(0)),
|
||||
property("FOV", LUMIX_PROP(RenderScene, getLightFOV, setLightFOV),
|
||||
property("Specular intensity", LUMIX_PROP(RenderScene, PointLightSpecularIntensity)),
|
||||
property("FOV", LUMIX_PROP(RenderScene, LightFOV),
|
||||
ClampAttribute(0, 360),
|
||||
RadiansAttribute()),
|
||||
property("Attenuation", LUMIX_PROP(RenderScene, getLightAttenuation, setLightAttenuation),
|
||||
property("Attenuation", LUMIX_PROP(RenderScene, LightAttenuation),
|
||||
ClampAttribute(0, 1000)),
|
||||
property("Range", LUMIX_PROP(RenderScene, getLightRange, setLightRange),
|
||||
property("Range", LUMIX_PROP(RenderScene, LightRange),
|
||||
MinAttribute(0)),
|
||||
property("Cast shadows", LUMIX_PROP(RenderScene, getLightCastShadows, setLightCastShadows),
|
||||
property("Cast shadows", LUMIX_PROP(RenderScene, LightCastShadows),
|
||||
MinAttribute(0))
|
||||
),
|
||||
component("decal",
|
||||
property("Material", LUMIX_PROP(RenderScene, getDecalMaterialPath, setDecalMaterialPath),
|
||||
property("Material", LUMIX_PROP(RenderScene, DecalMaterialPath),
|
||||
ResourceAttribute("Material (*.mat)", MATERIAL_TYPE)),
|
||||
property("Scale", LUMIX_PROP(RenderScene, getDecalScale, setDecalScale),
|
||||
property("Scale", LUMIX_PROP(RenderScene, DecalScale),
|
||||
MinAttribute(0))
|
||||
),
|
||||
component("terrain",
|
||||
property("Material", LUMIX_PROP(RenderScene, getTerrainMaterialPath, setTerrainMaterialPath),
|
||||
property("Material", LUMIX_PROP(RenderScene, TerrainMaterialPath),
|
||||
ResourceAttribute("Material (*.mat)", MATERIAL_TYPE)),
|
||||
property("XZ scale", LUMIX_PROP(RenderScene, getTerrainXZScale, setTerrainXZScale),
|
||||
property("XZ scale", LUMIX_PROP(RenderScene, TerrainXZScale),
|
||||
MinAttribute(0)),
|
||||
property("Height scale", LUMIX_PROP(RenderScene, getTerrainYScale, setTerrainYScale),
|
||||
property("Height scale", LUMIX_PROP(RenderScene, TerrainYScale),
|
||||
MinAttribute(0)),
|
||||
array("grass", &RenderScene::getGrassCount, &RenderScene::addGrass, &RenderScene::removeGrass,
|
||||
property("Mesh", LUMIX_PROP(RenderScene, getGrassPath, setGrassPath),
|
||||
property("Mesh", LUMIX_PROP(RenderScene, GrassPath),
|
||||
ResourceAttribute("Mesh (*.msh)", MODEL_TYPE)),
|
||||
property("Distance", LUMIX_PROP(RenderScene, getGrassDistance, setGrassDistance),
|
||||
property("Distance", LUMIX_PROP(RenderScene, GrassDistance),
|
||||
MinAttribute(1)),
|
||||
property("Density", LUMIX_PROP(RenderScene, getGrassDensity, setGrassDensity)),
|
||||
enum_property("Mode", LUMIX_PROP(RenderScene, getGrassRotationMode, setGrassRotationMode), (int)Terrain::GrassType::RotationMode::COUNT, getGrassRotationModeName)
|
||||
property("Density", LUMIX_PROP(RenderScene, GrassDensity)),
|
||||
enum_property("Mode", LUMIX_PROP(RenderScene, GrassRotationMode), (int)Terrain::GrassType::RotationMode::COUNT, getGrassRotationModeName)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue