Size Of Positioning Shafts In OpenMW-CS

Involved development of the OpenMW construction set.
User avatar
MrAnonGuy
Posts: 42
Joined: 26 Aug 2016, 01:21

Re: Does OpenMW-CS Actually Work?

Post by MrAnonGuy »

Thanks so much for the update. I've tested and I can now move/add objects to existing addons and my changes stick after saving. :mrgreen:

I have one other issue with the UI and I'm not sure what I'm missing. In the following example, I've have dropped a candle onto a table and I need to position it using the UI. When I select the item, the Red, Blue and Green bars are HUGE, and I can't even see my object. The same issue occurs with the rotate bars, as well.
bhaway1.jpg
bhaway2.jpg
bhaway3.jpg
Is there a way to control the size of these bars? I can edit the position from within the table, but it would be so much easier to do it from the UI.

Thanks again!
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Does OpenMW-CS Actually Work?

Post by Zini »

Is there a way to control the size of these bars? I can edit the position from within the table, but it would be so much easier to do it from the UI.
Not yet, sorry. I guess we need some kind of automatic scaling (depending on how far the instance is away from the camera. Feel free to post a feature request on our tracker.
User avatar
MrAnonGuy
Posts: 42
Joined: 26 Aug 2016, 01:21

Re: Does OpenMW-CS Actually Work?

Post by MrAnonGuy »

Zini wrote:
Is there a way to control the size of these bars? I can edit the position from within the table, but it would be so much easier to do it from the UI.
Not yet, sorry. I guess we need some kind of automatic scaling (depending on how far the instance is away from the camera. Feel free to post a feature request on our tracker.
I will certainly do that. Along with autoscaling, it would be nice if there were a couple of keys assigned to allow quick user tweaking from the autoscaled values. The radius, as well as the length of the bars, would be tweakable.

Are the values currently hardcoded? Can you point me toward the location in the source code were these values are currently located (or calculated)?

Thanks!
aesylwinn
Posts: 243
Joined: 14 Dec 2015, 20:30

Re: Does OpenMW-CS Actually Work?

Post by aesylwinn »

The auto scaling would be be nice. The hard-coded values are located in apps/opencs/view/render/object.cpp.

Anyway, I just wanted to say I probably won't be able very active on the forums for a while until I get power and internet access restored. :| I'm having to use my dad's phone as a hotspot to do this.
User avatar
MrAnonGuy
Posts: 42
Joined: 26 Aug 2016, 01:21

Re: Does OpenMW-CS Actually Work?

Post by MrAnonGuy »

aesylwinn wrote:The auto scaling would be be nice. The hard-coded values are located in apps/opencs/view/render/object.cpp.

Anyway, I just wanted to say I probably won't be able very active on the forums for a while until I get power and internet access restored. :| I'm having to use my dad's phone as a hotspot to do this.
Thank you for pointing me to those constant assignments, aesylwinn.

I hope you get your power issues resolved quickly. That's a worst case scenario. I can round up food, but can't do without power and internet. 8-)
aesylwinn
Posts: 243
Joined: 14 Dec 2015, 20:30

Re: Does OpenMW-CS Actually Work?

Post by aesylwinn »

I don't know how much longer I would have lasted. It was a long 2 days. :lol: Thankfully my power/internet access has been restored.
User avatar
MrAnonGuy
Posts: 42
Joined: 26 Aug 2016, 01:21

Re: Does OpenMW-CS Actually Work?

Post by MrAnonGuy »

Glad to hear it and I know what you mean. I live in an area where it's not uncommon to lose power, occasionally for days at a time, especially during winter storms or violent thunder storms. I suppose we just take our electricity and gadgets for granted, until they're gone. ;)

Anyway, I was thinking about submitting autoscaling as a feature request, but considering the GUI is unusable in this case, which is a typical scale one would use during editing, wouldn't it be more appropriate to flag this as a bug?

Thanks!
aesylwinn
Posts: 243
Joined: 14 Dec 2015, 20:30

Re: Does OpenMW-CS Actually Work?

Post by aesylwinn »

To be honest, it doesn't matter to me. You can classify it as a feature because it adds functionality, or you can add it as a bug because it makes moving smaller objects very difficult.

I'm not too sure on what permissions are granted by default, but please set the target version to openmw-cs-1.0 if you can. It makes it easier to find. :)
User avatar
MrAnonGuy
Posts: 42
Joined: 26 Aug 2016, 01:21

Re: Size Of Positioning Shafts In OpenMW-CS

Post by MrAnonGuy »

Ok. I've added it to the tracker.

In the interim, I would like to be able to simply change the values on the fly from the prefs screen. I managed to find the code section that allows me to add it to the prefs in state.cpp and I just placed it into the General Input section.

Code: Select all

    declareCategory ("General Input");
    declareBool ("cycle", "Cyclic next/previous", false).
        setTooltip ("When using next/previous functions at the last/first item of a "
        "list go to the first/last item");
    declareDouble ("MarkerShaftWidth", "Marker Shaft Width", 30.0).
        setRange (0.001, 100.0);
    declareDouble ("MarkerShaftBaseLength", "Marker Shaft Base Length", 70.0).
        setRange (0.001, 100.0);
    declareDouble ("MarkerHeadWidth", "Marker Header Width", 50.0).
        setRange (0.001, 100.0);
    declareDouble ("MarkerHeadLength", "Marker Header Length", 50.0).
        setRange (0.001, 100.0);
I'm not sure how to get those values into apps/opencs/view/render/object.cpp, where they are currently declared as static constants. Can you give me a little guidance on how to proceed here? I'm an experienced coder but a bit rusty using C. I've spent the last 5 or 6 years working in Scheme and PHP, with just a little C++ here and there. I'm also very unfamiliar with the design of OpenMW project.

Thanks!
aesylwinn
Posts: 243
Joined: 14 Dec 2015, 20:30

Re: Size Of Positioning Shafts In OpenMW-CS

Post by aesylwinn »

Roughly:

1. Get rid of the static constants definitions in the header and source files.
2. #include "../../model/prefs/state.hpp"
3. Replace constant definitions with state retrieval like so in the member functions:

Code: Select all

const float MarkerShaftWidth = CSMPrefs::get()["General Input"]["MarkerShaftWidth"].toDouble();
Just to note, this method will not resize already existing markers. You will have to re-select the object.
Post Reply