Jump to content

[1.6.1] NodeHelper - tool used to edit node positions


Felbourn

Recommended Posts

The original author's UI required setting the value too. You can't just enter a value and have it use that text field directly. I have not changed the original source, so that should still function the same way as before. If it does not then I may have broken it.

Edited by Felbourn
Link to comment
Share on other sites

I was able to reproduce the read-only edit field, which I can't quite figure out since I used the same call as all the other edit fields that are writable. So no fix available yet.

Link to comment
Share on other sites

So I just started using this a couple hours ago.... Seems to work great...EXCEPT: is there any way to isolate the GUI so its NOT click-thru?...
I'm editing large parts, with 8 nodes, and I gotta get in kinda close... The parts pretty much fill my screen, and I keep screwing everything up because I go to click a button on the GUI, and it grabs the tank my part is attached too, and messes everything up... Quite frustrating...

But other than that, this tool is SWEET!!... I have tons of old parts to fix, and I cant wait to get them done using this... :)

Link to comment
Share on other sites

Is it true for all three dialogues for you? Mine don't seem to click through. There was a time in the past (before it was my code) that they did, but I fixed it. Recently I added 2 more dialogues though, and of course there could be other 1.1.2 differences between us.

Edited by Felbourn
Link to comment
Share on other sites

OK... SO it seems when the UI's first open, they are click-thru... If you grab the window, and move it, it sometimes then becomes NON click-thru...

Also, when it IS click-thru, it seems to be the bottom set of buttons only that are affected... I need to test and play with it a bit more...

Link to comment
Share on other sites

Just started using this again today, and I'm having an issue when using it with a part that has an odd rescale factor.

It's multiplying all the nodes by the part rescale factor, then when I reopen NodeHelper to edit the part again, its multiplying the rescale factor by itself again, which ends up changing ALL the node definitions?

For example, my part has a rescale factor = 1.05... Nodes are set where I want them; angY are all 1.0...
The first time I use NodeHelper, it multiplies all the definitions by 1.05; ie now all the angY are all 1.05...

Then when I use NodeHelper again, it multiplies everything by 1.05 again; ie now all the angY are all 1.1025...
Then using it again, I SOMETIMES, not always, end up with it multiplying by 1.05 AGAIN; ie all the angY are now 1.157625...

 

I assume KSP multiplies all the attchment defs by the rescale factor ONCE, when it first runs... ??? But must have a variable somewhere that tells it that has already done the adjustment, so that it wont keep doing it...

Is there any way to add such a check to NodeHelper?

EDIT: Actually, I think NodeHelper should also divide the node defs by the rescale factor, to put them back to what they would be at a rescale factor of 1.0, BEFORE it writes them to the _NH.cfg... ??

I have different sized versions of the same exact part, and the node defs are all set for ONE version at the 1.05 rescale, and the others use the SAME node defs, but then get rescaled automatically by KSP...

LMK if I'm not making sense, and I need to re-explain...

Edited by Stone Blue
Link to comment
Share on other sites

Are you saying you want this mod to interact with TweakScale? The original author didn't write it that way. I'm not sure if TS even existed when he wrote it. It would take a bit of work to get it to cooperate with TS, and I'm hard at work trying to get my video series back online. The workaround I have always used for things I want to scale is to restore them to their correct size, do my work, edit the CFG, and then the scaling is applied automatically by TS once you reload.

Link to comment
Share on other sites

No, no... has nothing to do with TweakScale... Unfortunately, i'm working with someone else's model... When they made it, it seems they made it just a hair too small to fit a couple stock parts that it is supposed to work with... So to keep the stock parts from peeking from the custom parts' mesh, the rescale factor in the .cfg is used, instead of having to go in and redo the whole model... Hence the 1.05 rescale factor...

With NodeHelper changing the definitions between instances, after I get the nodes placed, its throwing things off... I guess i can try manually modifying the defs that NodeHelper writes, IF I can figure out for sure exactly how its modifying them each time...

 

Here's example of what I mean:
 

This is the defs in the part cfg. These work, and I guess KSP handles the rescaling of the defs once, then is good to go:
	scale = 1
    rescaleFactor = 1.05

