help with last similar operation in stack
help with last similar operation in stack
here's a script
GetPrimLattice(null, null, null, null, null);
SetValue("lattice.lattice.subdivx", 2, null);
SetValue("lattice.lattice.subdivy", 2, null);
SetValue("lattice.lattice.subdivz", 2, null);
it works fine on first lattice operations, when added second, it will change subd only for first instance of lattice, how can I change for last operation done ? SetValue("lattice1.lattice.subdivx", 2, null); SetValue("lattice2.lattice.subdivx", 2, null); so on
~ similar to other operations like bevel
GetPrimLattice(null, null, null, null, null);
SetValue("lattice.lattice.subdivx", 2, null);
SetValue("lattice.lattice.subdivy", 2, null);
SetValue("lattice.lattice.subdivz", 2, null);
it works fine on first lattice operations, when added second, it will change subd only for first instance of lattice, how can I change for last operation done ? SetValue("lattice1.lattice.subdivx", 2, null); SetValue("lattice2.lattice.subdivx", 2, null); so on
~ similar to other operations like bevel
Re: help with last similar operation in stack
You need to use a variable(lat) to store a reference to created lattice and then use it with SetValue
var lat = GetPrimLattice(null, null, null, null, null);
SetValue(lat +".lattice.subdivx", 2, null);
SetValue(lat +".lattice.subdivy", 2, null);
SetValue(lat +".lattice.subdivz", 2, null);
var lat = GetPrimLattice(null, null, null, null, null);
SetValue(lat +".lattice.subdivx", 2, null);
SetValue(lat +".lattice.subdivy", 2, null);
SetValue(lat +".lattice.subdivz", 2, null);
Re: help with last similar operation in stack
thank you !!!
and how can i do for bevel ?
Application.ApplyTopoOp("BevelComponent", "cube1.edge[3]", "siUnspecified", "siPersistentOperation", "")
Application.SetValue("cube.polymsh.bevelop.nbsubdivs", 1, "")
Application.SetValue("cube.polymsh.bevelop.roundingextrapolation", 1.5, "")
that should be parimeter/safe bevel -> equal from both sides
and how can i do for bevel ?
Application.ApplyTopoOp("BevelComponent", "cube1.edge[3]", "siUnspecified", "siPersistentOperation", "")
Application.SetValue("cube.polymsh.bevelop.nbsubdivs", 1, "")
Application.SetValue("cube.polymsh.bevelop.roundingextrapolation", 1.5, "")
that should be parimeter/safe bevel -> equal from both sides
Re: help with last similar operation in stack
//JScript
var ops = ApplyTopoOp("BevelComponent");
for(var i=0; i<ops.Count; i++){
SetValue(ops(i) +".nbsubdivs", 1);
SetValue(ops(i) +".roundingextrapolation", 1.5);
//using these values may give you better result, but it still won't be perfect
//SetValue(ops(i) +".nbsubdivs", 1);
//SetValue(ops(i) +".tesselatesharpness", 1.7425434494519254);
//SetValue(ops(i) +".roundingextrapolation", 0.4428090415820636);
}
InspectObj(ops);
var ops = ApplyTopoOp("BevelComponent");
for(var i=0; i<ops.Count; i++){
SetValue(ops(i) +".nbsubdivs", 1);
SetValue(ops(i) +".roundingextrapolation", 1.5);
//using these values may give you better result, but it still won't be perfect
//SetValue(ops(i) +".nbsubdivs", 1);
//SetValue(ops(i) +".tesselatesharpness", 1.7425434494519254);
//SetValue(ops(i) +".roundingextrapolation", 0.4428090415820636);
}
InspectObj(ops);
Re: help with last similar operation in stack
thanks * 2 )))) -> already saved a lot of time
and last one
select hard edges of extruded polygons
the way I do now
select adjustments (edge/polygon -> depending on task) -> rc tools -> SetValue("preferences.Custom Filters (RCTools).EdgeSharp_apply", true, null);
and every time i have to open rc popup and press "keep" button
and last one
select hard edges of extruded polygons
the way I do now
select adjustments (edge/polygon -> depending on task) -> rc tools -> SetValue("preferences.Custom Filters (RCTools).EdgeSharp_apply", true, null);
and every time i have to open rc popup and press "keep" button
Re: help with last similar operation in stack
If I understood you correctly, this should do
Code: Select all
//store RCTools edge filter settings
var rc_Length = GetValue("preferences.Custom Filters (RCTools).Length_apply");
var rc_TotalAdjE = GetValue("preferences.Custom Filters (RCTools).TotalAdjE_apply");
var rc_EdgeAdjP = GetValue("preferences.Custom Filters (RCTools).EdgeAdjP_apply");
var rc_EdgeOrientation = GetValue("preferences.Custom Filters (RCTools).EdgeOrientation_apply");
var rc_EdgeAngle = GetValue("preferences.Custom Filters (RCTools).EdgeAngle_apply");
var rc_EdgeSharp = GetValue("preferences.Custom Filters (RCTools).EdgeSharp_apply");
var rc_EdgeUVBorder = GetValue("preferences.Custom Filters (RCTools).EdgeUVBorder_apply");
var rc_RandomEdge = GetValue("preferences.Custom Filters (RCTools).RandomEdge_apply");
var sel = Selection(0);
var subc = sel.SubComponent;
var ccoll = subc.ComponentCollection;
if(subc.Type == "edgeSubComponent" || subc.Type == "polySubComponent"){
var nEdges = ccoll.NeighborEdges(1);
if (subc.Type == "polySubComponent")
var nEdges = nEdges.NeighborEdges(1);
SetValue("preferences.Custom Filters (RCTools).Length_apply", false);
SetValue("preferences.Custom Filters (RCTools).TotalAdjE_apply", false);
SetValue("preferences.Custom Filters (RCTools).EdgeAdjP_apply", false);
SetValue("preferences.Custom Filters (RCTools).EdgeOrientation_apply", false);
SetValue("preferences.Custom Filters (RCTools).EdgeAngle_apply", false);
SetValue("preferences.Custom Filters (RCTools).EdgeSharp_apply", true);
SetValue("preferences.Custom Filters (RCTools).EdgeUVBorder_apply", false);
SetValue("preferences.Custom Filters (RCTools).RandomEdge_apply", false);
SelectGeometryComponents(nEdges);
SelectObj(Filters("rcCustomEdgeFilter").Subset(Selection));
// restore RCTools edge filter settings
SetValue("preferences.Custom Filters (RCTools).Length_apply", rc_Length);
SetValue("preferences.Custom Filters (RCTools).TotalAdjE_apply", rc_TotalAdjE);
SetValue("preferences.Custom Filters (RCTools).EdgeAdjP_apply", rc_EdgeAdjP);
SetValue("preferences.Custom Filters (RCTools).EdgeOrientation_apply", rc_EdgeOrientation);
SetValue("preferences.Custom Filters (RCTools).EdgeAngle_apply", rc_EdgeAngle);
SetValue("preferences.Custom Filters (RCTools).EdgeSharp_apply", rc_EdgeSharp);
SetValue("preferences.Custom Filters (RCTools).EdgeUVBorder_apply", rc_EdgeUVBorder);
SetValue("preferences.Custom Filters (RCTools).RandomEdge_apply", rc_RandomEdge);
}
Re: help with last similar operation in stack
u made my day ! thank you !!!
all correct sir !
all correct sir !
Re: help with last similar operation in stack
Ohayo !
Have some questions !
1. I'm using knife tool to delete sections above or below, later Ffill gaps - that's for sharing that addon !
is it possible to script deleting ? I haven't found a way(1 button/or keystroke) to view last modifier in stack. They way i'm doing now -> knife -> f3 -> expand -> enter the modifier or knife -> selection button -> enter modifier, knife - explorer -> expand enter modifier
perfect will be similar to blender approach -> bisect
2. after capping border edges - for cleanup i have to remake topology, easiest way is to select and connect. xsi has only chunky connect 2 points with a null, alternative's i've found XCutEdge - witch often glitches and needs to freeze model
a script for connecting 2 selected points
3. How to view last modifier in stack ? keystroke ? example knife doesn't open proprieties after executing the operation
Have some questions !
1. I'm using knife tool to delete sections above or below, later Ffill gaps - that's for sharing that addon !
is it possible to script deleting ? I haven't found a way(1 button/or keystroke) to view last modifier in stack. They way i'm doing now -> knife -> f3 -> expand -> enter the modifier or knife -> selection button -> enter modifier, knife - explorer -> expand enter modifier
perfect will be similar to blender approach -> bisect
2. after capping border edges - for cleanup i have to remake topology, easiest way is to select and connect. xsi has only chunky connect 2 points with a null, alternative's i've found XCutEdge - witch often glitches and needs to freeze model
a script for connecting 2 selected points
3. How to view last modifier in stack ? keystroke ? example knife doesn't open proprieties after executing the operation
Re: help with last similar operation in stack
Hello, I've packed that into a simple plugin: https://drive.google.com/file/d/1jd64Ad ... BWMwS/view
There are 5 commands which you can bind to a hotkey : InspectLastOp, SliceOp_DeleteAbove, SliceOp_DeleteBelow, SliceOp_DeleteAndFillAbove, SliceOp_DeleteAndFillBelow
There are 5 commands which you can bind to a hotkey : InspectLastOp, SliceOp_DeleteAbove, SliceOp_DeleteBelow, SliceOp_DeleteAndFillAbove, SliceOp_DeleteAndFillBelow
Re: help with last similar operation in stack
thanks ! is it possible to add to selection cutting loop ?
after some more digging it was an hotkey for last operation in stack -> ctrl + end )
after some more digging it was an hotkey for last operation in stack -> ctrl + end )
Re: help with last similar operation in stack
I added command SliceOp_SelectEdges to select edge loops.
build-in command for inspecting last operator works only in object mode,
InspectLastOp works even when you're in component selection mode and nothing selected.
https://drive.google.com/file/d/1bda04r ... sp=sharing
build-in command for inspecting last operator works only in object mode,
InspectLastOp works even when you're in component selection mode and nothing selected.
https://drive.google.com/file/d/1bda04r ... sp=sharing
Re: help with last similar operation in stack
Ohayo
I'm confused how I should run build-in command
earlier it was with register & i could find costum commands -> in_reg - new commands records
but this one is not registered
trying SliceOpTools(); - error
SliceOp_SelectEdges - not registered
I'm confused how I should run build-in command
earlier it was with register & i could find costum commands -> in_reg - new commands records
but this one is not registered
trying SliceOpTools(); - error
SliceOp_SelectEdges - not registered
Re: help with last similar operation in stack
Hello, SliceOpTools() is an internal function that is only being used inside of the plugin by registered within function XSILoadPlugin() commands.
Registered commands, can be run like this: SliceOp_SelectEdges();
Registered commands, can be run like this: SliceOp_SelectEdges();
Re: help with last similar operation in stack
still confused
running knife tool
SliceOp_DeleteAbove_Execute - scripted hotkey
alt +4 (script editor)-> SliceOp_SelectEdges(); nothing
running knife tool
SliceOp_DeleteAbove_Execute - scripted hotkey
alt +4 (script editor)-> SliceOp_SelectEdges(); nothing
Re: help with last similar operation in stack
After placing the file to C:\Users\user_name\Autodesk\Softimage_version\Application\Plugins
Open Plugin Manager to see if it's loaded.
Then you can try to invoke the commands from there
Open Plugin Manager to see if it's loaded.
Then you can try to invoke the commands from there
Re: help with last similar operation in stack
thanks ! was one of my mistakes copy pasted script & haven't copied all, on last strokes it was SliceOp_SelectEdges() ! thanks !
Who is online
Users browsing this forum: No registered users and 51 guests