From 4886aa2620512aa122b9506582ec120179d7795d Mon Sep 17 00:00:00 2001 From: henrique Date: Wed, 4 Mar 2026 12:10:44 -0300 Subject: [PATCH] kk --- __pycache__/vr4life_engine.cpython-311.pyc | Bin 35723 -> 37002 bytes vr4life_engine.py | 57 +++++++++++++++++++-- 2 files changed, 53 insertions(+), 4 deletions(-) diff --git a/__pycache__/vr4life_engine.cpython-311.pyc b/__pycache__/vr4life_engine.cpython-311.pyc index cdb798461cc15ecc854cb3590acfc279e461c131..f2b3e190c104f98c86717f43eac5db0f70afa1bf 100644 GIT binary patch delta 1508 zcmc(f&1(}u7{)tE8|yZyEp}5@vgtH}CMg613bqh!Jy@$&3VKj#Df=;Lwr+Og?!@B7 zcoC$2Twbvrt(PL|p)B51LumiEeYp zzGw{KL^o82LR~5=#wEox^l5EoGCL&z%I$>MSOjj%8Mt$y8(zr$Of16dD1S@bw8LsN z8B_4XkU$#i0y)k-5{$=l@M=(msu2yVeu0^xkg;IoU=Msg)*5vQ9d+z-X`B>QMuCd` z?O<`lZlzQrj2(;2P21|Mi&fq$D{PGeIh@6fE90=>6c%8_+9gxxa#ANIp#&FFtoB+V z$%cFh#@@%?y9jl_MJe0fCv3lZq&keehtgoM5^rT7Z|Ly9Cb{Cn_y0&fNB%a+wJnFQ zFw&*g-V_$Qg8 z&PW^z37lGP@_`i_fE78gNPtBn0k`6NjyEObS(%F;GPTYL@2%t2aK!8L=TYEYd?7T+ zu1>cDjJ~W8_1VjW+6LjVlNiQ!kHx;NP1I(~iC{8VLFUl`1@J-E4N-Y9fk(QWKoNBF* zSWu9fm!goDS{|RDlvS*d1QbdxQP8$kFjUY~0Gd=%RH>1Ynv+_Rs*s_XoLG{ap`p2X zqSQ1-My|;kGKTCdT$~L~AGkIr%2+b9zF-9T@uNbDQF4AxPAbr#d~1cwG@$J{ddc~v zc_j*VKyy>_6*LqOUIj{``O;BIMi3$o@+C+f#e+V1vS((x%((ewuOuT^A<%;#m>C%vZ%pRzSD38R Zze0nb(eMKUDxt&;5 0 do ( local b = valid_cg[1]; if not isKindOf b Editable_Poly do try(convertToPoly b)catch(); if isKindOf b Editable_Poly do ( for i = 2 to valid_cg.count do ( local n = valid_cg[i]; if not isKindOf n Editable_Poly do try(convertToPoly n)catch(); if isKindOf n Editable_Poly do try(polyOp.attach b n)catch() ); b.name = h.name; setGroupMember b false; append new_objs b; act += 1 ) ); try(delete h)catch() ) + fn hasProtectedName nd = ( + local nm = toLower nd.name + if (matchPattern nm pattern:"*_mult*") or (matchPattern nm pattern:"*_catg*") or (matchPattern nm pattern:"*_mat*") do return true + for c in nd.children do ( if hasProtectedName c do return true ) + return false + ) + local act = 0; local new_objs = #(); local orig_sel = selection as array; + local loose = for o in orig_sel where not isGroupHead o and not isGroupMember o collect o; + local heads = for o in orig_sel where isGroupHead o and not (hasProtectedName o) collect o + + for h in heads do ( + local valid_cg = for c in h.children where superclassof c == GeometryClass and classof c != TargetObject collect c + if valid_cg.count > 0 do ( + local b = valid_cg[1] + if not isKindOf b Editable_Poly do try(convertToPoly b)catch() + if isKindOf b Editable_Poly do ( + for i = 2 to valid_cg.count do ( + local n = valid_cg[i] + if not isKindOf n Editable_Poly do try(convertToPoly n)catch() + if isKindOf n Editable_Poly do try(polyOp.attach b n)catch() + ) + b.name = h.name + setGroupMember b false + append new_objs b + act += 1 + ) + ) + try(delete h)catch() + ) local final_sel = loose; for no in new_objs do append final_sel no; if final_sel.count > 0 do select final_sel; act )""" try: @@ -64,7 +91,29 @@ def attach_grouped_objects(ui, from_auto=False): def super_attach_objects(ui, from_auto=False): ui.pb.setFormat("Super Solda VR...") QtWidgets.QApplication.processEvents() - ms = """( local sel = for o in selection where superclassof o == GeometryClass and classof o != TargetObject collect o; if sel.count > 1 do ( local b = sel[1]; if not isKindOf b Editable_Poly do try(convertToPoly b)catch(); if isKindOf b Editable_Poly do ( for i = 2 to sel.count do ( local n = sel[i]; if not isKindOf n Editable_Poly do try(convertToPoly n)catch(); if isKindOf n Editable_Poly do try(polyOp.attach b n)catch() ); b.name = uniqueName "VR_Bloco_Fundido"; select b ) ); sel.count )""" + ms = """( + fn hasProtectedName nd = ( + local nm = toLower nd.name + if (matchPattern nm pattern:"*_mult*") or (matchPattern nm pattern:"*_catg*") or (matchPattern nm pattern:"*_mat*") do return true + for c in nd.children do ( if hasProtectedName c do return true ) + return false + ) + local sel = for o in selection where superclassof o == GeometryClass and classof o != TargetObject and not (hasProtectedName o) collect o + if sel.count > 1 do ( + local b = sel[1] + if not isKindOf b Editable_Poly do try(convertToPoly b)catch() + if isKindOf b Editable_Poly do ( + for i = 2 to sel.count do ( + local n = sel[i] + if not isKindOf n Editable_Poly do try(convertToPoly n)catch() + if isKindOf n Editable_Poly do try(polyOp.attach b n)catch() + ) + b.name = uniqueName "VR_Bloco_Fundido" + select b + ) + ) + sel.count + )""" try: act = rt.execute(ms) load_selection(ui) @@ -389,7 +438,7 @@ def process_bake_logic(ui, auto_export=False): $.INodeBakeProperties.addBakeElement be $.INodeBakeProperties.bakeEnabled = true $.INodeBakeProperties.bakeChannel = 3 - render rendertype:#bakeSelected vfb:true quiet:true outputfile:fileOut + render rendertype:#bakeSelected vfb:true quiet:true production:true outputfile:fileOut return 1 ) try ( doBake "{t_rnd_id}" {cr} {cr} "{ext}" {str(i_cor).lower()} {str(u_den).lower()} "{el}" ) catch ( 0 )