Python help

Python help

Anonymous
Not applicable
442 Views
0 Replies
Message 1 of 1

Python help

Anonymous
Not applicable

I'm creating a city builder tool for a university project using Python and I'm wondering how to go about a few things. I want the user to have some flexibility with the tool, for example, I want them to be able to select the desired faces that they wish to manipulate. Here's a step by step of how the tool in theory will work.

User selects the faces -> add sub-divisions -> extrude faces to leave a gap in between -> extrude up to add building height.

I have already created a very basic function for the user to create a path following the same line. You just select the faces and it extrudes the path for you.

Here's a few questions.

1. What would be the best way to add variation to the building height

2. Would it be possible to add roofs if the building was a certain height.

Also i'm very new to scripting but here's what I have so far

 

import maya.cmds as mc

#PATH BUILDER#cmds.polyExtrudeFacet( ch=1, kft=True, ls=(1, .8, 0))
#PATH BUILDER#cmds.polyExtrudeFacet( ch=1, kft=True, lt=(0., 0., -0.00523874) )

mc.polySubdivideFacet( sbm=0, dvv=2 )

mc.polyExtrudeFacet( kft=False, ls=(.9, .9, 0), lt=(0., 0., 0.) )

for i in range(0, 2):
mc.polyExtrudeFacet( kft=False, lt=(0., 0., 0.3) )

0 Likes
443 Views
0 Replies
Replies (0)