1 #ifndef _RIVE_CORE_REGISTRY_HPP_
2 #define _RIVE_CORE_REGISTRY_HPP_
3 #include "animation/animation.hpp"
4 #include "animation/animation_state.hpp"
5 #include "animation/any_state.hpp"
6 #include "animation/cubic_interpolator.hpp"
7 #include "animation/entry_state.hpp"
8 #include "animation/exit_state.hpp"
9 #include "animation/keyed_object.hpp"
10 #include "animation/keyed_property.hpp"
11 #include "animation/keyframe.hpp"
12 #include "animation/keyframe_color.hpp"
13 #include "animation/keyframe_double.hpp"
14 #include "animation/keyframe_id.hpp"
15 #include "animation/layer_state.hpp"
16 #include "animation/linear_animation.hpp"
17 #include "animation/state_machine.hpp"
18 #include "animation/state_machine_bool.hpp"
19 #include "animation/state_machine_component.hpp"
20 #include "animation/state_machine_double.hpp"
21 #include "animation/state_machine_input.hpp"
22 #include "animation/state_machine_layer.hpp"
23 #include "animation/state_machine_layer_component.hpp"
24 #include "animation/state_machine_trigger.hpp"
25 #include "animation/state_transition.hpp"
26 #include "animation/transition_bool_condition.hpp"
27 #include "animation/transition_condition.hpp"
28 #include "animation/transition_double_condition.hpp"
29 #include "animation/transition_trigger_condition.hpp"
30 #include "animation/transition_value_condition.hpp"
31 #include "artboard.hpp"
32 #include "backboard.hpp"
33 #include "bones/bone.hpp"
34 #include "bones/cubic_weight.hpp"
35 #include "bones/root_bone.hpp"
36 #include "bones/skeletal_component.hpp"
37 #include "bones/skin.hpp"
38 #include "bones/tendon.hpp"
39 #include "bones/weight.hpp"
40 #include "component.hpp"
41 #include "container_component.hpp"
42 #include "draw_rules.hpp"
43 #include "draw_target.hpp"
44 #include "drawable.hpp"
46 #include "shapes/clipping_shape.hpp"
47 #include "shapes/cubic_asymmetric_vertex.hpp"
48 #include "shapes/cubic_detached_vertex.hpp"
49 #include "shapes/cubic_mirrored_vertex.hpp"
50 #include "shapes/cubic_vertex.hpp"
51 #include "shapes/ellipse.hpp"
52 #include "shapes/paint/fill.hpp"
53 #include "shapes/paint/gradient_stop.hpp"
54 #include "shapes/paint/linear_gradient.hpp"
55 #include "shapes/paint/radial_gradient.hpp"
56 #include "shapes/paint/shape_paint.hpp"
57 #include "shapes/paint/solid_color.hpp"
58 #include "shapes/paint/stroke.hpp"
59 #include "shapes/paint/trim_path.hpp"
60 #include "shapes/parametric_path.hpp"
61 #include "shapes/path.hpp"
62 #include "shapes/path_vertex.hpp"
63 #include "shapes/points_path.hpp"
64 #include "shapes/polygon.hpp"
65 #include "shapes/rectangle.hpp"
66 #include "shapes/shape.hpp"
67 #include "shapes/star.hpp"
68 #include "shapes/straight_vertex.hpp"
69 #include "shapes/triangle.hpp"
70 #include "transform_component.hpp"
76 static Core* makeCoreInstance(int typeKey)
80 case DrawTargetBase::typeKey:
81 return new DrawTarget();
82 case AnimationStateBase::typeKey:
83 return new AnimationState();
84 case KeyedObjectBase::typeKey:
85 return new KeyedObject();
86 case TransitionTriggerConditionBase::typeKey:
87 return new TransitionTriggerCondition();
88 case KeyedPropertyBase::typeKey:
89 return new KeyedProperty();
90 case StateMachineDoubleBase::typeKey:
91 return new StateMachineDouble();
92 case KeyFrameIdBase::typeKey:
93 return new KeyFrameId();
94 case AnyStateBase::typeKey:
95 return new AnyState();
96 case StateMachineLayerBase::typeKey:
97 return new StateMachineLayer();
98 case AnimationBase::typeKey:
99 return new Animation();
100 case CubicInterpolatorBase::typeKey:
101 return new CubicInterpolator();
102 case TransitionDoubleConditionBase::typeKey:
103 return new TransitionDoubleCondition();
104 case StateTransitionBase::typeKey:
105 return new StateTransition();
106 case KeyFrameDoubleBase::typeKey:
107 return new KeyFrameDouble();
108 case KeyFrameColorBase::typeKey:
109 return new KeyFrameColor();
110 case StateMachineBase::typeKey:
111 return new StateMachine();
112 case EntryStateBase::typeKey:
113 return new EntryState();
114 case LinearAnimationBase::typeKey:
115 return new LinearAnimation();
116 case StateMachineTriggerBase::typeKey:
117 return new StateMachineTrigger();
118 case ExitStateBase::typeKey:
119 return new ExitState();
120 case TransitionBoolConditionBase::typeKey:
121 return new TransitionBoolCondition();
122 case StateMachineBoolBase::typeKey:
123 return new StateMachineBool();
124 case LinearGradientBase::typeKey:
125 return new LinearGradient();
126 case RadialGradientBase::typeKey:
127 return new RadialGradient();
128 case StrokeBase::typeKey:
130 case SolidColorBase::typeKey:
131 return new SolidColor();
132 case GradientStopBase::typeKey:
133 return new GradientStop();
134 case TrimPathBase::typeKey:
135 return new TrimPath();
136 case FillBase::typeKey:
138 case NodeBase::typeKey:
140 case ShapeBase::typeKey:
142 case StraightVertexBase::typeKey:
143 return new StraightVertex();
144 case CubicAsymmetricVertexBase::typeKey:
145 return new CubicAsymmetricVertex();
146 case PointsPathBase::typeKey:
147 return new PointsPath();
148 case RectangleBase::typeKey:
149 return new Rectangle();
150 case CubicMirroredVertexBase::typeKey:
151 return new CubicMirroredVertex();
152 case TriangleBase::typeKey:
153 return new Triangle();
154 case EllipseBase::typeKey:
155 return new Ellipse();
156 case ClippingShapeBase::typeKey:
157 return new ClippingShape();
158 case PolygonBase::typeKey:
159 return new Polygon();
160 case StarBase::typeKey:
162 case CubicDetachedVertexBase::typeKey:
163 return new CubicDetachedVertex();
164 case DrawRulesBase::typeKey:
165 return new DrawRules();
166 case ArtboardBase::typeKey:
167 return new Artboard();
168 case BackboardBase::typeKey:
169 return new Backboard();
170 case WeightBase::typeKey:
172 case BoneBase::typeKey:
174 case RootBoneBase::typeKey:
175 return new RootBone();
176 case SkinBase::typeKey:
178 case TendonBase::typeKey:
180 case CubicWeightBase::typeKey:
181 return new CubicWeight();
185 static void setString(Core* object, int propertyKey, std::string value)
189 case ComponentBase::namePropertyKey:
190 object->as<ComponentBase>()->name(value);
192 case StateMachineComponentBase::namePropertyKey:
193 object->as<StateMachineComponentBase>()->name(value);
195 case AnimationBase::namePropertyKey:
196 object->as<AnimationBase>()->name(value);
200 static void setUint(Core* object, int propertyKey, int value)
204 case ComponentBase::parentIdPropertyKey:
205 object->as<ComponentBase>()->parentId(value);
207 case DrawTargetBase::drawableIdPropertyKey:
208 object->as<DrawTargetBase>()->drawableId(value);
210 case DrawTargetBase::placementValuePropertyKey:
211 object->as<DrawTargetBase>()->placementValue(value);
213 case AnimationStateBase::animationIdPropertyKey:
214 object->as<AnimationStateBase>()->animationId(value);
216 case KeyedObjectBase::objectIdPropertyKey:
217 object->as<KeyedObjectBase>()->objectId(value);
219 case TransitionConditionBase::inputIdPropertyKey:
220 object->as<TransitionConditionBase>()->inputId(value);
222 case KeyedPropertyBase::propertyKeyPropertyKey:
223 object->as<KeyedPropertyBase>()->propertyKey(value);
225 case KeyFrameBase::framePropertyKey:
226 object->as<KeyFrameBase>()->frame(value);
228 case KeyFrameBase::interpolationTypePropertyKey:
229 object->as<KeyFrameBase>()->interpolationType(value);
231 case KeyFrameBase::interpolatorIdPropertyKey:
232 object->as<KeyFrameBase>()->interpolatorId(value);
234 case KeyFrameIdBase::valuePropertyKey:
235 object->as<KeyFrameIdBase>()->value(value);
237 case TransitionValueConditionBase::opValuePropertyKey:
238 object->as<TransitionValueConditionBase>()->opValue(value);
240 case StateTransitionBase::stateToIdPropertyKey:
241 object->as<StateTransitionBase>()->stateToId(value);
243 case StateTransitionBase::flagsPropertyKey:
244 object->as<StateTransitionBase>()->flags(value);
246 case StateTransitionBase::durationPropertyKey:
247 object->as<StateTransitionBase>()->duration(value);
249 case LinearAnimationBase::fpsPropertyKey:
250 object->as<LinearAnimationBase>()->fps(value);
252 case LinearAnimationBase::durationPropertyKey:
253 object->as<LinearAnimationBase>()->duration(value);
255 case LinearAnimationBase::loopValuePropertyKey:
256 object->as<LinearAnimationBase>()->loopValue(value);
258 case LinearAnimationBase::workStartPropertyKey:
259 object->as<LinearAnimationBase>()->workStart(value);
261 case LinearAnimationBase::workEndPropertyKey:
262 object->as<LinearAnimationBase>()->workEnd(value);
264 case StrokeBase::capPropertyKey:
265 object->as<StrokeBase>()->cap(value);
267 case StrokeBase::joinPropertyKey:
268 object->as<StrokeBase>()->join(value);
270 case TrimPathBase::modeValuePropertyKey:
271 object->as<TrimPathBase>()->modeValue(value);
273 case FillBase::fillRulePropertyKey:
274 object->as<FillBase>()->fillRule(value);
276 case PathBase::pathFlagsPropertyKey:
277 object->as<PathBase>()->pathFlags(value);
279 case DrawableBase::blendModeValuePropertyKey:
280 object->as<DrawableBase>()->blendModeValue(value);
282 case DrawableBase::drawableFlagsPropertyKey:
283 object->as<DrawableBase>()->drawableFlags(value);
285 case ClippingShapeBase::sourceIdPropertyKey:
286 object->as<ClippingShapeBase>()->sourceId(value);
288 case ClippingShapeBase::fillRulePropertyKey:
289 object->as<ClippingShapeBase>()->fillRule(value);
291 case PolygonBase::pointsPropertyKey:
292 object->as<PolygonBase>()->points(value);
294 case DrawRulesBase::drawTargetIdPropertyKey:
295 object->as<DrawRulesBase>()->drawTargetId(value);
297 case WeightBase::valuesPropertyKey:
298 object->as<WeightBase>()->values(value);
300 case WeightBase::indicesPropertyKey:
301 object->as<WeightBase>()->indices(value);
303 case TendonBase::boneIdPropertyKey:
304 object->as<TendonBase>()->boneId(value);
306 case CubicWeightBase::inValuesPropertyKey:
307 object->as<CubicWeightBase>()->inValues(value);
309 case CubicWeightBase::inIndicesPropertyKey:
310 object->as<CubicWeightBase>()->inIndices(value);
312 case CubicWeightBase::outValuesPropertyKey:
313 object->as<CubicWeightBase>()->outValues(value);
315 case CubicWeightBase::outIndicesPropertyKey:
316 object->as<CubicWeightBase>()->outIndices(value);
320 static void setDouble(Core* object, int propertyKey, float value)
324 case StateMachineDoubleBase::valuePropertyKey:
325 object->as<StateMachineDoubleBase>()->value(value);
327 case CubicInterpolatorBase::x1PropertyKey:
328 object->as<CubicInterpolatorBase>()->x1(value);
330 case CubicInterpolatorBase::y1PropertyKey:
331 object->as<CubicInterpolatorBase>()->y1(value);
333 case CubicInterpolatorBase::x2PropertyKey:
334 object->as<CubicInterpolatorBase>()->x2(value);
336 case CubicInterpolatorBase::y2PropertyKey:
337 object->as<CubicInterpolatorBase>()->y2(value);
339 case TransitionDoubleConditionBase::valuePropertyKey:
340 object->as<TransitionDoubleConditionBase>()->value(value);
342 case KeyFrameDoubleBase::valuePropertyKey:
343 object->as<KeyFrameDoubleBase>()->value(value);
345 case LinearAnimationBase::speedPropertyKey:
346 object->as<LinearAnimationBase>()->speed(value);
348 case LinearGradientBase::startXPropertyKey:
349 object->as<LinearGradientBase>()->startX(value);
351 case LinearGradientBase::startYPropertyKey:
352 object->as<LinearGradientBase>()->startY(value);
354 case LinearGradientBase::endXPropertyKey:
355 object->as<LinearGradientBase>()->endX(value);
357 case LinearGradientBase::endYPropertyKey:
358 object->as<LinearGradientBase>()->endY(value);
360 case LinearGradientBase::opacityPropertyKey:
361 object->as<LinearGradientBase>()->opacity(value);
363 case StrokeBase::thicknessPropertyKey:
364 object->as<StrokeBase>()->thickness(value);
366 case GradientStopBase::positionPropertyKey:
367 object->as<GradientStopBase>()->position(value);
369 case TrimPathBase::startPropertyKey:
370 object->as<TrimPathBase>()->start(value);
372 case TrimPathBase::endPropertyKey:
373 object->as<TrimPathBase>()->end(value);
375 case TrimPathBase::offsetPropertyKey:
376 object->as<TrimPathBase>()->offset(value);
378 case TransformComponentBase::rotationPropertyKey:
379 object->as<TransformComponentBase>()->rotation(value);
381 case TransformComponentBase::scaleXPropertyKey:
382 object->as<TransformComponentBase>()->scaleX(value);
384 case TransformComponentBase::scaleYPropertyKey:
385 object->as<TransformComponentBase>()->scaleY(value);
387 case TransformComponentBase::opacityPropertyKey:
388 object->as<TransformComponentBase>()->opacity(value);
390 case NodeBase::xPropertyKey:
391 object->as<NodeBase>()->x(value);
393 case NodeBase::yPropertyKey:
394 object->as<NodeBase>()->y(value);
396 case PathVertexBase::xPropertyKey:
397 object->as<PathVertexBase>()->x(value);
399 case PathVertexBase::yPropertyKey:
400 object->as<PathVertexBase>()->y(value);
402 case StraightVertexBase::radiusPropertyKey:
403 object->as<StraightVertexBase>()->radius(value);
405 case CubicAsymmetricVertexBase::rotationPropertyKey:
406 object->as<CubicAsymmetricVertexBase>()->rotation(value);
408 case CubicAsymmetricVertexBase::inDistancePropertyKey:
409 object->as<CubicAsymmetricVertexBase>()->inDistance(value);
411 case CubicAsymmetricVertexBase::outDistancePropertyKey:
412 object->as<CubicAsymmetricVertexBase>()->outDistance(value);
414 case ParametricPathBase::widthPropertyKey:
415 object->as<ParametricPathBase>()->width(value);
417 case ParametricPathBase::heightPropertyKey:
418 object->as<ParametricPathBase>()->height(value);
420 case ParametricPathBase::originXPropertyKey:
421 object->as<ParametricPathBase>()->originX(value);
423 case ParametricPathBase::originYPropertyKey:
424 object->as<ParametricPathBase>()->originY(value);
426 case RectangleBase::cornerRadiusPropertyKey:
427 object->as<RectangleBase>()->cornerRadius(value);
429 case CubicMirroredVertexBase::rotationPropertyKey:
430 object->as<CubicMirroredVertexBase>()->rotation(value);
432 case CubicMirroredVertexBase::distancePropertyKey:
433 object->as<CubicMirroredVertexBase>()->distance(value);
435 case PolygonBase::cornerRadiusPropertyKey:
436 object->as<PolygonBase>()->cornerRadius(value);
438 case StarBase::innerRadiusPropertyKey:
439 object->as<StarBase>()->innerRadius(value);
441 case CubicDetachedVertexBase::inRotationPropertyKey:
442 object->as<CubicDetachedVertexBase>()->inRotation(value);
444 case CubicDetachedVertexBase::inDistancePropertyKey:
445 object->as<CubicDetachedVertexBase>()->inDistance(value);
447 case CubicDetachedVertexBase::outRotationPropertyKey:
448 object->as<CubicDetachedVertexBase>()->outRotation(value);
450 case CubicDetachedVertexBase::outDistancePropertyKey:
451 object->as<CubicDetachedVertexBase>()->outDistance(value);
453 case ArtboardBase::widthPropertyKey:
454 object->as<ArtboardBase>()->width(value);
456 case ArtboardBase::heightPropertyKey:
457 object->as<ArtboardBase>()->height(value);
459 case ArtboardBase::xPropertyKey:
460 object->as<ArtboardBase>()->x(value);
462 case ArtboardBase::yPropertyKey:
463 object->as<ArtboardBase>()->y(value);
465 case ArtboardBase::originXPropertyKey:
466 object->as<ArtboardBase>()->originX(value);
468 case ArtboardBase::originYPropertyKey:
469 object->as<ArtboardBase>()->originY(value);
471 case BoneBase::lengthPropertyKey:
472 object->as<BoneBase>()->length(value);
474 case RootBoneBase::xPropertyKey:
475 object->as<RootBoneBase>()->x(value);
477 case RootBoneBase::yPropertyKey:
478 object->as<RootBoneBase>()->y(value);
480 case SkinBase::xxPropertyKey:
481 object->as<SkinBase>()->xx(value);
483 case SkinBase::yxPropertyKey:
484 object->as<SkinBase>()->yx(value);
486 case SkinBase::xyPropertyKey:
487 object->as<SkinBase>()->xy(value);
489 case SkinBase::yyPropertyKey:
490 object->as<SkinBase>()->yy(value);
492 case SkinBase::txPropertyKey:
493 object->as<SkinBase>()->tx(value);
495 case SkinBase::tyPropertyKey:
496 object->as<SkinBase>()->ty(value);
498 case TendonBase::xxPropertyKey:
499 object->as<TendonBase>()->xx(value);
501 case TendonBase::yxPropertyKey:
502 object->as<TendonBase>()->yx(value);
504 case TendonBase::xyPropertyKey:
505 object->as<TendonBase>()->xy(value);
507 case TendonBase::yyPropertyKey:
508 object->as<TendonBase>()->yy(value);
510 case TendonBase::txPropertyKey:
511 object->as<TendonBase>()->tx(value);
513 case TendonBase::tyPropertyKey:
514 object->as<TendonBase>()->ty(value);
518 static void setColor(Core* object, int propertyKey, int value)
522 case KeyFrameColorBase::valuePropertyKey:
523 object->as<KeyFrameColorBase>()->value(value);
525 case SolidColorBase::colorValuePropertyKey:
526 object->as<SolidColorBase>()->colorValue(value);
528 case GradientStopBase::colorValuePropertyKey:
529 object->as<GradientStopBase>()->colorValue(value);
533 static void setBool(Core* object, int propertyKey, bool value)
537 case LinearAnimationBase::enableWorkAreaPropertyKey:
538 object->as<LinearAnimationBase>()->enableWorkArea(value);
540 case StateMachineBoolBase::valuePropertyKey:
541 object->as<StateMachineBoolBase>()->value(value);
543 case ShapePaintBase::isVisiblePropertyKey:
544 object->as<ShapePaintBase>()->isVisible(value);
546 case StrokeBase::transformAffectsStrokePropertyKey:
547 object->as<StrokeBase>()->transformAffectsStroke(value);
549 case PointsPathBase::isClosedPropertyKey:
550 object->as<PointsPathBase>()->isClosed(value);
552 case ClippingShapeBase::isVisiblePropertyKey:
553 object->as<ClippingShapeBase>()->isVisible(value);
557 static std::string getString(Core* object, int propertyKey)
561 case ComponentBase::namePropertyKey:
562 return object->as<ComponentBase>()->name();
563 case StateMachineComponentBase::namePropertyKey:
564 return object->as<StateMachineComponentBase>()->name();
565 case AnimationBase::namePropertyKey:
566 return object->as<AnimationBase>()->name();
570 static int getUint(Core* object, int propertyKey)
574 case ComponentBase::parentIdPropertyKey:
575 return object->as<ComponentBase>()->parentId();
576 case DrawTargetBase::drawableIdPropertyKey:
577 return object->as<DrawTargetBase>()->drawableId();
578 case DrawTargetBase::placementValuePropertyKey:
579 return object->as<DrawTargetBase>()->placementValue();
580 case AnimationStateBase::animationIdPropertyKey:
581 return object->as<AnimationStateBase>()->animationId();
582 case KeyedObjectBase::objectIdPropertyKey:
583 return object->as<KeyedObjectBase>()->objectId();
584 case TransitionConditionBase::inputIdPropertyKey:
585 return object->as<TransitionConditionBase>()->inputId();
586 case KeyedPropertyBase::propertyKeyPropertyKey:
587 return object->as<KeyedPropertyBase>()->propertyKey();
588 case KeyFrameBase::framePropertyKey:
589 return object->as<KeyFrameBase>()->frame();
590 case KeyFrameBase::interpolationTypePropertyKey:
591 return object->as<KeyFrameBase>()->interpolationType();
592 case KeyFrameBase::interpolatorIdPropertyKey:
593 return object->as<KeyFrameBase>()->interpolatorId();
594 case KeyFrameIdBase::valuePropertyKey:
595 return object->as<KeyFrameIdBase>()->value();
596 case TransitionValueConditionBase::opValuePropertyKey:
597 return object->as<TransitionValueConditionBase>()
599 case StateTransitionBase::stateToIdPropertyKey:
600 return object->as<StateTransitionBase>()->stateToId();
601 case StateTransitionBase::flagsPropertyKey:
602 return object->as<StateTransitionBase>()->flags();
603 case StateTransitionBase::durationPropertyKey:
604 return object->as<StateTransitionBase>()->duration();
605 case LinearAnimationBase::fpsPropertyKey:
606 return object->as<LinearAnimationBase>()->fps();
607 case LinearAnimationBase::durationPropertyKey:
608 return object->as<LinearAnimationBase>()->duration();
609 case LinearAnimationBase::loopValuePropertyKey:
610 return object->as<LinearAnimationBase>()->loopValue();
611 case LinearAnimationBase::workStartPropertyKey:
612 return object->as<LinearAnimationBase>()->workStart();
613 case LinearAnimationBase::workEndPropertyKey:
614 return object->as<LinearAnimationBase>()->workEnd();
615 case StrokeBase::capPropertyKey:
616 return object->as<StrokeBase>()->cap();
617 case StrokeBase::joinPropertyKey:
618 return object->as<StrokeBase>()->join();
619 case TrimPathBase::modeValuePropertyKey:
620 return object->as<TrimPathBase>()->modeValue();
621 case FillBase::fillRulePropertyKey:
622 return object->as<FillBase>()->fillRule();
623 case PathBase::pathFlagsPropertyKey:
624 return object->as<PathBase>()->pathFlags();
625 case DrawableBase::blendModeValuePropertyKey:
626 return object->as<DrawableBase>()->blendModeValue();
627 case DrawableBase::drawableFlagsPropertyKey:
628 return object->as<DrawableBase>()->drawableFlags();
629 case ClippingShapeBase::sourceIdPropertyKey:
630 return object->as<ClippingShapeBase>()->sourceId();
631 case ClippingShapeBase::fillRulePropertyKey:
632 return object->as<ClippingShapeBase>()->fillRule();
633 case PolygonBase::pointsPropertyKey:
634 return object->as<PolygonBase>()->points();
635 case DrawRulesBase::drawTargetIdPropertyKey:
636 return object->as<DrawRulesBase>()->drawTargetId();
637 case WeightBase::valuesPropertyKey:
638 return object->as<WeightBase>()->values();
639 case WeightBase::indicesPropertyKey:
640 return object->as<WeightBase>()->indices();
641 case TendonBase::boneIdPropertyKey:
642 return object->as<TendonBase>()->boneId();
643 case CubicWeightBase::inValuesPropertyKey:
644 return object->as<CubicWeightBase>()->inValues();
645 case CubicWeightBase::inIndicesPropertyKey:
646 return object->as<CubicWeightBase>()->inIndices();
647 case CubicWeightBase::outValuesPropertyKey:
648 return object->as<CubicWeightBase>()->outValues();
649 case CubicWeightBase::outIndicesPropertyKey:
650 return object->as<CubicWeightBase>()->outIndices();
654 static float getDouble(Core* object, int propertyKey)
658 case StateMachineDoubleBase::valuePropertyKey:
659 return object->as<StateMachineDoubleBase>()->value();
660 case CubicInterpolatorBase::x1PropertyKey:
661 return object->as<CubicInterpolatorBase>()->x1();
662 case CubicInterpolatorBase::y1PropertyKey:
663 return object->as<CubicInterpolatorBase>()->y1();
664 case CubicInterpolatorBase::x2PropertyKey:
665 return object->as<CubicInterpolatorBase>()->x2();
666 case CubicInterpolatorBase::y2PropertyKey:
667 return object->as<CubicInterpolatorBase>()->y2();
668 case TransitionDoubleConditionBase::valuePropertyKey:
669 return object->as<TransitionDoubleConditionBase>()->value();
670 case KeyFrameDoubleBase::valuePropertyKey:
671 return object->as<KeyFrameDoubleBase>()->value();
672 case LinearAnimationBase::speedPropertyKey:
673 return object->as<LinearAnimationBase>()->speed();
674 case LinearGradientBase::startXPropertyKey:
675 return object->as<LinearGradientBase>()->startX();
676 case LinearGradientBase::startYPropertyKey:
677 return object->as<LinearGradientBase>()->startY();
678 case LinearGradientBase::endXPropertyKey:
679 return object->as<LinearGradientBase>()->endX();
680 case LinearGradientBase::endYPropertyKey:
681 return object->as<LinearGradientBase>()->endY();
682 case LinearGradientBase::opacityPropertyKey:
683 return object->as<LinearGradientBase>()->opacity();
684 case StrokeBase::thicknessPropertyKey:
685 return object->as<StrokeBase>()->thickness();
686 case GradientStopBase::positionPropertyKey:
687 return object->as<GradientStopBase>()->position();
688 case TrimPathBase::startPropertyKey:
689 return object->as<TrimPathBase>()->start();
690 case TrimPathBase::endPropertyKey:
691 return object->as<TrimPathBase>()->end();
692 case TrimPathBase::offsetPropertyKey:
693 return object->as<TrimPathBase>()->offset();
694 case TransformComponentBase::rotationPropertyKey:
695 return object->as<TransformComponentBase>()->rotation();
696 case TransformComponentBase::scaleXPropertyKey:
697 return object->as<TransformComponentBase>()->scaleX();
698 case TransformComponentBase::scaleYPropertyKey:
699 return object->as<TransformComponentBase>()->scaleY();
700 case TransformComponentBase::opacityPropertyKey:
701 return object->as<TransformComponentBase>()->opacity();
702 case NodeBase::xPropertyKey:
703 return object->as<NodeBase>()->x();
704 case NodeBase::yPropertyKey:
705 return object->as<NodeBase>()->y();
706 case PathVertexBase::xPropertyKey:
707 return object->as<PathVertexBase>()->x();
708 case PathVertexBase::yPropertyKey:
709 return object->as<PathVertexBase>()->y();
710 case StraightVertexBase::radiusPropertyKey:
711 return object->as<StraightVertexBase>()->radius();
712 case CubicAsymmetricVertexBase::rotationPropertyKey:
713 return object->as<CubicAsymmetricVertexBase>()->rotation();
714 case CubicAsymmetricVertexBase::inDistancePropertyKey:
715 return object->as<CubicAsymmetricVertexBase>()
717 case CubicAsymmetricVertexBase::outDistancePropertyKey:
718 return object->as<CubicAsymmetricVertexBase>()
720 case ParametricPathBase::widthPropertyKey:
721 return object->as<ParametricPathBase>()->width();
722 case ParametricPathBase::heightPropertyKey:
723 return object->as<ParametricPathBase>()->height();
724 case ParametricPathBase::originXPropertyKey:
725 return object->as<ParametricPathBase>()->originX();
726 case ParametricPathBase::originYPropertyKey:
727 return object->as<ParametricPathBase>()->originY();
728 case RectangleBase::cornerRadiusPropertyKey:
729 return object->as<RectangleBase>()->cornerRadius();
730 case CubicMirroredVertexBase::rotationPropertyKey:
731 return object->as<CubicMirroredVertexBase>()->rotation();
732 case CubicMirroredVertexBase::distancePropertyKey:
733 return object->as<CubicMirroredVertexBase>()->distance();
734 case PolygonBase::cornerRadiusPropertyKey:
735 return object->as<PolygonBase>()->cornerRadius();
736 case StarBase::innerRadiusPropertyKey:
737 return object->as<StarBase>()->innerRadius();
738 case CubicDetachedVertexBase::inRotationPropertyKey:
739 return object->as<CubicDetachedVertexBase>()->inRotation();
740 case CubicDetachedVertexBase::inDistancePropertyKey:
741 return object->as<CubicDetachedVertexBase>()->inDistance();
742 case CubicDetachedVertexBase::outRotationPropertyKey:
743 return object->as<CubicDetachedVertexBase>()->outRotation();
744 case CubicDetachedVertexBase::outDistancePropertyKey:
745 return object->as<CubicDetachedVertexBase>()->outDistance();
746 case ArtboardBase::widthPropertyKey:
747 return object->as<ArtboardBase>()->width();
748 case ArtboardBase::heightPropertyKey:
749 return object->as<ArtboardBase>()->height();
750 case ArtboardBase::xPropertyKey:
751 return object->as<ArtboardBase>()->x();
752 case ArtboardBase::yPropertyKey:
753 return object->as<ArtboardBase>()->y();
754 case ArtboardBase::originXPropertyKey:
755 return object->as<ArtboardBase>()->originX();
756 case ArtboardBase::originYPropertyKey:
757 return object->as<ArtboardBase>()->originY();
758 case BoneBase::lengthPropertyKey:
759 return object->as<BoneBase>()->length();
760 case RootBoneBase::xPropertyKey:
761 return object->as<RootBoneBase>()->x();
762 case RootBoneBase::yPropertyKey:
763 return object->as<RootBoneBase>()->y();
764 case SkinBase::xxPropertyKey:
765 return object->as<SkinBase>()->xx();
766 case SkinBase::yxPropertyKey:
767 return object->as<SkinBase>()->yx();
768 case SkinBase::xyPropertyKey:
769 return object->as<SkinBase>()->xy();
770 case SkinBase::yyPropertyKey:
771 return object->as<SkinBase>()->yy();
772 case SkinBase::txPropertyKey:
773 return object->as<SkinBase>()->tx();
774 case SkinBase::tyPropertyKey:
775 return object->as<SkinBase>()->ty();
776 case TendonBase::xxPropertyKey:
777 return object->as<TendonBase>()->xx();
778 case TendonBase::yxPropertyKey:
779 return object->as<TendonBase>()->yx();
780 case TendonBase::xyPropertyKey:
781 return object->as<TendonBase>()->xy();
782 case TendonBase::yyPropertyKey:
783 return object->as<TendonBase>()->yy();
784 case TendonBase::txPropertyKey:
785 return object->as<TendonBase>()->tx();
786 case TendonBase::tyPropertyKey:
787 return object->as<TendonBase>()->ty();
791 static int getColor(Core* object, int propertyKey)
795 case KeyFrameColorBase::valuePropertyKey:
796 return object->as<KeyFrameColorBase>()->value();
797 case SolidColorBase::colorValuePropertyKey:
798 return object->as<SolidColorBase>()->colorValue();
799 case GradientStopBase::colorValuePropertyKey:
800 return object->as<GradientStopBase>()->colorValue();
804 static bool getBool(Core* object, int propertyKey)
808 case LinearAnimationBase::enableWorkAreaPropertyKey:
809 return object->as<LinearAnimationBase>()->enableWorkArea();
810 case StateMachineBoolBase::valuePropertyKey:
811 return object->as<StateMachineBoolBase>()->value();
812 case ShapePaintBase::isVisiblePropertyKey:
813 return object->as<ShapePaintBase>()->isVisible();
814 case StrokeBase::transformAffectsStrokePropertyKey:
815 return object->as<StrokeBase>()->transformAffectsStroke();
816 case PointsPathBase::isClosedPropertyKey:
817 return object->as<PointsPathBase>()->isClosed();
818 case ClippingShapeBase::isVisiblePropertyKey:
819 return object->as<ClippingShapeBase>()->isVisible();
823 static int propertyFieldId(int propertyKey)
827 case ComponentBase::namePropertyKey:
828 case StateMachineComponentBase::namePropertyKey:
829 case AnimationBase::namePropertyKey:
830 return CoreStringType::id;
831 case ComponentBase::parentIdPropertyKey:
832 case DrawTargetBase::drawableIdPropertyKey:
833 case DrawTargetBase::placementValuePropertyKey:
834 case AnimationStateBase::animationIdPropertyKey:
835 case KeyedObjectBase::objectIdPropertyKey:
836 case TransitionConditionBase::inputIdPropertyKey:
837 case KeyedPropertyBase::propertyKeyPropertyKey:
838 case KeyFrameBase::framePropertyKey:
839 case KeyFrameBase::interpolationTypePropertyKey:
840 case KeyFrameBase::interpolatorIdPropertyKey:
841 case KeyFrameIdBase::valuePropertyKey:
842 case TransitionValueConditionBase::opValuePropertyKey:
843 case StateTransitionBase::stateToIdPropertyKey:
844 case StateTransitionBase::flagsPropertyKey:
845 case StateTransitionBase::durationPropertyKey:
846 case LinearAnimationBase::fpsPropertyKey:
847 case LinearAnimationBase::durationPropertyKey:
848 case LinearAnimationBase::loopValuePropertyKey:
849 case LinearAnimationBase::workStartPropertyKey:
850 case LinearAnimationBase::workEndPropertyKey:
851 case StrokeBase::capPropertyKey:
852 case StrokeBase::joinPropertyKey:
853 case TrimPathBase::modeValuePropertyKey:
854 case FillBase::fillRulePropertyKey:
855 case PathBase::pathFlagsPropertyKey:
856 case DrawableBase::blendModeValuePropertyKey:
857 case DrawableBase::drawableFlagsPropertyKey:
858 case ClippingShapeBase::sourceIdPropertyKey:
859 case ClippingShapeBase::fillRulePropertyKey:
860 case PolygonBase::pointsPropertyKey:
861 case DrawRulesBase::drawTargetIdPropertyKey:
862 case WeightBase::valuesPropertyKey:
863 case WeightBase::indicesPropertyKey:
864 case TendonBase::boneIdPropertyKey:
865 case CubicWeightBase::inValuesPropertyKey:
866 case CubicWeightBase::inIndicesPropertyKey:
867 case CubicWeightBase::outValuesPropertyKey:
868 case CubicWeightBase::outIndicesPropertyKey:
869 return CoreUintType::id;
870 case StateMachineDoubleBase::valuePropertyKey:
871 case CubicInterpolatorBase::x1PropertyKey:
872 case CubicInterpolatorBase::y1PropertyKey:
873 case CubicInterpolatorBase::x2PropertyKey:
874 case CubicInterpolatorBase::y2PropertyKey:
875 case TransitionDoubleConditionBase::valuePropertyKey:
876 case KeyFrameDoubleBase::valuePropertyKey:
877 case LinearAnimationBase::speedPropertyKey:
878 case LinearGradientBase::startXPropertyKey:
879 case LinearGradientBase::startYPropertyKey:
880 case LinearGradientBase::endXPropertyKey:
881 case LinearGradientBase::endYPropertyKey:
882 case LinearGradientBase::opacityPropertyKey:
883 case StrokeBase::thicknessPropertyKey:
884 case GradientStopBase::positionPropertyKey:
885 case TrimPathBase::startPropertyKey:
886 case TrimPathBase::endPropertyKey:
887 case TrimPathBase::offsetPropertyKey:
888 case TransformComponentBase::rotationPropertyKey:
889 case TransformComponentBase::scaleXPropertyKey:
890 case TransformComponentBase::scaleYPropertyKey:
891 case TransformComponentBase::opacityPropertyKey:
892 case NodeBase::xPropertyKey:
893 case NodeBase::yPropertyKey:
894 case PathVertexBase::xPropertyKey:
895 case PathVertexBase::yPropertyKey:
896 case StraightVertexBase::radiusPropertyKey:
897 case CubicAsymmetricVertexBase::rotationPropertyKey:
898 case CubicAsymmetricVertexBase::inDistancePropertyKey:
899 case CubicAsymmetricVertexBase::outDistancePropertyKey:
900 case ParametricPathBase::widthPropertyKey:
901 case ParametricPathBase::heightPropertyKey:
902 case ParametricPathBase::originXPropertyKey:
903 case ParametricPathBase::originYPropertyKey:
904 case RectangleBase::cornerRadiusPropertyKey:
905 case CubicMirroredVertexBase::rotationPropertyKey:
906 case CubicMirroredVertexBase::distancePropertyKey:
907 case PolygonBase::cornerRadiusPropertyKey:
908 case StarBase::innerRadiusPropertyKey:
909 case CubicDetachedVertexBase::inRotationPropertyKey:
910 case CubicDetachedVertexBase::inDistancePropertyKey:
911 case CubicDetachedVertexBase::outRotationPropertyKey:
912 case CubicDetachedVertexBase::outDistancePropertyKey:
913 case ArtboardBase::widthPropertyKey:
914 case ArtboardBase::heightPropertyKey:
915 case ArtboardBase::xPropertyKey:
916 case ArtboardBase::yPropertyKey:
917 case ArtboardBase::originXPropertyKey:
918 case ArtboardBase::originYPropertyKey:
919 case BoneBase::lengthPropertyKey:
920 case RootBoneBase::xPropertyKey:
921 case RootBoneBase::yPropertyKey:
922 case SkinBase::xxPropertyKey:
923 case SkinBase::yxPropertyKey:
924 case SkinBase::xyPropertyKey:
925 case SkinBase::yyPropertyKey:
926 case SkinBase::txPropertyKey:
927 case SkinBase::tyPropertyKey:
928 case TendonBase::xxPropertyKey:
929 case TendonBase::yxPropertyKey:
930 case TendonBase::xyPropertyKey:
931 case TendonBase::yyPropertyKey:
932 case TendonBase::txPropertyKey:
933 case TendonBase::tyPropertyKey:
934 return CoreDoubleType::id;
935 case KeyFrameColorBase::valuePropertyKey:
936 case SolidColorBase::colorValuePropertyKey:
937 case GradientStopBase::colorValuePropertyKey:
938 return CoreColorType::id;
939 case LinearAnimationBase::enableWorkAreaPropertyKey:
940 case StateMachineBoolBase::valuePropertyKey:
941 case ShapePaintBase::isVisiblePropertyKey:
942 case StrokeBase::transformAffectsStrokePropertyKey:
943 case PointsPathBase::isClosedPropertyKey:
944 case ClippingShapeBase::isVisiblePropertyKey:
945 return CoreBoolType::id;