help with last similar operation in stack

kowy
Posts: 47
Joined: 01 Jun 2020, 16:30

Re: help with last similar operation in stack

Post by kowy » 24 Jul 2022, 09:11

I have question regarding axis locking
https://download.autodesk.com/global/do ... =d30e47900 section where (If Allow Double-click to Toggle Active Axes )

If it's possible to script those - locking/unlocking axis, theres a of of clicking if i'm using often (ex: x y z to lock axis & smt else to unlock) ~ blender approach
ps: script editor doesn't show record actions - there are somewhere hidden ...

User avatar
Kolya
Posts: 39
Joined: 03 Oct 2017, 19:17

Re: help with last similar operation in stack

Post by Kolya » 24 Jul 2022, 10:45

Hello, I've made a plugin for that.
Commands SetTransformAxisX(), SetTransformAxisY(), SetTransformAxisZ() make only one specific axis active or all active,
ToggleTransformAxisX(), ToggleTransformAxisY(), ToggleTransformAxisZ() enable/disable specific axis
https://drive.google.com/file/d/12JNAMb ... sp=sharing

kowy
Posts: 47
Joined: 01 Jun 2020, 16:30

Re: help with last similar operation in stack

Post by kowy » 24 Jul 2022, 23:41

thanks !
i've modified so it will work like blender - where holding a button will enable only one active axis - u'r plugin have to type 2 axis to enable & 2 to disable
amazingly how u can modify xsi ))) thanks again

Code: Select all

function XSILoadPlugin( in_reg ){
	
	in_reg.Author = "Kolya";
	in_reg.Name = "ToggleTransformAxis";
	in_reg.Major = 1;
	in_reg.Minor = 0;
 	in_reg.RegisterCommand("ToggleTransformAxisX");
 	in_reg.RegisterCommand("ToggleTransformAxisY");
 	in_reg.RegisterCommand("ToggleTransformAxisZ");
	in_reg.RegisterCommand("SetTransformAxisX");
 	in_reg.RegisterCommand("SetTransformAxisY");
 	in_reg.RegisterCommand("SetTransformAxisZ");
	
	
	//RegistrationInsertionPoint - do not remove this line
}

function ToggleAxis(axis){
	
	var ActiveAxis = GetUserPref("3D_TRANSFO_EDITED_AXIS_CHANGED");
	
	var x = 1 + axis;
	var y = 2 + axis;
	var z = 4 + axis;
	
	if(ActiveAxis == y || ActiveAxis == z || ActiveAxis == y+z || ActiveAxis == 0)
		SetUserPref("3D_TRANSFO_EDITED_AXIS_CHANGED", ActiveAxis+x);
	else
		SetUserPref("3D_TRANSFO_EDITED_AXIS_CHANGED", ActiveAxis-x);
	
}

function ToggleTransformAxisX_Execute(){
	if(GetUserPref("3D_TRANSFO_EDITED_AXIS_CHANGED") !== 1)
		SetUserPref("3D_TRANSFO_EDITED_AXIS_CHANGED", 1);
	else
		SetUserPref("3D_TRANSFO_EDITED_AXIS_CHANGED", 7);
}

function ToggleTransformAxisY_Execute(){
	if(GetUserPref("3D_TRANSFO_EDITED_AXIS_CHANGED") !== 2)
		SetUserPref("3D_TRANSFO_EDITED_AXIS_CHANGED", 2);
	else
		SetUserPref("3D_TRANSFO_EDITED_AXIS_CHANGED", 7);;
}

function ToggleTransformAxisZ_Execute(){
	if(GetUserPref("3D_TRANSFO_EDITED_AXIS_CHANGED") !== 4)
		SetUserPref("3D_TRANSFO_EDITED_AXIS_CHANGED", 4);
	else
		SetUserPref("3D_TRANSFO_EDITED_AXIS_CHANGED", 7);
}

kowy
Posts: 47
Joined: 01 Jun 2020, 16:30

Re: help with last similar operation in stack

Post by kowy » 24 Jul 2022, 23:58

another problem that i'd like to solve is flattening according to axis with changed pivot position
example:
by default to change global + cog will be
Scale(null, 1, 0.000000000001, 1, siRelative, siGlobalCOG, siObj, siXYZ, null, null, null, null, null, null, null, 0, null);
but when i'm changing to a modified pivot (alt dragging) will have something like this
Scale(null, 1, 0.000000000001, 1, siRelative, siGlobalCOG, siObj, siXYZ, null, null, null, true, -1.8472517205702, -5.51816828300463, -0.436557306254863, 0, null);

