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 (12)
Comment policy
If you want to reset xform and convert all geometries to Poly use this line
If you want to reset xform and convert all geometries to Mesh use this line
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
Attachments
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
thank you again
top is only sample result
you can see bouding box
i want that in group
i attached again
sorry for many ask
ps : sorry i did not center pivot ~
this need center pitvot
Attachments
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
For mesh output use this line
Or you can download
*.mcr
from here ;)
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
;)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
Ok thank you
Thank you for your kindness
Really really thank you again