These are chat archives for highfidelity/hifi

20th
Jul 2017
Jeffrey Hiebert
@JeffHiebert_GP_twitter
Jul 20 2017 15:56
@Atlante45 I responded to your comments on highfidelity/hifi#10945, but I'll expand on them here in case you haven't seen them yet. I changed the role anim names used in the filter used to get the list of roles to override because I would get an empty list with the original filter. The asset Green Chair from the marketplace had a version of Sit.js that instead used "right" and "left" in the filter and it worked fine. Perhaps the default anim list changed since Sit.js was written?
Jeffrey Hiebert
@JeffHiebert_GP_twitter
Jul 20 2017 16:40
For bug #21448, I have some questions. My original idea for fixing the issue was to overload EntityItem::getDimentions() for PolyLineEntityItems and generate the bounding dimensions based on the points in the poly line. Trying it out locally, it does produce the correct sized bounding box, but the box isn't centered on the PolyLineEntity and after digging into why, I see that this approach may not work well with other features (apparently, dimensions are stored as the scale?) all by its self. The approach I want to take now is to: 1. Generate the bounding dimensions and calculate the registration point to center the bounding box as a PolyLineEntity is built, so the user can still modify the property page values as expected. 2. Modify the action of the RESET DIMENSIONS button on the properties page to regen the dimensions and registration as above.
Jeffrey Hiebert
@JeffHiebert_GP_twitter
Jul 20 2017 16:46
#21448 cont. I'd like to do some automatic cleanup of existing PolyLineEntities, but I don't know how to do "one time" data fixup in this engine, or if it's just better to leave it to the user to click the RESET DIMENSIONS button on each PolyLineEntity they need to update. Does this approach sound reasonable?
Clément Brisset
@Atlante45
Jul 20 2017 18:46
@JeffHiebert_GP_twitter I'm gonna investigate that change, not sure why it was made, but the list didn't change. I just tried and the old filter returns the correct roles, while the new one doesn't:
https://image.prntscr.com/image/aQQNplVRSXaY1hWE1OsAfA.png
I'm not sure why the list was empty for you and we should get to the bottom of this.
Ohhhh wait, I think I misread that change
Ok, I just checked the script, you didn't copy the change correctly, which is why I was confused.
Clément Brisset
@Atlante45
Jul 20 2017 18:53
The filter was changed to:
-            return role === "fly" || role.startsWith("inAir");
+            return !(role.startsWith("right") || role.startsWith("left"));
You changed it to:
-            return role === "fly" || role.startsWith("inAir");
+            return role === "right" || role.startsWith("left");
Either way, this change should have been reflected on the repo, but it wasn't.
I'll remedy that and make a PR right now and get it merged ASAP so you can update yours.
I will post this on the PR as well to let other people know.
Armads
@Armads
Jul 20 2017 18:57
I downloaded some more attachments from the marketplace but they don't appear in the attachments window, do I have to do something extra to add them?
pasting the fbc url into the bar doesnt do anything either
*fbx
Clément Brisset
@Atlante45
Jul 20 2017 19:08
@JeffHiebert_GP_twitter Here is the PR I was talking about: highfidelity/hifi#11013
Jeffrey Hiebert
@JeffHiebert_GP_twitter
Jul 20 2017 19:11
@Atlante45 Ah, right. Yeah, I munged the change when I copied it from my local test script.
Clément Brisset
@Atlante45
Jul 20 2017 19:11
@Armads Hmmm, do you see it? Do other people see it?
If you do, then it either has to be in the attachment panel, or in the entities panel (It could be an entity parented to you)
@JeffHiebert_GP_twitter I haven't missed your other question, but I have to leave for lunch. Will answer when I'm back.
Jeffrey Hiebert
@JeffHiebert_GP_twitter
Jul 20 2017 19:14
@Atlante45 No problem.
Armads
@Armads
Jul 20 2017 19:59
@Atlante45 it isn't that the model is invisible, it just doesn't appear on the list of options to attach to my avatar
Clément Brisset
@Atlante45
Jul 20 2017 20:04
Ohhh, when you do "Get Item" it should attach them to your avatar automatically.
Which ones did you get?
Armads
@Armads
Jul 20 2017 20:05
the "fun hair styles" from wearables
but I just noticed that when I try to press get, there's a quick popup with "you do not have the permissions necessary to place items in this domain"
Clément Brisset
@Atlante45
Jul 20 2017 20:07
Ohhh ok, it probably brings them up as entities.
So if you don't have Rez rights, it won't work.
@JeffHiebert_GP_twitter Yes, I just looked at that Worklist item and it's probably gonna be really tricky to do that efficiently.
Jeffrey Hiebert
@JeffHiebert_GP_twitter
Jul 20 2017 20:12
@Atlante45 The original problem or my solutions?
Clément Brisset
@Atlante45
Jul 20 2017 20:13
The original problem.
I think it would be better to not have the user need to click reset dimensions. I think there might be a way to do that without adding too much computation.
I'm currently looking into it.
I'll let you know what I find.
Armads
@Armads
Jul 20 2017 20:21
how do I set permissions on my local server? I don't think I see anything for it on the menu or in the developer options
Jeffrey Hiebert
@JeffHiebert_GP_twitter
Jul 20 2017 20:22
@Atlante45 Cool. I might also need to add a property or a hard coded value for Maximum Bounding Size or some such for PolyLineEntity objects as their code for adding points currently checks against the getDimensions() (which are normally 10 meter cubed box in unmodded code) to see if the point being added is outside them and rejects it. Locally I hacked it so it always checks against the 10 meter cube, but it might be something one would want to expose.
Clément Brisset
@Atlante45
Jul 20 2017 20:30
I think that was a limitation of the past implementation. Ideally, Polyline entities should be unbounded and have their dimensions reflect their content.
@JeffHiebert_GP_twitter Sit script update PR was just merged. Feel free to update you PR when you can.
Jeffrey Hiebert
@JeffHiebert_GP_twitter
Jul 20 2017 20:33
@Atlante45 I've committed my revisions. Let me know if there's a step I've missed.
Clément Brisset
@Atlante45
Jul 20 2017 20:33
Hmmm, did you push it? i don't see anything new.
Just in case my explanation wasn't clear. You should remove the filter change from your PR and pull upstream/master.
Jeffrey Hiebert
@JeffHiebert_GP_twitter
Jul 20 2017 20:40
I see my commits here https://github.com/highfidelity/hifi/pull/10945/commits, but I didn't do it the way you just described. I'm a git novice, so how do I remove that change from the PR?
Clément Brisset
@Atlante45
Jul 20 2017 20:58
@JeffHiebert_GP_twitter First restore the filter to what it was before: return role === "fly" || role.startsWith("inAir"); and commit that.
Then do git pull upstream master
And then push.
Jeffrey Hiebert
@JeffHiebert_GP_twitter
Jul 20 2017 21:07
Ok, I did that. Does it look good on your end?
Clément Brisset
@Atlante45
Jul 20 2017 21:08
Perfect, thanks!
Armads
@Armads
Jul 20 2017 21:46
@Atlante45 how do I give myself permission to create entities?
Clément Brisset
@Atlante45
Jul 20 2017 21:47
Are you on your own domain?
Armads
@Armads
Jul 20 2017 21:47
yes
Clément Brisset
@Atlante45
Jul 20 2017 21:48
When it's running, go to http://localhost:40100/settings/#security
Or click on the tray icon and then on settings.
You should have rez rights by default in your own domain.
Armads
@Armads
Jul 20 2017 22:01
I think I summoned the items now but they're just green boxes that I can't pick up
Clément Brisset
@Atlante45
Jul 20 2017 22:22
Hmmm, this is odd. Green wire boxes usually indicate that interface could not download the model. But I've just tested that item and the URLs are all reachable. (Loaded for me)
Clément Brisset
@Atlante45
Jul 20 2017 22:55
@JeffHiebert_GP_twitter I've looked at the polyline situation.
The best solution I've managed to come up with right now is update the dimensions and registration point with each point.
It turns out the dimensions are stored as the scale, but in the case of the polyline, it's not actually used to scale it.
Currently, we only even get the dimensions in PolyLineEntityItem to check whether the point is inside the bounding box.
Instead of doing that, we could check if the new point is outside the bounding box, if it is, adjust the size of the bounding box and update the registration point.
Jeffrey Hiebert
@JeffHiebert_GP_twitter
Jul 20 2017 23:00
@Atlante45 Ok, that's pretty close to what I've been tinkering with. I noticed I could still modify the dimensions on the properties page and weird stuff could happen as a result (the PolyLine sometimes disappeared) Is there a way to disable fields or buttons on the properties page or is there something more appropriate? or just leave it as a task for later?
Clément Brisset
@Atlante45
Jul 20 2017 23:06
No way to disable fields AFAIK.
What we should do though is override setDimensions in PolyLineEntityItem to not do anything.
I think it would be trivial too to disable it in edit.js.