node_stack_bottom01 = 0.0, -0.032,    0.0, 0.0, -1.0,  0.0, 1
node_stack_bottom02 = 0.0, -1.504,    0.0, 0.0, -1.0,  0.0, 1
node_stack_bottom03 = 0.0, -2.279,    0.0, 0.0, -1.0,  0.0, 1
node_stack_bottom04 = 0.0, -2.710,    0.0, 0.0, -1.0,  0.0, 1
node_attach =         0.0, -1.050, -0.683, 0.0,  0.0,  1.0, 1

1st instance of NodeHelper gives me this (WITHOUT me changing any nodes):
	
node_stack_bottom01 = 0.0, -0.0336,   0.0, 0.0, -1.05, 0.0, 1
node_stack_bottom02 = 0.0, -1.5792,   0.0, 0.0, -1.05, 0.0, 1
node_stack_bottom03 = 0.0, -2.39295,  0.0, 0.0, -1.05, 0.0, 1
node_stack_bottom04 = 0.0, -2.8455,   0.0, 0.0, -1.05, 0.0, 1

node_attach = 0.0, -1.1025, -0.71715, 0.0, 0.0,  1.05, 1

Then 2nd instance:

(Now gives me the same thing...Grrr...Cant reproduce what it was doing before...)

Before, for example, it would write a new node_attach as:

node_attach = 0.0, -1.157625, -0.7530075, 0.0, 0.0,  1.1025, 1


 

Edited by Stone Blue
Link to comment
Share on other sites

Oh, yea I get the same issue all the time. I always work with 1.0 rescale models because of that. If I need to take someone else's model that was not meant to be 1.0 then I use a MODEL scale instead. It works out the same, especially since I am redoing all the node_stack values already. Sometimes I have needed to change the node_stack values by hand before I begin working, but that's easy with an Excel spreadsheet. I copy-paste the values into a premade formula which applies a scale and tells me new values, then I copy-paste those back into the CFG. It has never felt like it's more trouble than to fix the mod directly, so I seem to keep doing it that way. My first goal is to get my videos going again, and my second goal is to restore my mods to be usable in those videos.

Edited by Felbourn
Link to comment
Share on other sites

@Felbourn Ahhh... OK... so this is nothing out of the ordinary, and you have a work around... :)

I just needed to get my head around what it SHOULD be doing, and what IS doing... What really threw me off, was when it was multiplying the defs by 1.05, up to three times... ??? But I cant get it to reproduce that now... :(

So, by using a MODEL scale, do you mean you swap these two around?:

    scale = 1
    rescaleFactor = 1.05

 

EDIT: Of COURSE I find THIS THREAD after expounding my ignorance in public, here on the NodeHelper thread...lol

Edited by Stone Blue
Link to comment
Share on other sites

Yea, the MODEL scale changes the art. The PART scale changes the nodes. The rescaleFactor changes them both together. I prefer to default all my custom PARTs to scale=1 and rescaleFactor=1 for simplicity and to avoid bugs, and I use the MODEL to make my default size, then set all node_stack to match size.

Link to comment
Share on other sites

So I think I may have found out why this kept re-scaling the nodes with every part reload, and how to reproduce it... I was using the alt-F12 menu to reload the database, instead of a full exit and restart of KSP... :P

EDIT: Nevermind... I'm getting it with every fresh start of KSP now, too... :(

Edited by Stone Blue
Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...
  • 2 months later...

@Felbourn Hi, I was talking with snark today about his mod Indication Lights and the possibility for a tool to add more mods to it's compatibility list.

Basically what we need is a tool that is much like urs but instead of tweaking nodes, we want to be able to move a child part relative to it's parent part and at the end get numbers in memory so that we can paste in the MM config that we would have for a compatibility.

Unfortunately, snark has his hands full and although i have decent experience with unity, i don't have enough time nor the experience with ksp's api to be of any help. would you like to sit and write another mod? well, i'm sure snark would love it a lot but honestly, for time being me and him would be sole users of this unless other players would like to add more patches to indicator lights for other mods they like. so? can you do it or are you like me (busy as hell, barely making time to play ksp like 20 min a day)

Link to comment
Share on other sites

  • 2 weeks later...
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...