1 #ifndef _RIVE_CORE_REGISTRY_HPP_
2 #define _RIVE_CORE_REGISTRY_HPP_
3 #include "animation/animation.hpp"
4 #include "animation/cubic_interpolator.hpp"
5 #include "animation/keyed_object.hpp"
6 #include "animation/keyed_property.hpp"
7 #include "animation/keyframe.hpp"
8 #include "animation/keyframe_color.hpp"
9 #include "animation/keyframe_double.hpp"
10 #include "animation/keyframe_id.hpp"
11 #include "animation/linear_animation.hpp"
12 #include "artboard.hpp"
13 #include "backboard.hpp"
14 #include "bones/bone.hpp"
15 #include "bones/cubic_weight.hpp"
16 #include "bones/root_bone.hpp"
17 #include "bones/skeletal_component.hpp"
18 #include "bones/skin.hpp"
19 #include "bones/tendon.hpp"
20 #include "bones/weight.hpp"
21 #include "component.hpp"
22 #include "container_component.hpp"
23 #include "draw_rules.hpp"
24 #include "draw_target.hpp"
25 #include "drawable.hpp"
27 #include "shapes/clipping_shape.hpp"
28 #include "shapes/cubic_asymmetric_vertex.hpp"
29 #include "shapes/cubic_detached_vertex.hpp"
30 #include "shapes/cubic_mirrored_vertex.hpp"
31 #include "shapes/cubic_vertex.hpp"
32 #include "shapes/ellipse.hpp"
33 #include "shapes/paint/fill.hpp"
34 #include "shapes/paint/gradient_stop.hpp"
35 #include "shapes/paint/linear_gradient.hpp"
36 #include "shapes/paint/radial_gradient.hpp"
37 #include "shapes/paint/shape_paint.hpp"
38 #include "shapes/paint/solid_color.hpp"
39 #include "shapes/paint/stroke.hpp"
40 #include "shapes/paint/trim_path.hpp"
41 #include "shapes/parametric_path.hpp"
42 #include "shapes/path.hpp"
43 #include "shapes/path_composer.hpp"
44 #include "shapes/path_vertex.hpp"
45 #include "shapes/points_path.hpp"
46 #include "shapes/polygon.hpp"
47 #include "shapes/rectangle.hpp"
48 #include "shapes/shape.hpp"
49 #include "shapes/star.hpp"
50 #include "shapes/straight_vertex.hpp"
51 #include "shapes/triangle.hpp"
52 #include "transform_component.hpp"
58 static Core* makeCoreInstance(int typeKey)
62 case DrawTargetBase::typeKey:
63 return new DrawTarget();
64 case KeyedObjectBase::typeKey:
65 return new KeyedObject();
66 case KeyedPropertyBase::typeKey:
67 return new KeyedProperty();
68 case KeyFrameIdBase::typeKey:
69 return new KeyFrameId();
70 case AnimationBase::typeKey:
71 return new Animation();
72 case CubicInterpolatorBase::typeKey:
73 return new CubicInterpolator();
74 case KeyFrameDoubleBase::typeKey:
75 return new KeyFrameDouble();
76 case KeyFrameColorBase::typeKey:
77 return new KeyFrameColor();
78 case LinearAnimationBase::typeKey:
79 return new LinearAnimation();
80 case LinearGradientBase::typeKey:
81 return new LinearGradient();
82 case RadialGradientBase::typeKey:
83 return new RadialGradient();
84 case StrokeBase::typeKey:
86 case SolidColorBase::typeKey:
87 return new SolidColor();
88 case GradientStopBase::typeKey:
89 return new GradientStop();
90 case TrimPathBase::typeKey:
91 return new TrimPath();
92 case FillBase::typeKey:
94 case NodeBase::typeKey:
96 case ShapeBase::typeKey:
98 case StraightVertexBase::typeKey:
99 return new StraightVertex();
100 case CubicAsymmetricVertexBase::typeKey:
101 return new CubicAsymmetricVertex();
102 case PointsPathBase::typeKey:
103 return new PointsPath();
104 case RectangleBase::typeKey:
105 return new Rectangle();
106 case CubicMirroredVertexBase::typeKey:
107 return new CubicMirroredVertex();
108 case TriangleBase::typeKey:
109 return new Triangle();
110 case EllipseBase::typeKey:
111 return new Ellipse();
112 case ClippingShapeBase::typeKey:
113 return new ClippingShape();
114 case PolygonBase::typeKey:
115 return new Polygon();
116 case StarBase::typeKey:
118 case PathComposerBase::typeKey:
119 return new PathComposer();
120 case CubicDetachedVertexBase::typeKey:
121 return new CubicDetachedVertex();
122 case DrawRulesBase::typeKey:
123 return new DrawRules();
124 case ArtboardBase::typeKey:
125 return new Artboard();
126 case BackboardBase::typeKey:
127 return new Backboard();
128 case WeightBase::typeKey:
130 case BoneBase::typeKey:
132 case RootBoneBase::typeKey:
133 return new RootBone();
134 case SkinBase::typeKey:
136 case TendonBase::typeKey:
138 case CubicWeightBase::typeKey:
139 return new CubicWeight();
143 static void setString(Core* object, int propertyKey, std::string value)
147 case ComponentBase::namePropertyKey:
148 object->as<ComponentBase>()->name(value);
150 case AnimationBase::namePropertyKey:
151 object->as<AnimationBase>()->name(value);
155 static void setUint(Core* object, int propertyKey, int value)
159 case ComponentBase::parentIdPropertyKey:
160 object->as<ComponentBase>()->parentId(value);
162 case DrawTargetBase::drawableIdPropertyKey:
163 object->as<DrawTargetBase>()->drawableId(value);
165 case DrawTargetBase::placementValuePropertyKey:
166 object->as<DrawTargetBase>()->placementValue(value);
168 case KeyedObjectBase::objectIdPropertyKey:
169 object->as<KeyedObjectBase>()->objectId(value);
171 case KeyedPropertyBase::propertyKeyPropertyKey:
172 object->as<KeyedPropertyBase>()->propertyKey(value);
174 case KeyFrameBase::framePropertyKey:
175 object->as<KeyFrameBase>()->frame(value);
177 case KeyFrameBase::interpolationTypePropertyKey:
178 object->as<KeyFrameBase>()->interpolationType(value);
180 case KeyFrameBase::interpolatorIdPropertyKey:
181 object->as<KeyFrameBase>()->interpolatorId(value);
183 case KeyFrameIdBase::valuePropertyKey:
184 object->as<KeyFrameIdBase>()->value(value);
186 case LinearAnimationBase::fpsPropertyKey:
187 object->as<LinearAnimationBase>()->fps(value);
189 case LinearAnimationBase::durationPropertyKey:
190 object->as<LinearAnimationBase>()->duration(value);
192 case LinearAnimationBase::loopValuePropertyKey:
193 object->as<LinearAnimationBase>()->loopValue(value);
195 case LinearAnimationBase::workStartPropertyKey:
196 object->as<LinearAnimationBase>()->workStart(value);
198 case LinearAnimationBase::workEndPropertyKey:
199 object->as<LinearAnimationBase>()->workEnd(value);
201 case StrokeBase::capPropertyKey:
202 object->as<StrokeBase>()->cap(value);
204 case StrokeBase::joinPropertyKey:
205 object->as<StrokeBase>()->join(value);
207 case TrimPathBase::modeValuePropertyKey:
208 object->as<TrimPathBase>()->modeValue(value);
210 case FillBase::fillRulePropertyKey:
211 object->as<FillBase>()->fillRule(value);
213 case DrawableBase::blendModeValuePropertyKey:
214 object->as<DrawableBase>()->blendModeValue(value);
216 case ClippingShapeBase::sourceIdPropertyKey:
217 object->as<ClippingShapeBase>()->sourceId(value);
219 case ClippingShapeBase::fillRulePropertyKey:
220 object->as<ClippingShapeBase>()->fillRule(value);
222 case PolygonBase::pointsPropertyKey:
223 object->as<PolygonBase>()->points(value);
225 case DrawRulesBase::drawTargetIdPropertyKey:
226 object->as<DrawRulesBase>()->drawTargetId(value);
228 case WeightBase::valuesPropertyKey:
229 object->as<WeightBase>()->values(value);
231 case WeightBase::indicesPropertyKey:
232 object->as<WeightBase>()->indices(value);
234 case TendonBase::boneIdPropertyKey:
235 object->as<TendonBase>()->boneId(value);
237 case CubicWeightBase::inValuesPropertyKey:
238 object->as<CubicWeightBase>()->inValues(value);
240 case CubicWeightBase::inIndicesPropertyKey:
241 object->as<CubicWeightBase>()->inIndices(value);
243 case CubicWeightBase::outValuesPropertyKey:
244 object->as<CubicWeightBase>()->outValues(value);
246 case CubicWeightBase::outIndicesPropertyKey:
247 object->as<CubicWeightBase>()->outIndices(value);
251 static void setDouble(Core* object, int propertyKey, float value)
255 case CubicInterpolatorBase::x1PropertyKey:
256 object->as<CubicInterpolatorBase>()->x1(value);
258 case CubicInterpolatorBase::y1PropertyKey:
259 object->as<CubicInterpolatorBase>()->y1(value);
261 case CubicInterpolatorBase::x2PropertyKey:
262 object->as<CubicInterpolatorBase>()->x2(value);
264 case CubicInterpolatorBase::y2PropertyKey:
265 object->as<CubicInterpolatorBase>()->y2(value);
267 case KeyFrameDoubleBase::valuePropertyKey:
268 object->as<KeyFrameDoubleBase>()->value(value);
270 case LinearAnimationBase::speedPropertyKey:
271 object->as<LinearAnimationBase>()->speed(value);
273 case LinearGradientBase::startXPropertyKey:
274 object->as<LinearGradientBase>()->startX(value);
276 case LinearGradientBase::startYPropertyKey:
277 object->as<LinearGradientBase>()->startY(value);
279 case LinearGradientBase::endXPropertyKey:
280 object->as<LinearGradientBase>()->endX(value);
282 case LinearGradientBase::endYPropertyKey:
283 object->as<LinearGradientBase>()->endY(value);
285 case LinearGradientBase::opacityPropertyKey:
286 object->as<LinearGradientBase>()->opacity(value);
288 case StrokeBase::thicknessPropertyKey:
289 object->as<StrokeBase>()->thickness(value);
291 case GradientStopBase::positionPropertyKey:
292 object->as<GradientStopBase>()->position(value);
294 case TrimPathBase::startPropertyKey:
295 object->as<TrimPathBase>()->start(value);
297 case TrimPathBase::endPropertyKey:
298 object->as<TrimPathBase>()->end(value);
300 case TrimPathBase::offsetPropertyKey:
301 object->as<TrimPathBase>()->offset(value);
303 case TransformComponentBase::rotationPropertyKey:
304 object->as<TransformComponentBase>()->rotation(value);
306 case TransformComponentBase::scaleXPropertyKey:
307 object->as<TransformComponentBase>()->scaleX(value);
309 case TransformComponentBase::scaleYPropertyKey:
310 object->as<TransformComponentBase>()->scaleY(value);
312 case TransformComponentBase::opacityPropertyKey:
313 object->as<TransformComponentBase>()->opacity(value);
315 case NodeBase::xPropertyKey:
316 object->as<NodeBase>()->x(value);
318 case NodeBase::yPropertyKey:
319 object->as<NodeBase>()->y(value);
321 case PathVertexBase::xPropertyKey:
322 object->as<PathVertexBase>()->x(value);
324 case PathVertexBase::yPropertyKey:
325 object->as<PathVertexBase>()->y(value);
327 case StraightVertexBase::radiusPropertyKey:
328 object->as<StraightVertexBase>()->radius(value);
330 case CubicAsymmetricVertexBase::rotationPropertyKey:
331 object->as<CubicAsymmetricVertexBase>()->rotation(value);
333 case CubicAsymmetricVertexBase::inDistancePropertyKey:
334 object->as<CubicAsymmetricVertexBase>()->inDistance(value);
336 case CubicAsymmetricVertexBase::outDistancePropertyKey:
337 object->as<CubicAsymmetricVertexBase>()->outDistance(value);
339 case ParametricPathBase::widthPropertyKey:
340 object->as<ParametricPathBase>()->width(value);
342 case ParametricPathBase::heightPropertyKey:
343 object->as<ParametricPathBase>()->height(value);
345 case ParametricPathBase::originXPropertyKey:
346 object->as<ParametricPathBase>()->originX(value);
348 case ParametricPathBase::originYPropertyKey:
349 object->as<ParametricPathBase>()->originY(value);
351 case RectangleBase::cornerRadiusPropertyKey:
352 object->as<RectangleBase>()->cornerRadius(value);
354 case CubicMirroredVertexBase::rotationPropertyKey:
355 object->as<CubicMirroredVertexBase>()->rotation(value);
357 case CubicMirroredVertexBase::distancePropertyKey:
358 object->as<CubicMirroredVertexBase>()->distance(value);
360 case PolygonBase::cornerRadiusPropertyKey:
361 object->as<PolygonBase>()->cornerRadius(value);
363 case StarBase::innerRadiusPropertyKey:
364 object->as<StarBase>()->innerRadius(value);
366 case CubicDetachedVertexBase::inRotationPropertyKey:
367 object->as<CubicDetachedVertexBase>()->inRotation(value);
369 case CubicDetachedVertexBase::inDistancePropertyKey:
370 object->as<CubicDetachedVertexBase>()->inDistance(value);
372 case CubicDetachedVertexBase::outRotationPropertyKey:
373 object->as<CubicDetachedVertexBase>()->outRotation(value);
375 case CubicDetachedVertexBase::outDistancePropertyKey:
376 object->as<CubicDetachedVertexBase>()->outDistance(value);
378 case ArtboardBase::widthPropertyKey:
379 object->as<ArtboardBase>()->width(value);
381 case ArtboardBase::heightPropertyKey:
382 object->as<ArtboardBase>()->height(value);
384 case ArtboardBase::xPropertyKey:
385 object->as<ArtboardBase>()->x(value);
387 case ArtboardBase::yPropertyKey:
388 object->as<ArtboardBase>()->y(value);
390 case ArtboardBase::originXPropertyKey:
391 object->as<ArtboardBase>()->originX(value);
393 case ArtboardBase::originYPropertyKey:
394 object->as<ArtboardBase>()->originY(value);
396 case BoneBase::lengthPropertyKey:
397 object->as<BoneBase>()->length(value);
399 case RootBoneBase::xPropertyKey:
400 object->as<RootBoneBase>()->x(value);
402 case RootBoneBase::yPropertyKey:
403 object->as<RootBoneBase>()->y(value);
405 case SkinBase::xxPropertyKey:
406 object->as<SkinBase>()->xx(value);
408 case SkinBase::yxPropertyKey:
409 object->as<SkinBase>()->yx(value);
411 case SkinBase::xyPropertyKey:
412 object->as<SkinBase>()->xy(value);
414 case SkinBase::yyPropertyKey:
415 object->as<SkinBase>()->yy(value);
417 case SkinBase::txPropertyKey:
418 object->as<SkinBase>()->tx(value);
420 case SkinBase::tyPropertyKey:
421 object->as<SkinBase>()->ty(value);
423 case TendonBase::xxPropertyKey:
424 object->as<TendonBase>()->xx(value);
426 case TendonBase::yxPropertyKey:
427 object->as<TendonBase>()->yx(value);
429 case TendonBase::xyPropertyKey:
430 object->as<TendonBase>()->xy(value);
432 case TendonBase::yyPropertyKey:
433 object->as<TendonBase>()->yy(value);
435 case TendonBase::txPropertyKey:
436 object->as<TendonBase>()->tx(value);
438 case TendonBase::tyPropertyKey:
439 object->as<TendonBase>()->ty(value);
443 static void setColor(Core* object, int propertyKey, int value)
447 case KeyFrameColorBase::valuePropertyKey:
448 object->as<KeyFrameColorBase>()->value(value);
450 case SolidColorBase::colorValuePropertyKey:
451 object->as<SolidColorBase>()->colorValue(value);
453 case GradientStopBase::colorValuePropertyKey:
454 object->as<GradientStopBase>()->colorValue(value);
458 static void setBool(Core* object, int propertyKey, bool value)
462 case LinearAnimationBase::enableWorkAreaPropertyKey:
463 object->as<LinearAnimationBase>()->enableWorkArea(value);
465 case ShapePaintBase::isVisiblePropertyKey:
466 object->as<ShapePaintBase>()->isVisible(value);
468 case StrokeBase::transformAffectsStrokePropertyKey:
469 object->as<StrokeBase>()->transformAffectsStroke(value);
471 case PointsPathBase::isClosedPropertyKey:
472 object->as<PointsPathBase>()->isClosed(value);
474 case ClippingShapeBase::isVisiblePropertyKey:
475 object->as<ClippingShapeBase>()->isVisible(value);
479 static std::string getString(Core* object, int propertyKey)
483 case ComponentBase::namePropertyKey:
484 return object->as<ComponentBase>()->name();
485 case AnimationBase::namePropertyKey:
486 return object->as<AnimationBase>()->name();
490 static int getUint(Core* object, int propertyKey)
494 case ComponentBase::parentIdPropertyKey:
495 return object->as<ComponentBase>()->parentId();
496 case DrawTargetBase::drawableIdPropertyKey:
497 return object->as<DrawTargetBase>()->drawableId();
498 case DrawTargetBase::placementValuePropertyKey:
499 return object->as<DrawTargetBase>()->placementValue();
500 case KeyedObjectBase::objectIdPropertyKey:
501 return object->as<KeyedObjectBase>()->objectId();
502 case KeyedPropertyBase::propertyKeyPropertyKey:
503 return object->as<KeyedPropertyBase>()->propertyKey();
504 case KeyFrameBase::framePropertyKey:
505 return object->as<KeyFrameBase>()->frame();
506 case KeyFrameBase::interpolationTypePropertyKey:
507 return object->as<KeyFrameBase>()->interpolationType();
508 case KeyFrameBase::interpolatorIdPropertyKey:
509 return object->as<KeyFrameBase>()->interpolatorId();
510 case KeyFrameIdBase::valuePropertyKey:
511 return object->as<KeyFrameIdBase>()->value();
512 case LinearAnimationBase::fpsPropertyKey:
513 return object->as<LinearAnimationBase>()->fps();
514 case LinearAnimationBase::durationPropertyKey:
515 return object->as<LinearAnimationBase>()->duration();
516 case LinearAnimationBase::loopValuePropertyKey:
517 return object->as<LinearAnimationBase>()->loopValue();
518 case LinearAnimationBase::workStartPropertyKey:
519 return object->as<LinearAnimationBase>()->workStart();
520 case LinearAnimationBase::workEndPropertyKey:
521 return object->as<LinearAnimationBase>()->workEnd();
522 case StrokeBase::capPropertyKey:
523 return object->as<StrokeBase>()->cap();
524 case StrokeBase::joinPropertyKey:
525 return object->as<StrokeBase>()->join();
526 case TrimPathBase::modeValuePropertyKey:
527 return object->as<TrimPathBase>()->modeValue();
528 case FillBase::fillRulePropertyKey:
529 return object->as<FillBase>()->fillRule();
530 case DrawableBase::blendModeValuePropertyKey:
531 return object->as<DrawableBase>()->blendModeValue();
532 case ClippingShapeBase::sourceIdPropertyKey:
533 return object->as<ClippingShapeBase>()->sourceId();
534 case ClippingShapeBase::fillRulePropertyKey:
535 return object->as<ClippingShapeBase>()->fillRule();
536 case PolygonBase::pointsPropertyKey:
537 return object->as<PolygonBase>()->points();
538 case DrawRulesBase::drawTargetIdPropertyKey:
539 return object->as<DrawRulesBase>()->drawTargetId();
540 case WeightBase::valuesPropertyKey:
541 return object->as<WeightBase>()->values();
542 case WeightBase::indicesPropertyKey:
543 return object->as<WeightBase>()->indices();
544 case TendonBase::boneIdPropertyKey:
545 return object->as<TendonBase>()->boneId();
546 case CubicWeightBase::inValuesPropertyKey:
547 return object->as<CubicWeightBase>()->inValues();
548 case CubicWeightBase::inIndicesPropertyKey:
549 return object->as<CubicWeightBase>()->inIndices();
550 case CubicWeightBase::outValuesPropertyKey:
551 return object->as<CubicWeightBase>()->outValues();
552 case CubicWeightBase::outIndicesPropertyKey:
553 return object->as<CubicWeightBase>()->outIndices();
557 static float getDouble(Core* object, int propertyKey)
561 case CubicInterpolatorBase::x1PropertyKey:
562 return object->as<CubicInterpolatorBase>()->x1();
563 case CubicInterpolatorBase::y1PropertyKey:
564 return object->as<CubicInterpolatorBase>()->y1();
565 case CubicInterpolatorBase::x2PropertyKey:
566 return object->as<CubicInterpolatorBase>()->x2();
567 case CubicInterpolatorBase::y2PropertyKey:
568 return object->as<CubicInterpolatorBase>()->y2();
569 case KeyFrameDoubleBase::valuePropertyKey:
570 return object->as<KeyFrameDoubleBase>()->value();
571 case LinearAnimationBase::speedPropertyKey:
572 return object->as<LinearAnimationBase>()->speed();
573 case LinearGradientBase::startXPropertyKey:
574 return object->as<LinearGradientBase>()->startX();
575 case LinearGradientBase::startYPropertyKey:
576 return object->as<LinearGradientBase>()->startY();
577 case LinearGradientBase::endXPropertyKey:
578 return object->as<LinearGradientBase>()->endX();
579 case LinearGradientBase::endYPropertyKey:
580 return object->as<LinearGradientBase>()->endY();
581 case LinearGradientBase::opacityPropertyKey:
582 return object->as<LinearGradientBase>()->opacity();
583 case StrokeBase::thicknessPropertyKey:
584 return object->as<StrokeBase>()->thickness();
585 case GradientStopBase::positionPropertyKey:
586 return object->as<GradientStopBase>()->position();
587 case TrimPathBase::startPropertyKey:
588 return object->as<TrimPathBase>()->start();
589 case TrimPathBase::endPropertyKey:
590 return object->as<TrimPathBase>()->end();
591 case TrimPathBase::offsetPropertyKey:
592 return object->as<TrimPathBase>()->offset();
593 case TransformComponentBase::rotationPropertyKey:
594 return object->as<TransformComponentBase>()->rotation();
595 case TransformComponentBase::scaleXPropertyKey:
596 return object->as<TransformComponentBase>()->scaleX();
597 case TransformComponentBase::scaleYPropertyKey:
598 return object->as<TransformComponentBase>()->scaleY();
599 case TransformComponentBase::opacityPropertyKey:
600 return object->as<TransformComponentBase>()->opacity();
601 case NodeBase::xPropertyKey:
602 return object->as<NodeBase>()->x();
603 case NodeBase::yPropertyKey:
604 return object->as<NodeBase>()->y();
605 case PathVertexBase::xPropertyKey:
606 return object->as<PathVertexBase>()->x();
607 case PathVertexBase::yPropertyKey:
608 return object->as<PathVertexBase>()->y();
609 case StraightVertexBase::radiusPropertyKey:
610 return object->as<StraightVertexBase>()->radius();
611 case CubicAsymmetricVertexBase::rotationPropertyKey:
612 return object->as<CubicAsymmetricVertexBase>()->rotation();
613 case CubicAsymmetricVertexBase::inDistancePropertyKey:
614 return object->as<CubicAsymmetricVertexBase>()
616 case CubicAsymmetricVertexBase::outDistancePropertyKey:
617 return object->as<CubicAsymmetricVertexBase>()
619 case ParametricPathBase::widthPropertyKey:
620 return object->as<ParametricPathBase>()->width();
621 case ParametricPathBase::heightPropertyKey:
622 return object->as<ParametricPathBase>()->height();
623 case ParametricPathBase::originXPropertyKey:
624 return object->as<ParametricPathBase>()->originX();
625 case ParametricPathBase::originYPropertyKey:
626 return object->as<ParametricPathBase>()->originY();
627 case RectangleBase::cornerRadiusPropertyKey:
628 return object->as<RectangleBase>()->cornerRadius();
629 case CubicMirroredVertexBase::rotationPropertyKey:
630 return object->as<CubicMirroredVertexBase>()->rotation();
631 case CubicMirroredVertexBase::distancePropertyKey:
632 return object->as<CubicMirroredVertexBase>()->distance();
633 case PolygonBase::cornerRadiusPropertyKey:
634 return object->as<PolygonBase>()->cornerRadius();
635 case StarBase::innerRadiusPropertyKey:
636 return object->as<StarBase>()->innerRadius();
637 case CubicDetachedVertexBase::inRotationPropertyKey:
638 return object->as<CubicDetachedVertexBase>()->inRotation();
639 case CubicDetachedVertexBase::inDistancePropertyKey:
640 return object->as<CubicDetachedVertexBase>()->inDistance();
641 case CubicDetachedVertexBase::outRotationPropertyKey:
642 return object->as<CubicDetachedVertexBase>()->outRotation();
643 case CubicDetachedVertexBase::outDistancePropertyKey:
644 return object->as<CubicDetachedVertexBase>()->outDistance();
645 case ArtboardBase::widthPropertyKey:
646 return object->as<ArtboardBase>()->width();
647 case ArtboardBase::heightPropertyKey:
648 return object->as<ArtboardBase>()->height();
649 case ArtboardBase::xPropertyKey:
650 return object->as<ArtboardBase>()->x();
651 case ArtboardBase::yPropertyKey:
652 return object->as<ArtboardBase>()->y();
653 case ArtboardBase::originXPropertyKey:
654 return object->as<ArtboardBase>()->originX();
655 case ArtboardBase::originYPropertyKey:
656 return object->as<ArtboardBase>()->originY();
657 case BoneBase::lengthPropertyKey:
658 return object->as<BoneBase>()->length();
659 case RootBoneBase::xPropertyKey:
660 return object->as<RootBoneBase>()->x();
661 case RootBoneBase::yPropertyKey:
662 return object->as<RootBoneBase>()->y();
663 case SkinBase::xxPropertyKey:
664 return object->as<SkinBase>()->xx();
665 case SkinBase::yxPropertyKey:
666 return object->as<SkinBase>()->yx();
667 case SkinBase::xyPropertyKey:
668 return object->as<SkinBase>()->xy();
669 case SkinBase::yyPropertyKey:
670 return object->as<SkinBase>()->yy();
671 case SkinBase::txPropertyKey:
672 return object->as<SkinBase>()->tx();
673 case SkinBase::tyPropertyKey:
674 return object->as<SkinBase>()->ty();
675 case TendonBase::xxPropertyKey:
676 return object->as<TendonBase>()->xx();
677 case TendonBase::yxPropertyKey:
678 return object->as<TendonBase>()->yx();
679 case TendonBase::xyPropertyKey:
680 return object->as<TendonBase>()->xy();
681 case TendonBase::yyPropertyKey:
682 return object->as<TendonBase>()->yy();
683 case TendonBase::txPropertyKey:
684 return object->as<TendonBase>()->tx();
685 case TendonBase::tyPropertyKey:
686 return object->as<TendonBase>()->ty();
690 static int getColor(Core* object, int propertyKey)
694 case KeyFrameColorBase::valuePropertyKey:
695 return object->as<KeyFrameColorBase>()->value();
696 case SolidColorBase::colorValuePropertyKey:
697 return object->as<SolidColorBase>()->colorValue();
698 case GradientStopBase::colorValuePropertyKey:
699 return object->as<GradientStopBase>()->colorValue();
703 static bool getBool(Core* object, int propertyKey)
707 case LinearAnimationBase::enableWorkAreaPropertyKey:
708 return object->as<LinearAnimationBase>()->enableWorkArea();
709 case ShapePaintBase::isVisiblePropertyKey:
710 return object->as<ShapePaintBase>()->isVisible();
711 case StrokeBase::transformAffectsStrokePropertyKey:
712 return object->as<StrokeBase>()->transformAffectsStroke();
713 case PointsPathBase::isClosedPropertyKey:
714 return object->as<PointsPathBase>()->isClosed();
715 case ClippingShapeBase::isVisiblePropertyKey:
716 return object->as<ClippingShapeBase>()->isVisible();
720 static int propertyFieldId(int propertyKey)
724 case ComponentBase::namePropertyKey:
725 case AnimationBase::namePropertyKey:
726 return CoreStringType::id;
727 case ComponentBase::parentIdPropertyKey:
728 case DrawTargetBase::drawableIdPropertyKey:
729 case DrawTargetBase::placementValuePropertyKey:
730 case KeyedObjectBase::objectIdPropertyKey:
731 case KeyedPropertyBase::propertyKeyPropertyKey:
732 case KeyFrameBase::framePropertyKey:
733 case KeyFrameBase::interpolationTypePropertyKey:
734 case KeyFrameBase::interpolatorIdPropertyKey:
735 case KeyFrameIdBase::valuePropertyKey:
736 case LinearAnimationBase::fpsPropertyKey:
737 case LinearAnimationBase::durationPropertyKey:
738 case LinearAnimationBase::loopValuePropertyKey:
739 case LinearAnimationBase::workStartPropertyKey:
740 case LinearAnimationBase::workEndPropertyKey:
741 case StrokeBase::capPropertyKey:
742 case StrokeBase::joinPropertyKey:
743 case TrimPathBase::modeValuePropertyKey:
744 case FillBase::fillRulePropertyKey:
745 case DrawableBase::blendModeValuePropertyKey:
746 case ClippingShapeBase::sourceIdPropertyKey:
747 case ClippingShapeBase::fillRulePropertyKey:
748 case DrawRulesBase::drawTargetIdPropertyKey:
749 case WeightBase::valuesPropertyKey:
750 case WeightBase::indicesPropertyKey:
751 case TendonBase::boneIdPropertyKey:
752 case CubicWeightBase::inValuesPropertyKey:
753 case CubicWeightBase::inIndicesPropertyKey:
754 case CubicWeightBase::outValuesPropertyKey:
755 case CubicWeightBase::outIndicesPropertyKey:
756 return CoreUintType::id;
757 case CubicInterpolatorBase::x1PropertyKey:
758 case CubicInterpolatorBase::y1PropertyKey:
759 case CubicInterpolatorBase::x2PropertyKey:
760 case CubicInterpolatorBase::y2PropertyKey:
761 case KeyFrameDoubleBase::valuePropertyKey:
762 case LinearAnimationBase::speedPropertyKey:
763 case LinearGradientBase::startXPropertyKey:
764 case LinearGradientBase::startYPropertyKey:
765 case LinearGradientBase::endXPropertyKey:
766 case LinearGradientBase::endYPropertyKey:
767 case LinearGradientBase::opacityPropertyKey:
768 case StrokeBase::thicknessPropertyKey:
769 case GradientStopBase::positionPropertyKey:
770 case TrimPathBase::startPropertyKey:
771 case TrimPathBase::endPropertyKey:
772 case TrimPathBase::offsetPropertyKey:
773 case TransformComponentBase::rotationPropertyKey:
774 case TransformComponentBase::scaleXPropertyKey:
775 case TransformComponentBase::scaleYPropertyKey:
776 case TransformComponentBase::opacityPropertyKey:
777 case NodeBase::xPropertyKey:
778 case NodeBase::yPropertyKey:
779 case PathVertexBase::xPropertyKey:
780 case PathVertexBase::yPropertyKey:
781 case StraightVertexBase::radiusPropertyKey:
782 case CubicAsymmetricVertexBase::rotationPropertyKey:
783 case CubicAsymmetricVertexBase::inDistancePropertyKey:
784 case CubicAsymmetricVertexBase::outDistancePropertyKey:
785 case ParametricPathBase::widthPropertyKey:
786 case ParametricPathBase::heightPropertyKey:
787 case ParametricPathBase::originXPropertyKey:
788 case ParametricPathBase::originYPropertyKey:
789 case RectangleBase::cornerRadiusPropertyKey:
790 case CubicMirroredVertexBase::rotationPropertyKey:
791 case CubicMirroredVertexBase::distancePropertyKey:
792 case CubicDetachedVertexBase::inRotationPropertyKey:
793 case CubicDetachedVertexBase::inDistancePropertyKey:
794 case CubicDetachedVertexBase::outRotationPropertyKey:
795 case CubicDetachedVertexBase::outDistancePropertyKey:
796 case ArtboardBase::widthPropertyKey:
797 case ArtboardBase::heightPropertyKey:
798 case ArtboardBase::xPropertyKey:
799 case ArtboardBase::yPropertyKey:
800 case ArtboardBase::originXPropertyKey:
801 case ArtboardBase::originYPropertyKey:
802 case BoneBase::lengthPropertyKey:
803 case RootBoneBase::xPropertyKey:
804 case RootBoneBase::yPropertyKey:
805 case SkinBase::xxPropertyKey:
806 case SkinBase::yxPropertyKey:
807 case SkinBase::xyPropertyKey:
808 case SkinBase::yyPropertyKey:
809 case SkinBase::txPropertyKey:
810 case SkinBase::tyPropertyKey:
811 case TendonBase::xxPropertyKey:
812 case TendonBase::yxPropertyKey:
813 case TendonBase::xyPropertyKey:
814 case TendonBase::yyPropertyKey:
815 case TendonBase::txPropertyKey:
816 case TendonBase::tyPropertyKey:
817 return CoreDoubleType::id;
818 case KeyFrameColorBase::valuePropertyKey:
819 case SolidColorBase::colorValuePropertyKey:
820 case GradientStopBase::colorValuePropertyKey:
821 return CoreColorType::id;
822 case LinearAnimationBase::enableWorkAreaPropertyKey:
823 case ShapePaintBase::isVisiblePropertyKey:
824 case StrokeBase::transformAffectsStrokePropertyKey:
825 case PointsPathBase::isClosedPropertyKey:
826 case ClippingShapeBase::isVisiblePropertyKey:
827 return CoreBoolType::id;