Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5841

Change path to block via script

$
0
0

@wynott wrote:

I am starting to daydream about a script that swaps out block instances for low-detail, perhaps already meshed, equivalents or vice versa back to the OG NURBS version.

Logic would be something like

step through all the objects in the scene
is it a linked block? if yes
does it's name contain a code like starting with hi- (etc.) if yes
get it's path and look for same name but with lo- or whatever. if fount then
swap the paths
next

One initial question... I can see how to get the block's path... but nothing about changing it? Do I have to delete the block definition and insert the replacement as a new definition? Would I then lose all the instances? Need some help on the logic before I dig into this.

Posts: 10

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 5841

Latest Images

Trending Articles



Latest Images