Perspective custom properties don't propagate with views on other views

I have a view with controls and custom properties on that view. Those custom properties don’t show up when I drag those views on other views. Is this a bug, or by design? If so, how do I have properties that carry over with the views.Thx, jake

When you drag a View into another View, you’re not placing a View in a View, the Designer is placing an Embedded View component into your current View. In the context of your action, the only insight the Designer has into the View you are dragging is the path of the View, so we “magically” set the path of the Embedded View to that of the View you dragged. Since the Designer doesn’t have insight into the custom properties of that View, we can’t just apply them to the Embedded View.

If you have custom properties that you expect to drive component states within that view, you’d be better suited placing them as param values, because even if your dragged View has a custom property of myProperty, applying that same property to the Embedded View will not result in the view which is instanced in the Embedded View having access to the property. If you were to use something like View.params.myParam, and you then supplied EmbeddedView.params.myParam, then the View you had dragged would have access to that property.

K, came from vision, so not used to perspective yet. Figured params should only be used when starting up a view.Thx,jake

If a View is to be used as a Docked View or a Popup that is absolutely the case because there is no way to bind against Popup or Docked View properties. Embedded Views, however, are a piece/child of the View, so you can have bindings going back and forth. If you click the arrow to the right of the param within the property browser, you can see that params allow for passing values in/out/bidirectional, which allows for easy writing back-and-forth beyond just the instantiation of the instanced View.

You can think of view params as somewhat comparable to a Vision Template’s public properties, while custom properties of a view correspond to a Vision Template’s internal properties. Sorta. Kinda.

Perspective is just different from Vision.

Ah, makes sense, thanks all.jake

So they still aren’t showing up, probably should have done a small test before redoing them all. I also tried the props and adding there with no luck. Also, I noticed that clicking on the child view doesn’t even show params, just custom and meta. Any other thoughts?

You’re not looking in the correct spot.

Let’s say you have two views: ViewA and ViewB, and you intend to drag ViewB ONTO ViewA.

  • If you click the ViewB node in the project browser (the actual named View - not the root node), you will see that the Perspective Property Editor has a category named PARAMS. You should create your parameter properties here and assign their “direction” accordingly.
  • Now drag ViewB onto ViewA. There is now an EmbeddedView component in ViewA, which has a props.path value of “ViewB”. That same EmbeddedView also has props.params; this is where you place case-sensitive matching properties to map to the properties you supplied for ViewB.

View node (ViewB):

Embedded View:

Screen Shot 2020-12-04 at 8.34.47PM

You should also read the documentation.

Okay, so it doesn’t populate automatically, I need to specifically add the params I wish to use in the embedded props.params. I did see that but didn’t think much of it since it didn’t have any of the params I setup in the child view. Is there any to get it to populate on it’s own, I have a crap ton of parameters so I didn’t have to create a bunch of one off controls.I know I can probably export and mod the json directly, rearc it and then import, but was hoping for some more eloquent I read the docs, but I didn’t see anything specific to this.Thx, jake

The only thing we can do right now is populate the path. We have a feature ticket to populate the params, but no ETA.

K, I’ll do it manually. Thank you for your help.