is any way to define where's my current pivot position ?

User avatar
Kolya
Posts: 39
Joined: 03 Oct 2017, 19:17

Re: help with last similar operation in stack

Post by Kolya » 25 Jul 2022, 09:43

Sorry, I don't know a way to get current pivot position.

kowy
Posts: 47
Joined: 01 Jun 2020, 16:30

Re: help with last similar operation in stack

Post by kowy » 26 Jul 2022, 21:05

found only this, dont know how to manipulate with them
0x08 Center Pivot mode. If there is no center pivot, this is the same as Object Parent mode (0x06).
http://docs.autodesk.com/SI/2015/ENU/So ... ents-2.htm

User avatar
Kolya
Posts: 39
Joined: 03 Oct 2017, 19:17

Re: help with last similar operation in stack

Post by Kolya » 27 Jul 2022, 15:29

That's for changing transformation referential mode (buttons on the transform panel Global, Local, View etc.)

Code: Select all

SetTransformRefMode(8);

kowy
Posts: 47
Joined: 01 Jun 2020, 16:30

Re: help with last similar operation in stack

Post by kowy » 23 Aug 2022, 18:09

I wonder if there's such a future like blender's Spin
select some edges, place a pivot & extract towards that direction(with desired loop), a good example will be pipes
I had a lot of troubles doing romb shape in 4 directions (4 corners & from each selected edge) good example

User avatar
Kolya
Posts: 39
Joined: 03 Oct 2017, 19:17

Re: help with last similar operation in stack

Post by Kolya » 24 Aug 2022, 11:06

Hello, you can achieve something similar by changing object's center and then applying Extrude Op.
If you wont, I can try to make a plugin to optimize the process a little.


kowy
Posts: 47
Joined: 01 Jun 2020, 16:30

Re: help with last similar operation in stack

Post by kowy » 29 Aug 2022, 03:21

Hello, was thinking a way to improve it -> too many clicking for one extrusion
1. move center
2. rotate
3. extude along normals: frame object, subd's, length, transform per subd, rotate axis (this can be scripted)
main problem is center move & rotation - after an extrusion there's no way to change center for position/rotation (history tab won't allow that, instead will move center after last operation ) - so i have todo it again

my idea is a temporary pivot/null
* dragging will change length
* rotation will change the orientation
* scale - subd's numbers

as for pivot I'm looking towards texture projection(create new texture projection - is a template that will autodetect orientation, not the best, better then nothing) - so after freeze will delete all null's/pivots
as for ice, idk if it can be done there
thanks !

kowy
Posts: 47
Joined: 01 Jun 2020, 16:30

Re: help with last similar operation in stack

Post by kowy » 29 Aug 2022, 03:30

For u'r addon FFill, love it !
I'd like two additions to it
1. it works only for one object at a time, if it can be done for multiple selection
2. fill until there are no caps to fill - good example will be a cylinder with n vertical/U subd's, delete caps, fill holes

User avatar
Kolya
Posts: 39
Joined: 03 Oct 2017, 19:17

Re: help with last similar operation in stack

Post by Kolya » 29 Aug 2022, 21:19

Hello, I made a quick prototype with ICE. I'll try to finish it when I have free time

User avatar
Kolya
Posts: 39
Joined: 03 Oct 2017, 19:17

Re: help with last similar operation in stack

Post by Kolya » 03 Sep 2022, 19:02

Finished it. The plugin creates two nulls that control the center of spin, angle and number of subdivisions.

https://drive.google.com/file/d/11uxNEI ... sp=sharing

kowy
Posts: 47
Joined: 01 Jun 2020, 16:30

Re: help with last similar operation in stack

Post by kowy » 04 Sep 2022, 11:05

great work !!!
keeps history, intuitive & easy to use. Will test more !

User avatar
X-said
Posts: 63
Joined: 08 Jun 2009, 19:33
Location: Omsk RF
Contact:

Re: help with last similar operation in stack

Post by X-said » 14 Sep 2022, 10:36

Колян, спасибо за плуг;)
Kolya, great plugin;)

User avatar
gaboraa
Posts: 314
Joined: 16 Apr 2010, 23:14

Re: help with last similar operation in stack

Post by gaboraa » 19 Sep 2022, 14:42

Wow, another great tool for modeling!

Post Reply

Who is online

Users browsing this forum: No registered users and 50 guests