about group reset xform
hi
i have a problem in working group.
i found group can not reset xform.
i would like to make resetxform about group.
example)
there is 100 groups.
my manual process.
1. ungroup
2. reset xform objects in group .
3. center pivot.
4. re group.
i would like to automate group .
thank you for reading .
Comments
...
If you want to reset xform and convert all geometries to Poly use this line
resetXFormGroup selection[1]
If you want to reset xform and convert all geometries to Mesh use this line
resetXFormGroup selection[1] convert:#mesh
bga
thank you for reply
hi barigazy .
really thank you for reply .
i test you rscript.
but there is problem
can you check attachef image
first image is manual work , that is good
but your image is still not .
pls can you compare file
...
Object on top is the single object, you attached all elements and centralized pivot.
You didn't mention that.
The uilding on the bottom has multiple elements with offset pivot positions. My code only resets pivot orientation but not affect pivot position
bga
i found this script and
i found this script and modified
but error
fn attachGroupMembers group = if isgrouphead group do
(
setGroupOpen group off
nodes = for node in (join #() group) where canconvertto node editable_poly collect node
converttopoly nodes
gname = group.name
explodeGroup group
for i = 1 to nodes.count do
(
centerpivot nodes[i]
ResetXForm nodes[i]
converttopoly nodes[i]
)
group nodes name:gname
)
for x in selection where (isgrouphead x) do
(
attachGroupMembers x
)
...
the problem is a bit more complicated when you need to consider nested groups
also, imported models from CAD sometimes have the same name. The code temporarily changes names of selected objects until calculation is done.
You don't need to open the group, just select a closed group or any object (member) of the group and run the code
If you want objects to be converted to poly, just use this line of code
resetXFormGroup
For mesh output use this line
resetXFormGroup convert:#mesh
bga
...
Or you can download
*.mcr
from here ;)
bga
wow wow perpect
thank you for your effor .
really really thank you .
perpect
1 more question .
manysel = selection
clearselection()
for x in manysel where (isgrouphead x) do
(
select x
resetXFormGroup x convert:#mesh
)
this is error
i have a 300 group.
how can i do that ?
sorry for many ask.
really reall thank you.
...
select all 1000000 groups in your scene and group it. run the script and after it done, open group and delete group head
;)
bga
Wow wow thank thank you
Wow very good idea
I am stupid man :)
Really really thank you
Really really
...
No problem.
Enjoy!
I didn't test it with larger scenes like yours, so if you come across some problems, please let me know
bga